Advertisement
sandervanvugt

linfun day2 feb21

Feb 25th, 2021
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.08 KB | None | 0 0
  1. [root@centos2 mnt]# history
  2. 1 ls
  3. 2 cd /proc
  4. 3 ls
  5. 4 cat cpuinfo
  6. 5 cd sys
  7. 6 ls
  8. 7 cd net/
  9. 8 ls
  10. 9 cd ipv6/
  11. 10 ls
  12. 11 cd conf/
  13. 12 ls
  14. 13 cd default/
  15. 14 ls
  16. 15 pwd
  17. 16 cat disable_ipv6
  18. 17 ip a
  19. 18 echo 1 > disable_ipv6
  20. 19 ip a
  21. 20 ls
  22. 21 cd ..
  23. 22 ls
  24. 23 cd all/
  25. 24 echo 1 > disable_ipv6
  26. 25 ip a
  27. 26 history
  28. 27 pwd
  29. 28 exit
  30. 29 ls -il /etc/hosts /home/student/hosts
  31. 30 ls -il /etc/hosts /home/student/myhosts
  32. 31 echo hello >> /etc/hosts
  33. 32 ls -il /etc/hosts /home/student/myhosts
  34. 33 ln -s /home/student/myhosts whatever
  35. 34 ls -il /etc/hosts /home/student/myhosts whatever
  36. 35 rm /home/student/myhosts
  37. 36 ls -il /etc/hosts /home/student/myhosts whatever
  38. 37 cat whatever
  39. 38 ls
  40. 39 \ls
  41. 40 alias
  42. 41 unalias ls
  43. 42 ls
  44. 43 alias help='rm -rf /'
  45. 44 help
  46. 45 which vi
  47. 46 which vim
  48. 47 exit
  49. 48 mkdir linda; find / -user linda -exec cp {} /root/linda \;
  50. 49 exit
  51. 50 tar -cvf myarchive.tar /home /etc
  52. 51 ls
  53. 52 ls -l myarchive.tar
  54. 53 tar -tvf myarchive.tar | less
  55. 54 tar -xvf myarchive.tar
  56. 55 ls
  57. 56 rm -rf etc home
  58. 57 tar -xvf myarchive.tar -C /tmp
  59. 58 ls /tmp
  60. 59 tar -czvf gziparchive.tgz /home /etc
  61. 60 ls -l
  62. 61 tar -cjvf gziparchive.tgz /home /etc
  63. 62 ls -l
  64. 63 tar -cJvf gziparchive.tgz /home /etc
  65. 64 ls -l
  66. 65 head /etc/passwd
  67. 66 head /etc/passwd | tail -1
  68. 67 sudo apt install vim
  69. 68 echo $EDITOR
  70. 69 export EDITOR=/usr/bin/nano
  71. 70 visudo
  72. 71 export EDITOR=/usr/bin/vim
  73. 72 wc /etc/passwd
  74. 73 cat /etc/passwd
  75. 74 head /etc/passwd
  76. 75 head -2 /etc/passwd
  77. 76 tail -2 /etc/passwd
  78. 77 vim myfile
  79. 78 cat myfile
  80. 79 tac myfile
  81. 80 cd /etc/
  82. 81 grep linda *
  83. 82 grep linda * 2>/dev/null
  84. 83 ps aux | grep ssh
  85. 84 ps aux | grep ssh
  86. 85 ps aux | grep ssh | grep -v grep
  87. 86 grep root * 2>/dev/null
  88. 87 grep -l root * 2>/dev/null
  89. 88 grep -lR root * 2>/dev/null
  90. 89 grep --help | grep r
  91. 90 grep --help
  92. 91 grep 'a*' a*
  93. 92 exit
  94. 93 cd /home/linda
  95. 94 vim playme
  96. 95 chmod +x playme
  97. 96 su - linda
  98. 97 exit
  99. 98 history
  100. 99 history -d 98
  101. 100 history
  102. 101 exit
  103. 102 nmcli connection modify ens33 +ipv4.dns 8.8.4.4
  104. 103 nmcli connection up ens33
  105. 104 nmtui
  106. 105 exit
  107. 106 lsblk
  108. 107 umount /dev/sdb1
  109. 108 mount /dev/sdb1 /mnt
  110. 109 cd /mnt
  111. 110 ls
  112. 111 systemctl status sshd
  113. 112 vim follow-up.txt
  114. 113 history
  115.  
  116.  
  117. ######
  118. [student@centos2 ~]$ history
  119. 1 w
  120. 2 whoami
  121. 3 ls
  122. 4 ls -l
  123. 5 cd desktop
  124. 6 cd Desktop/
  125. 7 ls
  126. 8 cd ..
  127. 9 chvt 3
  128. 10 sudo chvt 3
  129. 11 history
  130. 12 ls
  131. 13 useradd linda
  132. 14 sudo useradd linda
  133. 15 sudo passwd linda
  134. 16 su - linda
  135. 17 id
  136. 18 sudo usermod -aG wheel linda
  137. 19 id linda
  138. 20 sudo visudo
  139. 21 history
  140. 22 su - linda
  141. 23 sudo apt install vim
  142. 24 sudo dnf install vim
  143. 25 sudo yum install vim
  144. 26 vim countdown
  145. 27 countdown 12
  146. 28 ./countdown 12
  147. 29 ls -l countdown
  148. 30 chmod +x countdown
  149. 31 ./countdown 12
  150. 32 vimtutor
  151. 33 ./countdown 13
  152. 34 history
  153. 35 nano countdown
  154. 36 vim countdown
  155. 37 history
  156. 38 echo $PATH
  157. 39 cp countdown /usr/local/bin/
  158. 40 sudo cp countdown /usr/local/bin/
  159. 41 countdown 0
  160. 42 history
  161. 43 cat countdown
  162. 44 ip a
  163. 45 sudo nmtui
  164. 46 ip a
  165. 47 sudo apt install openssh-server
  166. 48 sudo systemctl status openssh-server
  167. 49 sudo systemctl status sshd
  168. 50 ip a
  169. 51 chsh --help
  170. 52 chsh -l
  171. 53 whoami
  172. 54 w
  173. 55 hostname
  174. 56 date
  175. 57 date --help | less
  176. 58 date --help
  177. 59 date --help | less
  178. 60 uname
  179. 61 uname --help
  180. 62 uname --all
  181. 63 passwd
  182. 64 touch mynewfile
  183. 65 cd /usr
  184. 66 touch newfile
  185. 67 cd
  186. 68 ls -l
  187. 69 touch countdown
  188. 70 ls -l countdown
  189. 71 last
  190. 72 countdown 12
  191. 73 man useradd
  192. 74 man semanage-fcontext
  193. 75 man -k user
  194. 76 man man
  195. 77 man apropos
  196. 78 man mandb
  197. 79 man man
  198. 80 sudo mandb
  199. 81 man -k user
  200. 82 man -k user | wc
  201. 83 man -k user
  202. 84 man -k user | grep 8
  203. 85 man -k user | grep 8 | wc
  204. 86 history
  205. 87 man uname
  206. 88 man 2 uname
  207. 89 man -a uname
  208. 90 man passwd
  209. 91 man 5 passwd
  210. 92 man ls
  211. 93 pinfo '(coreutils) ls invocation'
  212. 94 info '(coreutils) ls invocation'
  213. 95 cd /etc
  214. 96 ls -l
  215. 97 ls | wc
  216. 98 ls
  217. 99 ls -l grub2.cfg
  218. 100 history
  219. 101 ls -lrt
  220. 102 cat shadow
  221. 103 sudo cat shadow
  222. 104 echo $PATH
  223. 105 cd
  224. 106 ls
  225. 107 ls -a
  226. 108 echo hello > .hello
  227. 109 ls
  228. 110 ls -a
  229. 111 cat .hello
  230. 112 cd /etc
  231. 113 ls
  232. 114 ls a*
  233. 115 ls -d a*
  234. 116 ls -d a*/b*
  235. 117 ls -d a*/*
  236. 118 ls -d a*/a*
  237. 119 ls a?????
  238. 120 ls ?????
  239. 121 ls -d ?????
  240. 122 ls -d g????
  241. 123 ls ??a* -d
  242. 124 ls ??[ab]* -d
  243. 125 ls ??[a-e]* -d
  244. 126 ls -d a*
  245. 127 ls a* -d
  246. 128 cd
  247. 129 mkdir blah
  248. 130 cp /etc/hosts blah/
  249. 131 rmdir blah
  250. 132 rm -rf blah/
  251. 133 history
  252. 134 cd /
  253. 135 ls
  254. 136 ls -l
  255. 137 man hier
  256. 138 cd usr
  257. 139 ls
  258. 140 ldd /usr/bin/passwd
  259. 141 ldd /usr/bin/ls
  260. 142 ls
  261. 143 ls local
  262. 144 cd src
  263. 145 ls
  264. 146 cd kernels/
  265. 147 ;ls
  266. 148 ls
  267. 149 cd /
  268. 150 cd /usr
  269. 151 du -hs
  270. 152 cd /
  271. 153 ls
  272. 154 cd /var
  273. 155 ls
  274. 156 cd log
  275. 157 ls
  276. 158 ls -l
  277. 159 ls -lrt
  278. 160 sudo journalctl
  279. 161 cd /etc
  280. 162 ls
  281. 163 history
  282. 164 tail /etc/passwd
  283. 165 cd /
  284. 166 ls
  285. 167 cd boot
  286. 168 ls -l
  287. 169 cd
  288. 170 cd /
  289. 171 ls
  290. 172 cd dev
  291. 173 ls
  292. 174 w
  293. 175 sudo -i
  294. 176 cd
  295. 177 pwd
  296. 178 touch hello
  297. 179 ls
  298. 180 cd ..
  299. 181 pwd
  300. 182 echo hello > lhk
  301. 183 cd /tmp
  302. 184 ls
  303. 185 sudo -i
  304. 186 su -
  305. 187 exit
  306. 188 env
  307. 189 bash
  308. 190 su - linda
  309. 191 su linda
  310. 192 man proc
  311. 193 cd /var
  312. 194 sudo tail log/messages
  313. 195 cd log
  314. 196 sudo tail log/messages
  315. 197 pwd
  316. 198 sudo tail log /var/log/messages
  317. 199 history
  318. 200 cd ..
  319. 201 ls
  320. 202 cd games
  321. 203 ls
  322. 204 sudo tail ../log/messages
  323. 205 cd /usr/local/src
  324. 206 sudo tail ../../../var/log/messages
  325. 207 sudo tail /var/log/messages
  326. 208 history
  327. 209 cd /etc
  328. 210 less profile
  329. 211 ls /etc/profile.d/
  330. 212 less bashrc
  331. 213 cd
  332. 214 ls -a
  333. 215 cat .bashrc
  334. 216 cat .bash_profile
  335. 217 cp /etc/hosts .
  336. 218 ls
  337. 219 cp /etc/hosts /tmp/sander
  338. 220 ls -l /tmp/sander
  339. 221 rm /tmp/sander
  340. 222 cp /etc/hosts /tmp/sander/
  341. 223 mkdir /tmp/sander/
  342. 224 cp /etc/hosts /tmp/sander/
  343. 225 ls -l /tmp/sander/
  344. 226 cp -a ~/.* /tmp/sander/
  345. 227 ls -a /tmp/sander/
  346. 228 cp --help | less
  347. 229 cp -R /etc /tmp/sander/
  348. 230 ls /tmp/sander/
  349. 231 ls /tmp/sander/etc
  350. 232 history
  351. 233 ls
  352. 234 mv hello /tmp/sander/bye
  353. 235 echo sh > goedemiddag
  354. 236 mv goedemiddag /tmp/sander/bonjour
  355. 237 ls /tmp/sander/goedemiddag /tmp/sander/bonjour
  356. 238 cd /etc/profile.d/
  357. 239 ls
  358. 240 cd /
  359. 241 ls -l
  360. 242 countdown 12
  361. 243 cd
  362. 244 sudo updatedb
  363. 245 ln /etc/hosts myhosts
  364. 246 sudo ln /etc/hosts myhosts
  365. 247 ls -il /etc/hosts myhosts
  366. 248 sudo echo hello >> myhosts
  367. 249 sudo -c echo hello >> myhosts
  368. 250 sudo 'echo hello >> myhosts'
  369. 251 sudo --help
  370. 252 sudo -i
  371. 253 which vi
  372. 254 which vim
  373. 255 ls -l $(which vi) $(which vim)
  374. 256 ls -l /bin/vi $(which vim)
  375. 257 ls -l /usr/bin/vi $(which vim)
  376. 258 find / -name "hosts"
  377. 259 find / -name "hosts" 2>/dev/null
  378. 260 find / -name "*hosts*" 2>/dev/null
  379. 261 find / -user linda
  380. 262 find / -user linda 2>/dev/null
  381. 263 sudo find / -size +1G 2>/dev/null
  382. 264 sudo -i
  383. 265 find / -name "hosts"
  384. 266 find / -name "hosts" 2> errors.txt
  385. 267 find / -name "hosts" > outputtxt
  386. 268 cat outputtxt
  387. 269 echo hello > hellofile
  388. 270 man find
  389. 271 sudo -i
  390. 272 countdown 12
  391. 273 vim myfile
  392. 274 grep 'anna' my
  393. 275 grep 'anna' myfile
  394. 276 grep '^anna' myfile
  395. 277 grep 'anna$' myfile
  396. 278 grep '^anna$' myfile
  397. 279 echo lea >> myfile
  398. 280 echo lea nna >> myfile
  399. 281 grep '^lea\b' myfile
  400. 282 grep 'b*t' myfile
  401. 283 grep 'bi*t' myfile
  402. 284 grep 'bi+t' myfile
  403. 285 grep -E 'bi+t' myfile
  404. 286 grep -E 'bi?t' myfile
  405. 287 grep -E 'bi\{4\}t' myfile
  406. 288 grep 'bi\{4\}t' myfile
  407. 289 grep 'b.t' myfile
  408. 290 man semanage-fcontext
  409. 291 tail -1 /etc/passwd
  410. 292 tail -1 /etc/passwd | cut -f 1
  411. 293 tail -1 /etc/passwd | cut -f 1 -d :
  412. 294 cut -f 1 -d : /etc/passwd
  413. 295 cut -f 1 -d : /etc/passwd | sort
  414. 296 vim numbers
  415. 297 sort numbers
  416. 298 sort -n numbers
  417. 299 vim numbers
  418. 300 uniq numbers
  419. 301 uniq --help
  420. 302 uniq -u numbers
  421. 303 uniq -d numbers
  422. 304 cat numbers | uniq -d
  423. 305 cat numbers | uniq -c
  424. 306 sed -n 5p /etc/passwd
  425. 307 sed -i s/lea/bea/g myfile
  426. 308 cat myfile
  427. 309 sed -i -e '2d' myfile
  428. 310 echo hello > a.conf
  429. 311 echo hello > ab.conf
  430. 312 echo hello > abc.conf
  431. 313 for i in *conf; do sed -i 's/hello/bye/g' $i; done
  432. 314 cat *conf
  433. 315 awk -F : '{ print $4 }' /etc/passwd
  434. 316 awk -F : '/linda/ { print $4 }' /etc/passwd
  435. 317 awk -F : '$3 > 999 { print $1 }' /etc/password
  436. 318 awk -F : '$3 > 999 { print $1 }' /etc/passwd
  437. 319 pinfo sed
  438. 320 exit
  439. 321 sudo -i
  440. 322 history
  441. 323 sudo -i
  442. 324 oc login -u mysecretuser -p iuwgehkugguiggwkehiwiugbuiwguibguigiuguiygu
  443. 325 touch newfile
  444. 326 uniq -d numbers
  445. 327 sudo -i
  446. 328 countdown 12
  447. 329 echo $PATH
  448. 330 echo $USER
  449. 331 echo $SHELL
  450. 332 export drink=BEER
  451. 333 echo $drink
  452. 334 bash
  453. 335 sleep 3000
  454. 336 sleep 3600
  455. 337 jobs
  456. 338 bg
  457. 339 sleep 3700 &
  458. 340 jobs
  459. 341 fg 2
  460. 342 sudo -
  461. 343 sudo -i
  462. 344 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement