Advertisement
sandervanvugt

linfun nov23 day2

Nov 2nd, 2023
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.40 KB | None | 0 0
  1. 1 reboot
  2. 2 ls /root
  3. 3 whoami
  4. 4 sudo ls /root
  5. 5 id
  6. 6 whoami
  7. 7 sudo useradd linda
  8. 8 sudo passwd linda
  9. 9 su - linda
  10. 10 history
  11. 11 sudo -i
  12. 12 sudo su -
  13. 13 ssh 192.168.29.143
  14. 14 ls
  15. 15 LS
  16. 16 ls -l
  17. 17 ps aux
  18. 18 history
  19. 19 ls --help
  20. 20 ls --help | less
  21. 21 ls -all
  22. 22 ls --all
  23. 23 ls -l -r -t
  24. 24 ls -lrt
  25. 25 ls --help | less
  26. 26 whoami
  27. 27 whoami --help
  28. 28 hostname
  29. 29 hostnamectl set-hostname linfun.example.com
  30. 30 hostnamectl --help
  31. 31 date
  32. 32 uname
  33. 33 uname --help
  34. 34 uname --all
  35. 35 exit
  36. 36 ./countdown 12
  37. 37 ./countdown 1
  38. 38 ./countdown 5
  39. 39 ./countdown 12
  40. 40 ./countdown 1
  41. 41 ./countdown 7
  42. 42 ./countdown 12
  43. 43 sudo id linda
  44. 44 sudo usermod -aG wheel linda
  45. 45 sudo id linda
  46. 46 ls -l /etc/hosts
  47. 47 sudo groupadd sales
  48. 48 sudo usermod -aG sales linda
  49. 49 id linda
  50. 50 sudo mkdir /data/sales -p
  51. 51 ls -ld /data/sales
  52. 52 chown linda /data/sales
  53. 53 sudo chown linda /data/sales
  54. 54 sudo chown :sales /data/sales
  55. 55 ls -ld /data/sales
  56. 56 chmod 770 /data/sales
  57. 57 sudo chmod 770 /data/sales
  58. 58 ls -ld /data/sales
  59. 59 exit
  60. 60 history
  61. 61 passwd linda
  62. 62 touch hello
  63. 63 ls
  64. 64 pwd
  65. 65 cd /
  66. 66 touch hello
  67. 67 cd
  68. 68 ls -l
  69. 69 touch hello
  70. 70 ls -l
  71. 71 history
  72. 72 vim countdown
  73. 73 countdown 12
  74. 74 ./countdown 12
  75. 75 chmod +x countdown
  76. 76 history
  77. 77 cat countdown
  78. 78 countdown 12
  79. 79 echo $PATH
  80. 80 ls -l countdown
  81. 81 nano countdown
  82. 82 echo $(( 2 * 6 ))
  83. 83 man ls
  84. 84 man man
  85. 85 man -k user
  86. 86 man man
  87. 87 man apropos
  88. 88 man mandb
  89. 89 mandb
  90. 90 man mandb
  91. 91 sudo mandb
  92. 92 man -k user
  93. 93 man -k user | grep 8
  94. 94 man ls
  95. 95 pinfo '(coreutils) ls invocation'
  96. 96 history
  97. 97 homebrew
  98. 98 man -k hostname
  99. 99 man hostnamectl
  100. 100 history | grep hostnamectl
  101. 101 lvcreate --help | less
  102. 102 history
  103. 103 pwd
  104. 104 ls
  105. 105 ls -a
  106. 106 ls -al
  107. 107 ls -ld ..
  108. 108 cd ..
  109. 109 cd /etc
  110. 110 ls
  111. 111 ls -l passwd
  112. 112 cat passwd
  113. 113 ls a*
  114. 114 ls -d a*
  115. 115 pwd
  116. 116 ls A*
  117. 117 ls -d a?*
  118. 118 ls -d a?b*
  119. 119 ls -d a?a*
  120. 120 ls -d a?[ao]*
  121. 121 ls -d a?[a-f]*
  122. 122 mkdir hello
  123. 123 cd
  124. 124 mkdir hello
  125. 125 ls -l
  126. 126 mkdir bye
  127. 127 ls
  128. 128 cd bye
  129. 129 touch hello
  130. 130 ls
  131. 131 pwd
  132. 132 cd ..
  133. 133 rmdir bye/
  134. 134 rm -r bye/
  135. 135 rm -rf bye/
  136. 136 ls
  137. 137 echo $?
  138. 138 cd /
  139. 139 ls
  140. 140 ls /
  141. 141 ssh 192.168.29.143
  142. 142 man hier
  143. 143 cd /var
  144. 144 ls
  145. 145 ls log
  146. 146 cd /usr
  147. 147 ls
  148. 148 cd sbin
  149. 149 ls
  150. 150 man rtmon
  151. 151 cd ..
  152. 152 ls
  153. 153 cd local
  154. 154 ls
  155. 155 ls ~
  156. 156 countdown
  157. 157 cp ~/countdown /usr/local/bin/
  158. 158 sudo cp ~/countdown /usr/local/bin/
  159. 159 countdown
  160. 160 echo $PATH
  161. 161 pwd
  162. 162 sudo cp ~/countdown bin/
  163. 163 cd ../sbin
  164. 164 pwd
  165. 165 cd local
  166. 166 cd ../local
  167. 167 cd sbin
  168. 168 pwd
  169. 169 sudo cp ~/countdown ../bin
  170. 170 cd
  171. 171 ls
  172. 172 cp countdown scripts/
  173. 173 cp countdown scripts
  174. 174 ls
  175. 175 rm scripts
  176. 176 mkdir hidden
  177. 177 cp -a * hidden/
  178. 178 ls -al hidden/
  179. 179 rm -f hidden/*
  180. 180 rm -fr hidden/*
  181. 181 cp -a .* hidden/
  182. 182 ls -al hidden/
  183. 183 cd
  184. 184 ls
  185. 185 mv hello goodbye
  186. 186 ls
  187. 187 history
  188. 188 cat /etc/os-release
  189. 189 cp /etc/hosts .
  190. 190 ls -il /etc/hosts hosts
  191. 191 ln hosts linked
  192. 192 ls -il hosts linked
  193. 193 echo hello
  194. 194 echo hello >> hosts
  195. 195 ls -il hosts linked
  196. 196 cat linked
  197. 197 ln -s hosts symlink
  198. 198 ls -il hosts linked symlink
  199. 199 cat symlink
  200. 200 rm hosts
  201. 201 ls -il hosts linked symlink
  202. 202 cat symlink
  203. 203 ls
  204. 204 cat linked
  205. 205 cd /
  206. 206 ls -l
  207. 207 history
  208. 208 cd /etc
  209. 209 ls -l hosts
  210. 210 find / -name "hosts"
  211. 211 find / -name "hosts" 2> /dev/null
  212. 212 find / -name "*hosts*" 2> /dev/null
  213. 213 find / -user linda
  214. 214 find / -user linda 2>/dev/null
  215. 215 find / -type f -user linda 2>/dev/null
  216. 216 sudo find / -size +500M
  217. 217 sudo mkdir /root/linda ; sudo find / -user linda -exec cp {} /root/linda/ \;
  218. 218 sudo mkdir /root/linda ; sudo find / -user linda -exec cp -r {} /root/linda/ \;
  219. 219 sudo find / -user linda -exec ls -al {} \; -exec cp {} /root/linda/ \;
  220. 220 sudo find / -user linda -exec ls -dal {} \; -exec cp -r {} /root/linda/ \;
  221. 221 cd
  222. 222 sudo tar -cvf etc.tar /etc
  223. 223 ls
  224. 224 ls -l etc.tar
  225. 225 sudo tar -czvf etc.tar.gz /etc
  226. 226 ls -l etc*
  227. 227 sudo tar -cjvf etc.tar.bz /etc
  228. 228 ls -l etc*
  229. 229 sudo tar -cJvf etc.tar.xz /etc
  230. 230 ls -l etc*
  231. 231 tar -tvf etc.tar.gz
  232. 232 tar xvf etc.tar.xz
  233. 233 ls
  234. 234 ls etc
  235. 235 history
  236. 236 mkdir -p /tmp/files/pictures /tmp/files/photos /tmp/files/videos
  237. 237 tree /tmp/files
  238. 238 sudo dnf install tree
  239. 239 sudo cp /etc/[abc]* /tmp/files/
  240. 240 cd /tmp/files
  241. 241 ls
  242. 242 mv [ab]* photos/
  243. 243 mv c* videos/
  244. 244 tree
  245. 245 ls -lr
  246. 246 ls -lR
  247. 247 man find
  248. 248 sudo find /etc -size -1000c -exec cp {} /tmp/files/pictures/
  249. 249 sudo find /etc -size -1000c -exec cp {} /tmp/files/pictures/ \;
  250. 250 tree
  251. 251 history
  252. 252 ln -s /var var
  253. 253 ls
  254. 254 ls -l
  255. 255 cd
  256. 256 tar czvf home.tgz /home
  257. 257 sudo tar czvf /tmp/home.tgz /home
  258. 258 history
  259. 259 mkdir /tmp/archive
  260. 260 cd /tmp/archive/
  261. 261 tar -xvf ../home.tgz .
  262. 262 tar -xvf ../home.tgz
  263. 263 ls
  264. 264 tree
  265. 265 history
  266. 266 cd
  267. 267 nano countdown
  268. 268 vim vimcommands
  269. 269 cat vimcommands
  270. 270 tail /etc/passwd
  271. 271 head /etc/passwd
  272. 272 tail -5 /etc/passwd
  273. 273 tail -5 /etc/passwd | head -1
  274. 274 cat countdown
  275. 275 tac countdown
  276. 276 cd /etc
  277. 277 grep linda * 2>/dev/null
  278. 278 grep -l linda * 2>/dev/null
  279. 279 ps aux | grep ssh
  280. 280 alias
  281. 281 ps aux | grep ssh | grep -v grep
  282. 282 grep -i linda *
  283. 283 grep -i allow * -A 5
  284. 284 grep -i allow * -B 5 2>/dev/null
  285. 285 grep -i allow * -C 3 2>/dev/null
  286. 286 grep -l linda *
  287. 287 grep -l linda * 2>/dev/null
  288. 288 grep -lR linda * 2>/dev/null
  289. 289 echo PATH
  290. 290 echo $PATH
  291. 291 echo '$PATH'
  292. 292 man 7 regex
  293. 293 d
  294. 294 cd
  295. 295 vim textfile
  296. 296 grep 'l' textfile
  297. 297 vim textfile
  298. 298 grep 'l' textfile
  299. 299 grep '^l' textfile
  300. 300 grep 'anna$' textfile
  301. 301 grep '^$' textfile
  302. 302 grep 'anna\b' textfile
  303. 303 grep '^anna\b' textfile
  304. 304 grep 'b.*t' textfile
  305. 305 vim textfile
  306. 306 grep 'b.*t' textfile
  307. 307 grep 'b.+t' textfile
  308. 308 grep -E 'b.+t' textfile
  309. 309 grep -E 'b.?t' textfile
  310. 310 grep 'b.\{4\}t' textfile
  311. 311 vim textfile
  312. 312 grep 'b.\{4\}t' textfile
  313. 313 grep 'bo\{4\}t' textfile
  314. 314 grep -E 'ba+t' textfile
  315. 315 grep -E 'bo+t' textfile
  316. 316 history
  317. 317 sed -n 5p /etc/passwd
  318. 318 sed s/anna/onno/g textfile
  319. 319 cat textfile
  320. 320 sed -i -e '2d' textfile
  321. 321 cat textfile
  322. 322 echo hello > {1..9}.txt
  323. 323 echo hello 1.txt
  324. 324 echo hello > 1.txt
  325. 325 echo hello > 2.txt
  326. 326 echo hello > 3.txt
  327. 327 for i in *txt; do sed -i 's/hello/coffee/' $i; done
  328. 328 cat 3.txt
  329. 329 cat /etc/passwd
  330. 330 awk -F : '{ print $4 }' /etc/passwd
  331. 331 cat /etc/passwd
  332. 332 awk -F : '/linda/ { print $3 }' /etc/passwd
  333. 333 awk -F : '$3 > 999 { print $1 }' /etc/passwd
  334. 334 pinfo sed
  335. 335 history
  336. 336 grep root /etc/*
  337. 337 grep root /etc/* 2>/dev/null
  338. 338 grep root /etc/* &>/dev/null
  339. 339 ps aux | tee psfile | grep ssh
  340. 340 less psfile
  341. 341 sudo sh -c "echo password | passwd --stdin linda"
  342. 342 history
  343. 343 history -d 318
  344. 344 history
  345. 345 history -d 318
  346. 346 for i in *txt; do sed -i 's/hello/coffee/' $i; done
  347. 347 ls -a
  348. 348 sudo userhelper --help
  349. 349 touch kughkuguiguyfuyfytdtydyfyguikhkhvghfdtydtrdytfyugfgkuhguigfudytdytufiyuguigiuguigg
  350. 350 ls
  351. 351 rm kughkuguiguyfuyfytdtydyfyguikhkhvghfdtydtrdytfyugfgkuhguigfudytdytufiyuguigiuguigg
  352. 352 echo $HISTFILESIZE
  353. 353 export HISTFILESIZE=100000
  354. 354 echo $SHELL
  355. 355 echo $USER
  356. 356 echo $PATH
  357. 357 env
  358. 358 alias
  359. 359 less /etc/bashrc
  360. 360 ssh 192.168.29.143
  361. 361 alias sander='echo is it coffetime'
  362. 362 sander
  363. 363 sleep 300
  364. 364 vim /etc/profile
  365. 365 cd /etc/profile.d/
  366. 366 ls
  367. 367 cd
  368. 368 vim /etc/modprobe.d/
  369. 369 ls -a
  370. 370 vim .bash_logout
  371. 371 vim /etc/bashrc
  372. 372 vim .bashrc
  373. 373 sleep infinity
  374. 374 jobs
  375. 375 bg
  376. 376 jobs
  377. 377 fg
  378. 378 sleep infinity &
  379. 379 ps aux
  380. 380 kill 44688
  381. 381 kill 3417
  382. 382 who
  383. 383 sudo dd if=/dev/zero of=/dev/null &
  384. 384 jobs
  385. 385 sudo -i
  386. 386 history
  387. 387 ps aux
  388. 388 ps aux | less
  389. 389 ps faux | less
  390. 390 ps -ef
  391. 391 sudo -i
  392. 392 ip a
  393. 393 man ifconfig
  394. 394 ip route show
  395. 395 ping nu.nl
  396. 396 sudo lsblk
  397. 397 sudo mount /dev/sdb1 /mnt
  398. 398 sudo lsblk
  399. 399 ls -l /mnt
  400. 400 cat /etc/fstab
  401. 401 sudo journalctl
  402. 402 sudo systemctl status sshd
  403. 403 sudo ls -l /var/log
  404. 404 less /var/log/messages
  405. 405 sudo less /var/log/messages
  406. 406 exit
  407. 407 history
  408.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement