Advertisement
sandervanvugt

l3h dec23

Dec 20th, 2023
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. #### on Centos
  2. https://learning.oreilly.com/course/linux-essentials-for/9780137935611/[student@localhost linuxin3hours]$ history
  3. 1 ls
  4. 2 useradd bob
  5. 3 sudo useradd bob
  6. 4 sudo su
  7. 5 sudo -i
  8. 6 nano counter
  9. 7 ls
  10. 8 history
  11. 9 cat countdown
  12. 10 id student
  13. 11 su -
  14. 12 cat countdown
  15. 13 ls -l countdown
  16. 14 chmod +x countdown
  17. 15 ls -l countdown
  18. 16 countdown
  19. 17 echo $PATH
  20. 18 pwd
  21. 19 ./countdown 1
  22. 20 cp countdown /usr/local/bin/
  23. 21 sudo cp countdown /usr/local/bin/
  24. 22 countdown 1
  25. 23 cat countdown
  26. 24 history
  27. 25 sudo dnf install git
  28. 26 git clone https://github.com/sandervanvugt/linuxin3hours
  29. 27 cd linuxin3hours/
  30. 28 ls
  31. 29 which git
  32. 30 history
  33. 31 cat /etc/os-release
  34. 32 ls /home/$USER
  35. 33 ls /home
  36. 34 ls /tmp
  37. 35 ls /usr/bin
  38. 36 ls /usr/bin | wc -l
  39. 37 ls /usr/sbin
  40. 38 ls /etc
  41. 39 cat /etc/os-release
  42. 40 cat /etc/passwd
  43. 41 history
  44. 42 find / -name "hosts"
  45. 43 find / -name "hosts" 2> /dev/null
  46. 44 find / -name "*hosts*" 2> /dev/null
  47. 45 cat /etc/passwd
  48. 46 grep bob /etc/passwd
  49. 47 grep bob *
  50. 48 grep bob /etc/* 2>/dev/null
  51. 49 which countdown
  52. 50 find / -name "countdown" 2>/dev/null
  53. 51 man hier
  54. 52 sudo find / -name "passwd"
  55. 53 sudo find / -name "passwd" 2> /dev/null
  56. 54 history
  57. 55 man -k sander
  58. 56 man -k user
  59. 57 sudo mandb
  60. 58 man -k user
  61. 59 man -k user | wc -l
  62. 60 man -k user | grep create
  63. 61 useradd --help
  64. 62 useradd --help | less
  65. 63 history
  66. 64 man unminimize
  67. 65 man grep
  68. 66 grep --help
  69. 67 grep --help | grep case
  70. 68 countdown 10
  71. 69 ssh student@192.168.29.139
  72. 70 lsblk
  73. 71 sudo umount /dev/sdb1
  74. 72 lsblk
  75. 73 sudo mount /dev/sdb1 /mnt
  76. 74 ls /mnt
  77. 75 echo helloagain > /mnt/helloagain
  78. 76 sudo cp /etc/hosts /mnt/
  79. 77 lsblk
  80. 78 touch /run/media/student/SanDisk/hellofolks
  81. 79 ls -l /run/media/student/SanDisk/
  82. 80 history
  83. 81 umount /dev/sdc1
  84. 82 history
  85.  
  86. ###on Ubuntustudent@student-virtual-machine:~$ history
  87. 1 ps aux
  88. 2 ps aux | grep ssh
  89. 3 sudo apt install openssh-server
  90. 4 ps aux | grep ssh
  91. 5 top
  92. 6 systemctl status sshd
  93. 7 sudo systemctl stop sshd
  94. 8 systemctl status sshd
  95. 9 sudo systemctl start sshd
  96. 10 systemctl status sshd
  97. 11 sudo systemctl disable --now sshd
  98. 12 sudo systemctl status sshd
  99. 13 sudo systemctl status ssh
  100. 14 sudo systemctl stop ssh
  101. 15 sudo systemctl list-unit-files
  102. 16 #sudo systemctl list-unit-files
  103. 17 ps aux | grep ssh
  104. 18 sudo systemctl enable --now ssh
  105. 19 ps aux | grep ssh
  106. 20 pidof sshd
  107. 21 sudo kill $(pidof sshd)
  108. 22 sudo systemctl status ssh
  109. 23 sudo systemctl start ssh
  110. 24 ps aux | grep ssh
  111. 25 sudo top
  112. 26 ip addr show
  113. 27 ifconfig
  114. 28 sudo ufw status
  115. 29 history
  116.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement