Advertisement
sandervanvugt

systemd oct 23

Oct 16th, 2023
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.25 KB | None | 0 0
  1. [root@system-what ~]# history
  2. 1 dnf update -y
  3. 2 reboot
  4. 3 ps aux | less
  5. 4 systemctl list-dependencies
  6. 5 systemctl list-units -t path
  7. 6 systemctl cat cups.path
  8. 7 systemctl cat cups.service
  9. 8 history
  10. 9 systemctl -t help
  11. 10 systemctl cat sshd.service
  12. 11 systemctl show sshd.service
  13. 12 systemctl cat sshd.service
  14. 13 man systemd.directives
  15. 14 man systemd.kill
  16. 15 man -k systemd
  17. 16 man -k systemd | wc -l
  18. 17 man systemd.unit
  19. 18 man systemd.timer
  20. 19 systemctl edit sshd.service
  21. 20 export SYSTEMD_EDITOR=vim
  22. 21 systemctl edit sshd.service
  23. 22 echo 'export SYSTEMD_EDITOR=vim' >> .bashrc
  24. 23 systemctl edit sshd.service
  25. 24 systemctl cat sshd.service
  26. 25 systemctl status sshd
  27. 26 kill -9 918
  28. 27 systemctl status sshd
  29. 28 history
  30. 29 systemctl list-units -t target
  31. 30 systemctl cat sound.target
  32. 31 ls /etc/systemd/system
  33. 32 systemctl cat printer.target
  34. 33 ls /etc/systemd/system/printer.target.wants/
  35. 34 systemctl cat cups.service
  36. 35 cd /etc/systemd/system/
  37. 36 cp /usr/lib/systemd/system/sshd.service .
  38. 37 mv sshd.service sleep.unit
  39. 38 vim sleep.unit
  40. 39 systemctl daemon-reload
  41. 40 systemctl status sleep.unit
  42. 41 systemctl status sleep.service
  43. 42 mv sleep.unit sleep.service
  44. 43 systemctl daemon-reload
  45. 44 systemctl status sleep.service
  46. 45 systemctl enable --now sleep.service
  47. 46 systemctl status sleep.service
  48. 47 cp /usr/lib/systemd/system/graphical.target sander.target
  49. 48 pwd
  50. 49 vim sander.target
  51. 50 systemctl daemon-reload
  52. 51 systemctl list-unit-files -t target
  53. 52 systemctl disable --now sleep.service
  54. 53 vim sleep.service
  55. 54 systemctl enable --now sleep.service
  56. 55 systemctl get-default
  57. 56 systemctl set-default sander.target
  58. 57 systemctl cat sander.target
  59. 58 reboot
  60. 59 systemctl get-default
  61. 60 systemctl list-dependencies
  62. 61 systemctl set-default graphical.target
  63. 62 reboot
  64. 63 cd systemd/
  65. 64 ./countdown 12
  66. 65 dnf install -y git
  67. 66 git clone https://github.com/sandervanvugt/systemd
  68. 67 cd systemd/
  69. 68 ls
  70. 69 history
  71. 70 systemctl status rsyslog.service
  72. 71 less /etc/rsyslog.conf
  73. 72 journalctl
  74. 73 journalctl -f
  75. 74 systemctl status chrony
  76. 75 systemctl status chronyd.service
  77. 76 vim /etc/systemd/journald.conf
  78. 77 cd /var/log
  79. 78 ls
  80. 79 mkdir journal
  81. 80 ls journal/
  82. 81 cd /usr/lib/systemd/system
  83. 82 systemctl start systemd-journal-flush.service
  84. 83 ls /var/log/journal/
  85. 84 systemctl restart systemd-journal-flush.service
  86. 85 ls /var/log/journal/
  87. 86 systemctl status systemd-journal-flush.service
  88. 87 history
  89. 88 systemctl status systemd-journal-flush.service
  90. 89 systemctl cat systemd-journal-flush.service
  91. 90 systemctl list-dependencies
  92. 91 dnf install -y httpd vsftpd
  93. 92 systemctl disable --now vsftpd
  94. 93 systemctl cat httpd
  95. 94 systemctl edit httpd
  96. 95 systemctl status httpd
  97. 96 systemctl edit httpd
  98. 97 systemctl status httpd
  99. 98 systemctl edit httpd
  100. 99 ps aux | grep ftp
  101. 100 systemctl start httpd
  102. 101 ps aux | grep ftp
  103. 102 systemctl cat httpd.service
  104. 103 systemctl status httpd.service
  105. 104 systemctl status vsftpd.service
  106. 105 systemctl enable httpd
  107. 106 pwd
  108. 107 cd /etc/systemd//system/
  109. 108 ls
  110. 109 cat sleep.service
  111. 110 man systemd.service
  112. 111 systemctl cat sshd.service
  113. 112 systemctl status sshd.service
  114. 113 systemctl status default.target
  115. 114 systemctl cat sshd.service
  116. 115 systemctl cat httpd.service
  117. 116 systemctl --reverse --recursive
  118. 117 systemctl --reverse --recursive list-dependencies
  119. 118 systemctl list-dependencies
  120. 119 systemctl kill multi-user.target
  121. 120 ps faux | less
  122. 121 cd
  123. 122 cd systemd/
  124. 123 ls
  125. 124 cp *service /etc/systemd/system
  126. 125 systemctl daemon-reload
  127. 126 systemctl cat dynamicuser.service
  128. 127 systemctl start dynamicuser.service
  129. 128 ls -l /var/lib/private/
  130. 129 systemd-analyze sleep.service
  131. 130 systemd-analyze security sleep.service
  132. 131 systemd-analyze blame
  133. 132 history
  134. 133 poweroff
  135. 134 cat /etc/fstab
  136. 135 fdisk /dev/sda
  137. 136 mkfs.ext4 /dev/sda3
  138. 137 mkdir /files
  139. 138 cd /run/
  140. 139 ls
  141. 140 cd systemd/
  142. 141 ls
  143. 142 cd generator/
  144. 143 ls
  145. 144 cp boot.mount /etc/systemd/system/files.mount
  146. 145 cd /etc/systemd/system/
  147. 146 vim files.mount
  148. 147 mount | grep files
  149. 148 systemctl start files.mount
  150. 149 mount | grep files
  151. 150 systemctl cat files.mount
  152. 151 systemctl status files.mount
  153. 152 systemctl enable files.mount
  154. 153 systemctl list-dependencies
  155. 154 vim files.mount
  156. 155 systemctl enable files.mount
  157. 156 reboot
  158. 157 mount
  159. 158 mount -o remount,rw /
  160. 159 systemctl start default.target
  161. 160 vim /boot/grub2/grub.cfg
  162. 161 vim /etc/default/grub
  163. 162 grub2-mkconfig -o /boot/grub2/grub.cfg
  164. 163 reboot
  165. 164 cd systemd/
  166. 165 ./countdown 1
  167. 166 ./countdown 20
  168. 167 ./countdown 1
  169. 168 ./countdown 12
  170. 169 exit
  171. 170 history
  172. 171 cat /etc/mtab
  173. 172 cat /proc/mounts
  174. 173 cd /etc/systemd/system/
  175. 174 ls
  176. 175 vim files.mount
  177. 176 systemctl disable files.mount
  178. 177 vim files.mount
  179. 178 cd /usr/lib/systemd/system
  180. 179 ls *automount
  181. 180 cat proc-sys-fs-binfmt_misc.
  182. 181 cat proc-sys-fs-binfmt_misc.automount
  183. 182 cd
  184. 183 ls
  185. 184 cd systemd/
  186. 185 ls
  187. 186 vim nfsdata.mount
  188. 187 vim nfsdata.automount
  189. 188 cp nfsdata.automount /etc/systemd/system/files.automount
  190. 189 vim /etc/systemd/system/files.automount
  191. 190 systemctl cat files.mount
  192. 191 systemctl cat files.automount
  193. 192 systemctl status files.mount
  194. 193 systemctl stop files.mount
  195. 194 systemctl status files.mount
  196. 195 systemctl daemon-reload
  197. 196 systemctl enable --now files.automount
  198. 197 mount | grep files
  199. 198 cd /files
  200. 199 mount | grep files
  201. 200 cd /
  202. 201 mount
  203. 202 sleep 10
  204. 203 mount
  205. 204 systemctl cat files.mount
  206. 205 systemctl cat files.automount
  207. 206 history
  208. 207 ls /etc/cron.*/*
  209. 208 systemctl
  210. 209 systemctl list-unit-files -t timer
  211. 210 systemctl list-unit-files | grep fstrim*
  212. 211 systemctl cat fstrim.service
  213. 212 systemctl cat fstrim.timer
  214. 213 systemctl enable fstrim.timer
  215. 214 systemctl status fstrim.service
  216. 215 man systemd.time
  217. 216 cd
  218. 217 cd systemd/
  219. 218 ls *timer
  220. 219 cp monitor.timer /etc/systemd/system/
  221. 220 systemctl daemon-reload
  222. 221 systemctl cat monitor.timer
  223. 222 systemctl cat monitor.service
  224. 223 systemctl start monitor.timer
  225. 224 journalctl -S today -f -u monitor.service
  226. 225 systemctl stop monitor.timer
  227. 226 systemctl list-unit-files -t socket
  228. 227 systemctl list-unit-files | grep sshd*
  229. 228 systemctl cat sshd.socket
  230. 229 systemctl disable --now sshd
  231. 230 ps aux | grep ssh
  232. 231 systemctl enable --now sshd.socket
  233. 232 systemctl status sshd.socket
  234. 233 ps aux | grep sshd
  235. 234 ssh localhost
  236. 235 ssh student@localhost
  237. 236 ps aux | grep ssh
  238. 237 ss -tl
  239. 238 ip a
  240. 239 systemctl show httpd.service
  241. 240 man systemd.directives
  242. 241 systemctl edit httpd.service
  243. 242 systemctl status httpd.service
  244. 243 systemctl stop httpd
  245. 244 systemctl edit httpd.service
  246. 245 systemctl start httpd
  247. 246 systemctl status httpd
  248. 247 journalctl
  249. 248 history
  250. 249 pwwd
  251. 250 pwd
  252. 251 cd /etc/systemd/system/
  253. 252 ls
  254. 253 vim stress1.service
  255. 254 vim stress2.service
  256. 255 systemctl start stress1.service
  257. 256 systemctl start stress2.service
  258. 257 top
  259. 258 echo 0 > /sys/bus/cpu/devices/cpu1/online
  260. 259 top
  261. 260 systemctl set-property CPUShares=8192 system.slice
  262. 261 systemctl set-property system.slice CPUShares=8192
  263. 262 top
  264. 263 killall dd
  265. 264 echo 1 > /sys/bus/cpu/devices/cpu1/online
  266. 265 systemctl list-unit-files -t slice
  267. 266 systemctl cat system.slice
  268. 267 udevadm monitor
  269. 268 cd sysinit.target.wants/
  270. 269 cd
  271. 270 cd systemd/
  272. 271 ls
  273. 272 cp 50-custom.rules /etc/udev/rules.d/
  274. 273 cd /etc/udev/rules.d/
  275. 274 ls
  276. 275 vim 50-custom.rules
  277. 276 ls /dev/usb
  278. 277 journalctl
  279. 278 ls /dev/usb/
  280. 279 cd /usr/lib/udev/rules.d/
  281. 280 ls
  282. 281 vim 40-redhat.rules
  283. 282 cd
  284. 283 history
  285. 284 loginctl enable-linger student
  286. 285 exit
  287. 286 history
  288.  
  289.  
  290. #### student commands 3 sudo -i
  291. 4 sip a
  292. 5 ip a
  293. 6 sudo vim /etc/hosts
  294. 7 sudo -i
  295. 8 ps aux | grep ssh
  296. 9 systemctl status sshd
  297. 10 exit
  298. 11 mkdir -p .config/systemd/user
  299. 12 cd .config/systemd/user
  300. 13 cp /etc/systemd/system/sleep.service .
  301. 14 vim sleep.service
  302. 15 systemctl --user enable --now sleep.service
  303. 16 ps aux | grep sleep
  304. 17 systemctl --user status sleep.service
  305. 18 sudo -i
  306. 19 podman run -d --name mynginx -p 8080:80 nginx
  307. 20 cd .config
  308. 21 pwd
  309. 22 podman generate systemd --name mynginx --files
  310. 23 vim container-mynginx.service
  311. 24 systemctl --user enable container-mynginx.service
  312. 25 exit
  313. 26 while true; do true; done
  314. 27 exit
  315. 28 sudo -i
  316. 29 history
  317.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement