Advertisement
sandervanvugt

SYSTEMD oct22

Oct 24th, 2022
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.34 KB | None | 0 0
  1. ##### SYSTEMD NSPAWN ON UBUNTUroot@ubuserver:~# history
  2. 1 hostnamectl set-hostname ubuserver
  3. 2 reboot
  4. 3 systemctl status systemd-networkd
  5. 4 systemctl status systemd-timesyncd.service
  6. 5 cd /etc/netplan/
  7. 6 ls
  8. 7 vim 00-installer-config.yaml
  9. 8 man networkctl
  10. 9 networkctl status
  11. 10 networkctl list
  12. 11 exit
  13. 12 apt install debootstrap systemd-container bridge-utils
  14. 13 mkdir -p /var/lib/machines/helloworld
  15. 14 debootstrap stable /var/lib/machines/helloworld http://deb.debian.org/debian/
  16. 15 chown root:root /var/lib/machines
  17. 16 chown 700 /var/lib/machines/
  18. 17 ls -l /var/lib/machines/helloworld/
  19. 18 du -hs /var/lib/machines/helloworld/
  20. 19 systemd-nspawn -UM hello-world
  21. 20 systemd-nspawn -UbM hello-world
  22. 21 machinectl list-images
  23. 22 machinectl status helloworld
  24. 23 #machinectl start helloworld
  25. 24 systemd-nswap -UM hello-world
  26. 25 systemd-nspawn -UM hello-world
  27. 26 machinectl start helloworld
  28. 27 machinectl status helloworld
  29. 28 systemd-nspawn -UM hello-world
  30. 29 systemd-nspawn -UM helloworld
  31. 30 machinectl stop helloworld
  32. 31 systemd-nspawn -UM helloworld
  33. 32 systemd-nspawn -UbM helloworld
  34. 33 machinectl start helloworld
  35. 34 machinectl login helloworld
  36. 35 machinectl list
  37. 36 ls /
  38. 37 ls -l /var/lib/machines/helloworld/
  39. 38 exit
  40. 39 history
  41.  
  42. ###### ALL COMMANDS ON RHEL9 1 dnf update -y
  43. 2 uname -r
  44. 3 reboot
  45. 4 cd /usr/lib/systemd/system
  46. 5 ls
  47. 6 vim tuned.service
  48. 7 systemctl -t help
  49. 8 systemctl cat tuned.service
  50. 9 man 7 systemd.directives
  51. 10 man systemd.services
  52. 11 man systemd.service
  53. 12 man systemd.exec
  54. 13 man -k systemd
  55. 14 man -k systemd | wc
  56. 15 systemctl edit sshd.service
  57. 16 export SYSTEMD_EDITOR=vim
  58. 17 systemctl edit sshd.service
  59. 18 systemctl cat sshd.service
  60. 19 systemctl restart sshd
  61. 20 systemctl status sshd
  62. 21 systemctl edit sshd.service
  63. 22 systemctl restart sshd.service
  64. 23 systemctl status sshd
  65. 24 systemctl edit sshd.service
  66. 25 systemctl show sshd.services
  67. 26 man systemd.directives
  68. 27 man systemd.resource-control
  69. 28 systemctl show sshd.services | wc
  70. 29 systemctl show --all sshd.services | wc
  71. 30 systemctl -t target show-unit-files
  72. 31 systemctl -t target list-unit-files
  73. 32 systemctl cat multi-user.target
  74. 33 systemctl cat network.target
  75. 34 cd /etc/systemd/system/
  76. 35 ls
  77. 36 cd multi-user.target.wants/
  78. 37 ls -l
  79. 38 systemctl disable --now crond.service
  80. 39 ls -l
  81. 40 systemctl enable --now crond.service
  82. 41 dnf install httpd
  83. 42 systemctl status httpd.service
  84. 43 systemctl cat httpd.service
  85. 44 ls -l
  86. 45 systemctl enable httpd.service
  87. 46 ls -l
  88. 47 systemctl status httpd.service
  89. 48 systemctl start httpd
  90. 49 systemctl status httpd.service
  91. 50 systemctl list-dependencies
  92. 51 systemctl get-default
  93. 52 systemctl set-default multi-user.target
  94. 53 which reboot
  95. 54 file /sbin/reboot
  96. 55 systemctl reboot
  97. 56 vim /etc/default/grub
  98. 57 grub2-mkconfig -o /boot/grub2/grub.cfg
  99. 58 reboot
  100. 59 systemctl list-units
  101. 60 systemctl set-default graphical.target
  102. 61 reboot
  103. 62 systemctl status sshd.socket
  104. 63 systemctl status sshd.service
  105. 64 ps aux | grep ssh
  106. 65 exit
  107. 66 journalctl
  108. 67 systemctl status rsyslog
  109. 68 cd /etc/systemd/
  110. 69 ls
  111. 70 vim journald.conf
  112. 71 mkdir /var/log/journal
  113. 72 systemd-cd /var/log/journal/
  114. 73 ls
  115. 74 cd /var/log/journal/
  116. 75 ls
  117. 76 cd
  118. 77 journalctl -u sshd
  119. 78 systemctl status sshd
  120. 79 journalctl -xb
  121. 80 dnf install -y git
  122. 81 git clone https://github.com/sandervanvugt/systemd
  123. 82 cd systemd/
  124. 83 ls
  125. 84 ./countdown 12
  126. 85 systemctl restart systemd-journal-flush.service
  127. 86 ls /var/log/journal/
  128. 87 ls /var/log/journal/215e3b9ed06f417bb105eaba3fc231ec/
  129. 88 dnf install -y vsftpd
  130. 89 systemctl stop httpd
  131. 90 systemctl edit httpd
  132. 91 EDITOR=/usr/bin/vim
  133. 92 systemctl edit httpd
  134. 93 export SYSTEMD_EDITOR=/usr/bin/vim
  135. 94 systemctl edit httpd
  136. 95 systemctl cat httpd
  137. 96 ps aux | grep ftp
  138. 97 systemctl start httpd
  139. 98 ps aux | grep ftp
  140. 99 systemctl status vsftpd
  141. 100 kill -9 5128
  142. 101 systemctl status httpd
  143. 102 ps aux | grep ftp
  144. 103 systemctl cat sshd
  145. 104 systemctl status sshd
  146. 105 kill -9 946
  147. 106 systemctl status sshd
  148. 107 systemctl cat sshd
  149. 108 cd
  150. 109 cd systemd/
  151. 110 ls
  152. 111 cat sleep.service
  153. 112 cp sleep.service /etc/systemd/system
  154. 113 systemctl start sleep
  155. 114 systemctl status sleep
  156. 115 cat securesleep.service
  157. 116 systemctl daemon-reload
  158. 117 rpm -qa | grep systemd
  159. 118 vim /etc/nsswitch.conf
  160. 119 pwd
  161. 120 ls
  162. 121 cat dynamicuser.service
  163. 122 vim dynamicuser.service
  164. 123 cp dynamicuser.service /etc/systemd/system
  165. 124 systemctl start dynamicuser.service
  166. 125 ps aux | grep sleep
  167. 126 getent passwd
  168. 127 cat /etc/passwd
  169. 128 getent passwd
  170. 129 ls -l /var/lib/private/
  171. 130 ls -l /var/lib/private/dynamic/
  172. 131 systemd-analyze
  173. 132 systemd-analyze blame
  174. 133 systemd-analyze verify sshd.service
  175. 134 systemctl edit sleep.service
  176. 135 systemd-analyze verify sleep.service
  177. 136 systemd-analyze security
  178. 137 systemd-analyze security chronyd.service
  179. 138 systemd-analyze security
  180. 139 systemd-analyze plot
  181. 140 systemd-analyze plot --help
  182. 141 systemd-analyze plot > whatever.svg
  183. 142 pwd
  184. 143 cp whatever.svg /tmp
  185. 144 ls -l /tmp/whatever.svg
  186. 145 cd
  187. 146 vim /etc/fstab
  188. 147 cd /run/systemd/generator/
  189. 148 ls
  190. 149 vim -.mount
  191. 150 vim -- -.mount
  192. 151 vim boot.mount
  193. 152 cat /etc/fstab
  194. 153 vim boot.mount
  195. 154 ls /dev/disk/
  196. 155 ls -l /dev/disk/by-uuid/
  197. 156 cat /etc/default/grub
  198. 157 cd
  199. 158 systemd/countdown 12
  200. 159 vim /etc/exports
  201. 160 dnf install nfs-utils
  202. 161 systemctl enable --now nfs-server
  203. 162 cd systemd/
  204. 163 ls
  205. 164 vim nfsdata.mount
  206. 165 vim nfsdata.automount
  207. 166 cp nfsdata.* /etc/systemd/system
  208. 167 systemctl enable --now nfsdata.automount
  209. 168 ls /
  210. 169 systemctl status nfsdata.automount
  211. 170 systemctl status nfsdata.mount
  212. 171 cd /var
  213. 172 cd /nfsdata/
  214. 173 ls
  215. 174 systemctl status nfsdata.automount
  216. 175 systemctl status nfsdata.mount
  217. 176 mount
  218. 177 cd
  219. 178 sleep 10
  220. 179 mount
  221. 180 systemctl status nfsdata.mount
  222. 181 systemctl -t mount list-unit-files
  223. 182 systemctl cat tmp.mount
  224. 183 systemctl list-unit-files fstrim*
  225. 184 systemctl cat fstrim.timer
  226. 185 systemctl cat fstrim.service
  227. 186 systemctl enable --now fstrim.timer
  228. 187 systemctl status crond
  229. 188 ls -l /etc/cron*/
  230. 189 systemctl list-units -t timer
  231. 190 systemctl cat logrotate.timer
  232. 191 man systemd.timer
  233. 192 cd systemd/
  234. 193 ls
  235. 194 vim monitor.service
  236. 195 vim monitor.timer
  237. 196 cp moni* /etc/systemd/
  238. 197 systemctl enable --now monitor.timer
  239. 198 cp moni* /etc/systemd/system/
  240. 199 systemctl enable --now monitor.timer
  241. 200 journalclt -S today -f -u monitor.service
  242. 201 journalctl -S today -f -u monitor.service
  243. 202 systemctl disable monitor.timer --now
  244. 203 ls
  245. 204 systemctl -t socket list-unit-files
  246. 205 systemctl cat sshd.socket
  247. 206 systemctl disable --now sshd
  248. 207 systemctl enable --now sshd.socket
  249. 208 ps aux | grep ssh
  250. 209 ssh localhost
  251. 210 systemctl -t socket list-unit-files
  252. 211 systemctl cat podman.socket
  253. 212 cd
  254. 213 cd systemd/
  255. 214 systemctl -t path list-unit-files
  256. 215 systemctl cat cups.path
  257. 216 ls -l /var/cache/cups/
  258. 217 pwd
  259. 218 top
  260. 219 ls /sys/bus/cpu/devices/
  261. 220 echo 0 > /sys/bus/cpu/devices/cpu1/online
  262. 221 lscpu
  263. 222 vim stress1.service
  264. 223 vim stress2.service
  265. 224 cp stress* /etc/systemd/system
  266. 225 systemctl start stress1
  267. 226 systemctl start stress2
  268. 227 top
  269. 228 systemctl set-property --runtime system.slice CPUShares=8192
  270. 229 top
  271. 230 systemctl set-property system.slice CPUShares=8192
  272. 231 top
  273. 232 systemctl show system.slice
  274. 233 systemctl show user.slice
  275. 234 top
  276. 235 systemctl set-property user.slice CPUShare=1024
  277. 236 systemctl set-property user.slice CPUShares=1024
  278. 237 top
  279. 238 killall dd
  280. 239 top
  281. 240 pwd
  282. 241 ./countdown 18
  283. 242 systemd-cgls
  284. 243 systemd-cgtop
  285. 244 loginctl list-sessions
  286. 245 loginctl list-seats
  287. 246 loginctl list-users
  288. 247 ip a
  289. 248 loginctl list-users
  290. 249 loginctl list-seats
  291. 250 loginctl list-sessions
  292. 251 loginctl kill-sessions 6
  293. 252 loginctl kill-session 6
  294. 253 loginctl list-sessions
  295. 254 useradd lisa
  296. 255 passwd lisa
  297. 256 loginctl enable-linger lisa
  298. 257 ssh lisa@localhost
  299. 258 reboot
  300. 259 ps faxu | grep nginx
  301. 260 systemd-cgls --help
  302. 261 systemd-cgls
  303. 262 chvt 3
  304. 263 systemd-cgls
  305. 264 ssh student@192.168.29.33
  306. 265 cd systemd/
  307. 266 ./countdown 12
  308. 267 udevadm monitor
  309. 268 exit
  310. 269 udevadm monitor
  311. 270 ssh student@192.168.52.136
  312. 271 ping 192.168.52.136
  313. 272 ssh student@192.168.52.136
  314. 273 ssh sander@192.168.52.136
  315. 274 history
  316. 275 ssh student@192.168.29.33
  317. 276 history
  318.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement