Untitled

 avatar
unknown
plain_text
a year ago
12 kB
1
Indexable
root: 
    2  ls
    3  exit
    4  tty
    5  whoami
    6  who
    7  top
    8  exit
    9  mkdir -vp test/testfile
   10  rm test
   11  rm -r test
   12  alias 
   13  rm --help  | less
   14  mkdir -vp test/testfile
   15  rm -rf test
   16  rm -rf /
   17  exit
   18  whoami
   19  less /etc/sudoers
   20  id student
   21  visudo
   22  less /etc/sudoers
   23  cd /etc/sudoers.d
   24  ls -l
   25  cat lab-sudo 
   26  useradd joe
   27  id joe
   28  echo "joe ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/joe 
   29  cat joe
   30  su - joe
   31  ls -l
   32  pwd
   33  cd
   34  exit
   35  useradd --help | less
   36  useradd carl
   37  id carl
   38  ls -l /home
   39  tail -n5 /etc/passwd /etc/group
   40  useradd -c "Bill Gates" bill
   41  tail -n5 /etc/passwd /etc/group
   42  groupadd --help
   43  groupadd training
   44  tail -n5 /etc/group
   45  useradd test
   46  tail -n5 /etc/passwd /etc/group
   47  userdel --help
   48  userdel -r test
   49  groupmod --help
   50  groupmod -g 10000 training
   51  tail -n5 /etc/passwd /etc/group
   52  useradd test
   53  tail -n5 /etc/passwd /etc/group
   54  usermod --help
   55  usermod -s /sbin/nologin test
   56  tail -n5 /etc/passwd /etc/group
   57  userdel -r test
   58  groupadd -g 10001 sales
   59  tail -n5 /etc/group
   60  useradd -c Jane -G sales jane
   61  tail -n5 /etc/passwd /etc/group
   62  useradd --help
   63  id carl
   64  id jane
   65  usermod --help
   66  id carl
   67  usermod -G training carl
   68  id carl
   69  tail /etc/group
   70  usermod -G sales carl
   71  id carl
   72  tail /etc/group
   73  usermod --help
   74  usermod -aG training carl
   75  id carl
   76  tail -n5 /etc/passwd /etc/group
   77  getent passwd carl
   78  getent group traning
   79  getent group training
   80  ssh carl@localhost
   81  exit
   82  passwd carl
   83  man 5 passwd
   84  man 5 shadow
   85  tail -n 5 /etc/shadow
   86  getent shadow carl
   87  ssh carl@localhost
   88  gpasswd -a carl wheel
   89  getent shadow carl
   90  getent passwd carl
   91  getent group wheel
   92  ssh carl@localhost
   93  man passwd
   94  getent shadow jane
   95  echo P@ssw0rd | passwd --stdin jane
   96  getent shadow jane
   97  tail -n5 /etc/shadow
   98  chage -l carl
   99  chage --help
  100  chage carl
  101  chage -l carl
  102  chage -E $(date -d "+180 days" +%F) carl
  103  chage -l carl
  104  date -d "+180 days" +%
  105  chage -m 2 -M 180 -W 7 -I 5 carl
  106  chage -l carl
  107  chage -d 0 carl
  108  chage -l carl
  109  tail -n5 /etc/shadow
  110  cat /etc/default/useradd
  111  cd /home
  112  ls -l
  113  cd jane
  114  ls -la
  115  cd ../bill
  116  ls -la
  117  cd /etc/skel
  118  ls
  119  ls -la
  120  pwd
  121  cd ..
  122  less /etc/login.defs 
  123  usermod -L carl
  124  getent shadow carl
  125  usermod -U carl
  126  getent shadow carl
  127  cd
  128  exit
  129  cd /home/carl
  130  ls -l
  131  cp /var/log/messages .
  132  ls -l
  133  exit
  134  cd /home/carl
  135  ls -l
  136  chown carl:carl messages 
  137  ls -l
  138  su - carl
  139  cd
  140  mkdir -pv /share/{Training,IT,Sales}
  141  groupadd -g 10002 it
  142  cd /share/
  143  ls -l
  144  chown :training Training/
  145  ls -l
  146  chgrp it IT
  147  chgrp sales Sales/
  148  ls -l
  149  chmod 770 *
  150  ls -l
  151  usermod -aG it bill
  152  useradd -G it -c Ted ted
  153  id jane; id bill; id ted; id carl
  154  su - jane
  155  su - carl
  156  su - bill
  157  ls -l
  158  id carl
  159  getfacl Sales
  160  setfacl -m g:training:rX Sales
  161  getfacl Sales
  162  ls -l
  163  exit
  164  su - bill
  165  su - ted
  166  cd /home/
  167  cd /share/
  168  ls -l
  169  chmod g+s IT
  170  ls -l
  171  su - bill
  172  su - ted
  173  chmod o+t IT
  174  ls -l
  175  cd IT
  176  ls -l
  177  cd ..
  178  su - ted
  179  cd
  180  history
student: 
   10  cd /boot
   11  ls -l
   12  cd ..
   13  lsblk
   14  ssh servera
   15  cd
   16  pwd
   17  ls -l
   18  cd ..
   19  pwd
   20  mkdir test
   21  ls -l
   22  tty
   23  who
   24  w
   25  echo $DISPLAY
   26  ssh servera
   27  ls -l
   28  ip neigh
   29  nmcli device 
   30  head -n 3 /usr/share/dict/words /usr/share/dict/linux.words 
   31  hjh
   32  ls -l
   33  mkdir -v My Docs
   34  mkdir -v "My Docs"
   35  ls -l
   36  mkdir -v My\ Photos
   37  ls -l My\ Photos/
   38  history
   39  ls -l
   40  fdisk -l
   41  sudo fdisk -l
   42  history
   43  fdisk -l
   44  ip neigh show
   45  ls /usr/share/doc/HTML/index.html 
   46  less /usr/share/doc/HTML/index.html 
   47  file /usr/share/doc/HTML/index.html
   48  cls
   49  man hier
   50  ls -l
   51  cd /
   52  ls -l
   53  cd /var/log
   54  pwd
   55  cd /etc
   56  cd -
   57  cd 
   58  pwd
   59  cd -
   60  cd ~/Videos
   61  pwd
   62  echo ~
   63  echo $HOME
   64  mkdir -v Scifi/Marvel
   65  mkdir -vp SciFi/Marvel
   66  mkdir --help
   67  mkdir -v Action Comedy
   68  touch Avengers.mp4 Thor.mp4
   69  ls -l
   70  pwd
   71  file Avengers.mp4 
   72  cd SciFi/Marvel/
   73  pwd
   74  ls -la
   75  cd ..
   76  pwd
   77  cd ../..
   78  pwd
   79  cd -
   80  file Avengers.mp4
   81  file ../Avengers.mp4
   82  cd
   83  cd Docs
   84  ls -l
   85  mkdir -v dir1 dir2 dir3
   86  mkdir -v dir{4..6}
   87  cd ../Documents/
   88  mkdir scripts
   89  mkdir -pv issue/papers
   90  ls l
   91  ls -l
   92  ls -R
   93  tree
   94  touch myfile
   95  ls -l
   96  stat myfile
   97  touch myfile
   98  stat myfile
   99  ls -l
  100  rm myfile
  101  ls -l
  102  rm scripts
  103  rmdir scripts
  104  ls
  105  rmdir issue
  106  rmdir --help
  107  rm --help | less
  108  ls -l
  109  rm -r issue
  110  ls -l
  111  sudo -i
  112  pwd
  113  cp ~/Videos/Avengers.mp4 .
  114  ls -l
  115  rm Avengers.mp4 
  116  pwd
  117  cp ../Videos/Avengers.mp4 .
  118  ls -l
  119  rm Avengers.mp4 
  120  cd ../Videos/SciFi/
  121  ls -l
  122  cp ../Avengers.mp4 Marvel/Somemovie.mp4
  123  ls -R
  124  cd ..
  125  ls -l
  126  cp Action Adventure
  127  cp -rv Action Adventure
  128  ls -l
  129  tree
  130  cp Avengers.mp4 Thor.mp4 Action
  131  ls -R
  132  mv Thor.mp4 SciFi/Marvel/
  133  ls -l
  134  ls SciFi/MA
  135  ls SciFi/Marvel/
  136  cd SciFi/Marvel/
  137  ls -l
  138  mv Thor.mp4 Avengers4.mp4
  139  ls -l
  140  stat Somemovie.mp4
  141  cd
  142  cd /
  143  ls -l
  144  cd 
  145  cd Desktop/
  146  ls -l
  147  pwd
  148  ln -s ~/Videos/Avengers.mp4 Avengers1.mp4
  149  ls -l
  150  cd ..
  151  ln -s Videos Movies
  152  ls -l
  153  cd Movies
  154  pwd
  155  ls -l
  156  cd /
  157  ls -l
  158  cd 
  159  cd Videos/SciFi/Marvel/
  160  ls -l
  161  fallocate -l 300m Avengers1.mp4
  162  ls -lh
  163  ln Avengers1.mp4 Avengers.mp4
  164  ls -lh
  165  ls -lih
  166  du -sh
  167  ln Avengers1.mp4 ~/Documents/
  168  ls -l ~/Documents/
  169  ls -lih ~/Documents/
  170  ls -lih
  171  cd ~/Documents/
  172  ls
  173  ls -l
  174  touch file{1..40}
  175  ls
  176  mkdir 2010 2011 20{12..18}
  177  ls
  178  mkdir -v 20{19,21,23}
  179  echo ~
  180  echo ~devops
  181  echo ~root
  182  echo $USER
  183  TEST1=Theresults
  184  echo $TEST1
  185  echo Current user is $USER
  186  echo Current user is $(whoami)
  187  echo Current user is `whoami`
  188  ls -l f*
  189  ls -l file?
  190  ls -l file?0
  191  ls -l file??
  192  ls file[37]
  193  ls file[3-7]
  194  ls file[3-7][0-2]
  195  ls file[3-7]*
  196  ls file[!3-7]*
  197  man glob
  198  man 7 glob
  199  man 7 glob
  200  echo $USER
  201  echo $HOME
  202  echo $SHELL
  203  echo User $USER has a home at $HOME on $(hostname -s)
  204  echo "User $USER has a home at $HOME on $(hostname -s)"
  205  echo You owe me $9000
  206  echo "You owe me $9000"
  207  echo 'You owe me $9000'
  208  echo You owe me \$9000
  209  cd
  210  mkdir --help
  211  ls --help | less
  212  tar --help | head
  213  ls --help | grep sort
  214  man ls
  215  man man
  216  man passwd
  217  man 5 passwd
  218  man -f passwd
  219  whatis passwd
  220  man -k regex
  221  apropos regex
  222  sudo mandb
  223  man -K dell.com
  224  man -K torvalds
  225  ls -lR /tmp
  226  ls -lR /tmp > tmpfiles.txt
  227  cat tmpfiles.txt 
  228  wc -l tmpfiles.txt 
  229  ls -lR /var/tmp >> tmpfiles.txt 
  230  wc -l tmpfiles.txt 
  231  ls -lR /tmp 2> tmperrors.txt
  232  ls -lR /tmp 2> /dev/null
  233  ls -lR /tmp 2> tmperrors.txt > tmpfiles.txt 
  234  ls -lR /var/tmp 2>> tmperrors.txt >> tmpfiles.txt 
  235  ls -lR /var/tmp &> tmpcombined.txt
  236  cat tmpcombined.txt 
  237  history
  238  cp --help | less
  239  find /usr/share/doc/ | grep 'readme'
  240  find /usr/share/doc/ | grep 'readme' | wc -l
  241  cat /etc/passwd
  242  cat /etc/passwd | cut -d ':' -f 1,7
  243  cat /etc/passwd | cut -d ':' -f 1,7 | sort
  244  cat /etc/passwd | cut -d ':' -f 7 | sort | uniq
  245  cat /etc/passwd | cut -d ':' -f 1,7 | column
  246  ls -lR /tmp | tee save2file
  247  cat save2file 
  248  ls -lR /tmp 2>&1 | tee save2file
  249  cat save2file 
  250  history
  251  nano
  252  nano sample 
  253  ls -lih /etc/ > files.txt
  254  vi files
  255  vi files.txt
  256  vi
  257  vim
  258  vim files.txt
  259  vim
  260  vim files.txt
  261  vimtutor
  262  set | less
  263  COUNT=20
  264  echo $COUNT
  265  echo Repeat $COUNTx
  266  echo Repeat ${COUNT}x
  267  export COUNT
  268  export -n COUNT
  269  unset COUNT
  270  echo $PS1
  271  PS1="bash\$ "
  272  PS1="[\u@\h \w]\$ "
  273  cd /usr/share/
  274  cd
  275  echo $PATH
  276  export PATH=${PATH}:/home/student/sbin
  277  echo $PATH
  278  env
  279  alias
  280  which ls
  281  \ls -l
  282  alias whatsup="echo Hello"
  283  whatsaup
  284  whatsup
  285  alias
  286  which whatsup
  287  unalis whatsup
  288  unalias whatsup
  289  alias
  290  ls -l
  291  ls -la
  292  vim .bash_profile 
  293  vim .bashrc
  294  cd /etc/profile.d/
  295  ls -l
  296  cd
  297  ls -l
  298  top
  299  id student
  300  cat /etc/passwd
  301  ssh servera
  302  id devops
  303  id
  304  ls -l
  305  ps -au
  306  less /etc/passwd
  307  man -f passwd
  308  man 5 passwd
  309  cd /etc
  310  ls -l shadow
  311  id
  312  grep student /etc/group
  313  less /etc/group
  314  ls -l /etc/passwd /etc/shadow /etc/group /etc/gshadow
  315  vipw
  316  sudo vipw
  317  cd
  318  su devops
  319  su --help
  320  su - devops
  321  su --help
  322  su -
  323  man -k sudo
  324  whoami
  325  sudo whoami
  326  fdisk -l
  327  sudo fdisk -l
  328  vim /etc/hosts
  329  sudo vim /etc/hosts
  330  sudo -i
  331  ssh carl@localhost
  332  sudo -i
  333  ssh bill@localhost
  334  sudo -i
  335  ls -l
  336  ls -lih
  337  rm My 'My Docs' "My Photos"
  338  rm -r My 'My Docs' "My Photos"
  339  ls -l
  340  ls -lih
  341  ls -lh
 342  vim test.sh
  343  ls -l test.sh 
  344  test.sh
  345  echo $PATH
  346  pwd
  347  ./test.sh
  348  chmod --help
  349  chmod u+x test.sh 
  350  ls -l test.sh 
  351* chmod a+rwx test.sh 
  352  ls -l test.sh 
  353  ./test.sh 
  354  ls -l
  355  ls -l Docs
  356  ls Docs
  357  chmod u-r Docs
  358  ls Docs
  359  cd Docs
  360  ls
  361  cd ..
  362  ls -ld Docs
  363  ls -l Docs
  364  ls -ld Docs
  365  chmod u-x Docs
  366  ls -ld Docs
  367  cd Docs
  368  chmod u+rx Docs
  369  cd Docs
  370  ls -l
  371  cd ..
  372  ls -ld Docs
  373  cd Docs
  374  ls -l
  375  touch file1
  376  ls -l
  377  cd ..
  378  chmod u-w Docs
  379  ls -ld Docs
  380  cd Docs
  381  touch file2
  382  ls -l
  383  echo Something > file1
  384  cat file1 
  385  ls -l
  386  cd ..
  387  ls -ld
  388  ls -ld Docs
  389  chmod u+w Docs
  390  chmod -R u-wx Docs
  391  ls -ld Docs
  392  chmod u+wx Docs
  393  chmod u-wx Docs/*
  394  ls -l Docs
  395  chmod -R u+wx Docs
  396  ls -l Docs
  397  chmod u-wx Docs/*
  398  ls -l Docs
  399  chmod -R u+wX Docs
  400  ls -l Docs
  401  chmod --help
  402  ls -l
  403  chmod 755 Docs
  404  ls -l
  405  chmod 640 sample 
  406  ls -l
  407  chmod g+w,o+r sample 
  408  sudo -i
  409  su - carl
  410  sudo -i
  411  ls -l
  412  ls -l /usr/bin/mount
  413  stat /usr/bin/mount
  414  chmod u+s test.sh 
  415  ls -l
  416  su - bill
  417  sudo -i
  418  history
Leave a Comment