Advertisement
sandervanvugt

systemd sep20

Sep 25th, 2020
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.54 KB | None | 0 0
  1. USER COMMANDS
  2. 135 sudo cp /root/performance/stress1.service .
  3. 136 sudo chown student stress1.service
  4. 137 cp stress1.service demo.service
  5. 138 vim demo.service
  6. 139 systemctl enable demo.service
  7. 140 systemctl --user enable demo.service
  8. 141 vim demo.service
  9. 142 systemctl --user enable demo.service
  10. 143 systemctl --user start demo.service
  11. 144 systemctl --user status demo.service
  12. 145 sudo loginctl status student
  13. 146 sudo loginctl -h
  14. 147 sudo loginctl show-user student
  15. 148 sudo loginctl enable-linger student
  16. 149 sudo loginctl disable-linger student
  17. 150 sudo loginctl enable-linger student
  18. 151 podman run -d name mynginx -p 8080:80 nginx
  19. 152 podman run -d name mynginx2 -p 8080:80 nginx
  20. 153 podman run -d --name mynginx2 -p 8080:80 nginx
  21. 154 id
  22. 155 podman ps
  23. 156 podman generate systemd --name mynginx2 --files
  24. 157 vim container-mynginx2.service
  25. 158 systemctl --user enable container-mynginx2.service
  26. 159 systemctl --user status container-mynginx2.service
  27. 160 history
  28.  
  29. UNIT FILES
  30. [student@podman user]$ cat demo.service
  31. [Unit]
  32. Description=demo user functionality
  33.  
  34. [Service]
  35. Type=simple
  36. ExecStart=sleep 3600
  37.  
  38. [Install]
  39. WantedBy=multi-user.target
  40.  
  41. ROOT COMMANDS
  42. [root@podman systemd]# history
  43. 1 ip a
  44. 2 exit
  45. 3 ls -lZd /webfiles/
  46. 4 exit
  47. 5 cd /var/lib/containers/
  48. 6 ls
  49. 7 cd sigstore/
  50. 8 ls
  51. 9 cd ../..
  52. 10 systemctl -t help
  53. 11 systemctl list-units -t target
  54. 12 systemctl -t help
  55. 13 cd /usr/lib/systemd/system
  56. 14 ls
  57. 15 systemctl cat sshd.service
  58. 16 kill -9 $(pidof sshd)
  59. 17 systemctl status sshd.service
  60. 18 pwd
  61. 19 cd /etc/systemd/system/
  62. 20 ls
  63. 21 cd /run/systemd/system/
  64. 22 ls
  65. 23 man -k systemd
  66. 24 man systemd.service
  67. 25 systemctl status sshd.service
  68. 26 systemctl cat sshd
  69. 27 history
  70. 28 man 7 systemd.directives
  71. 29 systemctl -t help
  72. 30 man systemd.swap
  73. 31 man -k systemd
  74. 32 systemctl cat sshd.service
  75. 33 systemctl edit sshd.service
  76. 34 export SYSTEMD_EDITOR=vim
  77. 35 systemctl edit sshd.service
  78. 36 vim /etc/bashrc
  79. 37 systemctl cat sshd.service
  80. 38 systemctl show --all sshd.service
  81. 39 history
  82. 40 systemctl -t target list-unit-files
  83. 41 systemctl get-default
  84. 42 systemctl cat multi-user.target
  85. 43 systemctl cat bluetooth.target
  86. 44 grep AllowIsolate=yes *
  87. 45 grep 'AllowIsolate=yes' *
  88. 46 grep 'AllowIsolate=yes' -- *
  89. 47 pwd
  90. 48 cd /usr/lib/systemd/system
  91. 49 grep 'AllowIsolate=yes' *
  92. 50 grep 'AllowIsolate=yes' * 2>/dev/null
  93. 51 systemctl isolate emergency.target
  94. 52 systemctl list-units
  95. 53 systemctl isolate rescue.target
  96. 54 systemctl list-units
  97. 55 mount
  98. 56 systemctl isolate reboot
  99. 57 systemctl start graphical.target
  100. 58 yum install -y httpd vsftpd
  101. 59 systemctl status httpd
  102. 60 systemctl enable httpd
  103. 61 cd /etc/systemd/system/
  104. 62 ls
  105. 63 cd multi-user.target.wants/
  106. 64 \ls -l
  107. 65 systemctl cat multi-user.target
  108. 66 pwd
  109. 67 cd ..
  110. 68 ls
  111. 69 cd basic.target.wants/
  112. 70 ls
  113. 71 cd
  114. 72 systemctl list-dependencies
  115. 73 history
  116. 74 yum install -y git
  117. 75 git clone https://github.com/sandervanvugt/luth
  118. 76 cd luth
  119. 77 ./countdown 12
  120. 78 cd ..
  121. 79 journalctl
  122. 80 cd /etc/systemd/
  123. 81 ls
  124. 82 vim journald.conf
  125. 83 mkdir /var/log/journal
  126. 84 systemctl daemon-reload
  127. 85 cd /var/log/journal/
  128. 86 ls
  129. 87 cd f45519db5ca9497dbcb080d9152e8454/
  130. 88 ls
  131. 89 cd
  132. 90 cat /etc/hosts | systemd-cat
  133. 91 journalctl -F
  134. 92 journalctl -f
  135. 93 journalctl UNIT=sshd.service
  136. 94 systemctl status sshd.service
  137. 95 loginctl -h
  138. 96 loginctl list-sessions
  139. 97 ip a
  140. 98 loginctl list-sessions
  141. 99 loginctl kill-session 6
  142. 100 loginctl list-sessions
  143. 101 history
  144. 102 systemctl cat httpd.service
  145. 103 systemctl edit httpd.service
  146. 104 systemctl cat httpd.service
  147. 105 ps aux | grep ftp
  148. 106 ps aux | grep http
  149. 107 systemctl status httpd.service
  150. 108 systemctl status vsftpd.service
  151. 109 systemctl start httpd
  152. 110 systemctl status httpd
  153. 111 systemctl status vsftpd
  154. 112 git clone https://github.com/sandervanvugt/linperf
  155. 113 git clone https://github.com/sandervanvugt/performance
  156. 114 cd performance/
  157. 115 ls
  158. 116 vim stress1.service
  159. 117 vim stress2.service
  160. 118 pwd
  161. 119 cp stress* /etc/systemd/system/
  162. 120 systemctl status stress1.service
  163. 121 systemctl start stress1.service
  164. 122 systemctl start stress2.service
  165. 123 systemctl cat stress1.service
  166. 124 systemctl cat stress2.service
  167. 125 lscpu
  168. 126 top
  169. 127 cd /sys/
  170. 128 ls
  171. 129 cd bus
  172. 130 ls
  173. 131 cd cpu/
  174. 132 ls
  175. 133 cd devices/
  176. 134 ls
  177. 135 ls cpu0/
  178. 136 pwd
  179. 137 echo 0 > cpu1/online
  180. 138 lscpu
  181. 139 top
  182. 140 systemctl stop stress*
  183. 141 systemctl status stress*
  184. 142 systemctl status stress1
  185. 143 top
  186. 144 pwd
  187. 145 echo 1 > cpu1/online
  188. 146 history
  189. 147 exit
  190. 148 systemd-analyze security httpd.service
  191. 149 systemd-analyze security sshd.service
  192. 150 systemd-analyze blame
  193. 151 history
  194. 152 luth/countdown 12
  195. 153 cat /etc/fstab
  196. 154 poweroff
  197. 155 cat /etc/fstab
  198. 156 cd /run/systemd/
  199. 157 ls
  200. 158 cd generator/
  201. 159 ls
  202. 160 systemctl cat boot.mount
  203. 161 vim '-.mount'
  204. 162 vim -- '-.mount'
  205. 163 mkfs.xfs /dev/sdb
  206. 164 mkdir /files
  207. 165 vim files.mount
  208. 166 systemctl start files.mount
  209. 167 systemctl status files.mount
  210. 168 pwd
  211. 169 lls
  212. 170 ls
  213. 171 systemctl stop files.mount
  214. 172 mv files.mount /etc/systemd/system/
  215. 173 systemctl daemon-reload
  216. 174 systemctl enable --now filesmount
  217. 175 systemctl enable --now files.mount
  218. 176 systemctl status files.mount
  219. 177 cd
  220. 178 git clone https://github.com/sandervanvugt/systemd
  221. 179 cd systemd/
  222. 180 ls
  223. 181 vim nfsdata.mount
  224. 182 vim /etc/exports
  225. 183 systemctl start nfs-server
  226. 184 vim /etc/exports
  227. 185 systemctl start nfs-server
  228. 186 systemctl status nfs-server
  229. 187 systemctl stop nfs-server
  230. 188 vim /etc/exports
  231. 189 systemctl start nfs-server
  232. 190 systemctl status nfs-server
  233. 191 cat nfsdata.mount
  234. 192 cat nfsdata.automount
  235. 193 pwd
  236. 194 cp nfs* /etc/systemd/system/
  237. 195 mkdir /nfsdata
  238. 196 systemctl enable nfsdata.automount
  239. 197 systemctl start nfsdata.automount
  240. 198 systemctl status nfsdata.automount
  241. 199 cd /nfsdata
  242. 200 ls
  243. 201 systemctl status nfsdata.automount
  244. 202 cd /etc/systemd/system/
  245. 203 cat nfsdata.mount
  246. 204 cat nfsdata.automount
  247. 205 systemctl cat fstrim.timer
  248. 206 systemctl cat fstrim.service
  249. 207 systemctl enable fstrim.timer
  250. 208 cd
  251. 209 cd systemd/
  252. 210 cat monitor.service
  253. 211 cat monitor.timer
  254. 212 cp monitor.* /etc/systemd/system
  255. 213 systemctl daemon-reload
  256. 214 systemctl enable --now monitor.timer
  257. 215 date
  258. 216 journalctl -S today -f -u monitor.service
  259. 217 systemctl status *timer
  260. 218 ls
  261. 219 yum install -y tftp-server
  262. 220 systemctl status *socket
  263. 221 systemctl cat tftp.socket
  264. 222 systemctl cat tftp.service
  265. 223 systemctl set-property --runtime MemoryLimit=4M sshd.service
  266. 224 systemctl set-property --runtime MemoryLimit=4 sshd.service
  267. 225 systemctl set-property --runtime MemoryMax=4 sshd.service
  268. 226 systemctl show sshd.service | grep emory
  269. 227 man -k systemd | grep resource
  270. 228 history
  271.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement