sandervanvugt

l3h dec23

Dec 20th, 2023
191
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. 70 lsblk
  72. 71 sudo umount /dev/sdb1
  73. 72 lsblk
  74. 73 sudo mount /dev/sdb1 /mnt
  75. 74 ls /mnt
  76. 75 echo helloagain > /mnt/helloagain
  77. 76 sudo cp /etc/hosts /mnt/
  78. 77 lsblk
  79. 78 touch /run/media/student/SanDisk/hellofolks
  80. 79 ls -l /run/media/student/SanDisk/
  81. 80 history
  82. 81 umount /dev/sdc1
  83. 82 history
  84.  
  85. ###on Ubuntustudent@student-virtual-machine:~$ history
  86. 1 ps aux
  87. 2 ps aux | grep ssh
  88. 3 sudo apt install openssh-server
  89. 4 ps aux | grep ssh
  90. 5 top
  91. 6 systemctl status sshd
  92. 7 sudo systemctl stop sshd
  93. 8 systemctl status sshd
  94. 9 sudo systemctl start sshd
  95. 10 systemctl status sshd
  96. 11 sudo systemctl disable --now sshd
  97. 12 sudo systemctl status sshd
  98. 13 sudo systemctl status ssh
  99. 14 sudo systemctl stop ssh
  100. 15 sudo systemctl list-unit-files
  101. 16 #sudo systemctl list-unit-files
  102. 17 ps aux | grep ssh
  103. 18 sudo systemctl enable --now ssh
  104. 19 ps aux | grep ssh
  105. 20 pidof sshd
  106. 21 sudo kill $(pidof sshd)
  107. 22 sudo systemctl status ssh
  108. 23 sudo systemctl start ssh
  109. 24 ps aux | grep ssh
  110. 25 sudo top
  111. 26 ip addr show
  112. 27 ifconfig
  113. 28 sudo ufw status
  114. 29 history
  115.  
Advertisement
Add Comment
Please, Sign In to add comment