chestnutj2000

sanderLinuxIn3hrsOct022020

Oct 2nd, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [student@localhost ~]$ cat countdown
  2. #!/bin/bash
  3.  
  4. COUNTER=$1
  5. COUNTER=$(( COUNTER * 60 ))
  6.  
  7. while true
  8. do
  9.     echo $COUNTER seconds remaining in break
  10.     sleep 1
  11.     COUNTER=$(( COUNTER - 1 ))
  12. done
  13. [student@localhost ~]$ history
  14.     1  sudo systemctl isolate multi-user.target
  15.     2  sudo systemctl status sshd
  16.     3  sudo firewall-cmd --list-all
  17.     4  ip a
  18.     5  vim countdown
  19.     6  countdown
  20.     7  ./countdown
  21.     8  chmod +x countdown
  22.     9  ./countdown 12
  23.    10  history
  24.    11  ls -l countdown
  25.    12  echo $PATH
  26.    13  countdown
  27.    14  pwd
  28.    15  cp countdown /usr/local/bin
  29.    16  sudo cp countdown /usr/local/bin
  30.    17  countdown 0
  31.    18  history
  32.    19  man hier
  33.    20  man cp
  34.    21  man hier
  35.    22  man usr
  36.    23  useradd linda
  37.    24  sudo useradd linda
  38.    25  sudo passwd linda
  39.    26  su - linda
  40.    27  id
  41.    28  sudo -i
  42.    29  cat countdown
  43.    30  history
  44.  
  45.  
  46. ROOT COMMANDS[root@localhost ~]# history
  47.     1  whoami
  48.     2  systemctl isolate graphical.target
  49.     3  whoami
  50.     4  cd /
  51.     5  ls
  52.     6  ls -l
  53.     7  cd /usr
  54.     8  ls
  55.     9  cd /
  56.    10  ls
  57.    11  cd etc
  58.    12  ls
  59.    13  cat passwd
  60.    14  cat shadow
  61.    15  grep linda *
  62.    16  grep linda * 2>/dev/null
  63.    17  grep -R linda * 2>/dev/null
  64.    18  cd /
  65.    19  ls
  66.    20  cd boot
  67.    21  ls -l
  68.    22  lsmod
  69.    23  lsmod | less
  70.    24  lsblk
  71.    25  cd /
  72.    26  umount /dev/sdb1
  73.    27  umount /boot
  74.    28  ls /boot
  75.    29  cd boot
  76.    30  ls
  77.    31  lsblk
  78.    32  cd
  79.    33  mount /dev/sda1 /boot
  80.    34  ls /boot/
  81.    35  lsblk
  82.    36  cd /dev
  83.    37  ls -l
  84.    38  ls
  85.    39  cd
  86.    40  cd /
  87.    41  ls
  88.    42  cd /tmp
  89.    43  ls
  90.    44  cd /var
  91.    45  ls
  92.    46  cd log
  93.    47  ls
  94.    48  cd /
  95.    49  cd proc
  96.    50  ls
  97.    51  cat cpuinfo
  98.    52  cd
  99.    53  ls -l /etc/hosts
  100.    54  ls -l -a
  101.    55  ls -la
  102.    56  netstat -tulpen
  103.    57  ps -axf
  104.    58  ps -fax
  105.    59  echo hello > hellofile
  106.    60  cat hellofile
  107.    61  history
  108.    62  ls -a
  109.    63  env
  110.    64  env | grep HIST
  111.    65  history
  112.    66  history -d 61
  113.    67  echo $PATH
  114.    68  ln /usr/local/bin/countdown /usr/local/sbin/countdown
  115.    69  countdown 12
  116.    70  man password
  117.    71  man -k user
  118.    72  mandb
  119.    73  man -k user
  120.    74  man -k user | wc
  121.    75  man man
  122.    76  man -k user | grep 8
  123.    77  man useradd
  124.    78  man semanage-fcontext
  125.    79  useradd --help
  126.    80  rpm -qa | grep bash
  127.    81  nmcli connection add con-name democon ipv4.method manual ipv4.addresses 192.168.4.150/24 ipv4.gateway ipv4.dns 8.8.8.8
  128.    82  nmcli connection add con-name democon ipv4.method manual ipv4.addresses 192.168.4.150/24 ipv4.gateway 192.168.4.2 ipv4.dns 8.8.8.8
  129.    83  nmcli connection add con-name democon ipv4.method manual ipv4.addresses 192.168.4.150/24 ipv4.gateway 192.168.4.2 ipv4.dns 8.8.8.8 type ethernet
  130.    84  sleep 3600
  131.    85  jobs
  132.    86  bg
  133.    87  jobs
  134.    88  ps aux
  135.    89  kill 41825
  136.    90  jobs
  137.    91  dd if=/dev/zero of=/dev/null &
  138.    92  top
  139.    93  ps aux | less
  140.    94  id student
  141.    95  id linda
  142.    96  usermod -aG wheel linda
  143.    97  id linsda
  144.    98  id linda
  145.    99  usermod -aG docker linda
  146.   100  ls -l /etc/passwd /etc/shadow
  147.   101  cat /etc/shadow
  148.   102  ls -l /etc/passwd /etc/shadow
  149.   103  echo hello > /tmp/testfile
  150.   104  chown linda /tmp/testfile
  151.   105  chmod 077 /tmp/testfile
  152.   106  ls -l /tmp/testfile
  153.   107  su - linda
  154.   108  touch removeme
  155.   109  chattr +i removeme
  156.   110  ls -l
  157.   111  rm -f removeme
  158.   112  lsattr
  159.   113  chattr -i removeme
  160.   114  rm -f removeme
  161.   115  history
  162.   116  nmcli con show
  163.   117  nmcli connection up democon
  164.   118  nmcli con show
  165.   119  ip a
  166.   120  ip addr add dev ens33 10.0.0.10/24
  167.   121  ping 10.0.0.10
  168.   122  ip a
  169.   123  ifconfig
  170.   124  ifconfig -a
  171.   125  man ifconfig
  172.   126  which ifconfig
  173.   127  rpm -qf $(which ifconfig)
  174.   128  rpm -ql net-tools
  175.   129  yum delete net-tools
  176.   130  yum remove net-tools
  177.   131  ip route show
  178.   132  cat /etc/resolv.conf
  179.   133  cd /
  180.   134  ls -l
  181.   135  yum install nmap
  182.   136  apt-get install nmap
  183.   137  exit
  184.   138  history
  185.  
Add Comment
Please, Sign In to add comment