Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@localhost system]# cat myunit.service
- [Unit]
- [Service]
- Type=simple
- ExecStart=sleep 3600
- Restart=always
- RestartSec=20s
- [Install]
- WantedBy=multi-user.target
- ######## 1 sudo -i
- 2 ls .config/
- 3 mkdir -p .config/systemd/user
- 4 sudo yum module install container-tools
- 5 podman run -d --name mynginx -p 8080:80 nginx
- 6 podman ps
- 7 cd .config/systemd/user/
- 8 podman generate systemd --name mynginx --files
- 9 ls
- 10 vim container-mynginx.service
- 11 systemctl --user daemon-reload
- 12 systemctl --user enable container-mynginx.service
- 13 history
- 14 sudo reboot
- 15 systemctl --user status container-mynginx.service
- 16 podman ps
- 17 history
- #########
- [root@localhost ~]# history
- 1 systemctl -t help
- 2 systemd-analyze -h
- 3 systemd-analyze blame
- 4 systemd-analyze security sshd
- 5 cd /usr/lib/systemd/system
- 6 ls
- 7 ls | wc
- 8 pwd
- 9 cd /etc/systemd/system/
- 10 pwd
- 11 ls
- 12 cd /run/systemd/system/
- 13 ls
- 14 systemctl cat cron.service
- 15 systemctl cat crond.service
- 16 systemctl edit crond.service
- 17 systemctl cat crond.service
- 18 systemctl edit crond.service
- 19 systemctl cat crond.service
- 20 man 7 systemd.directives
- 21 man systemd.service
- 22 man -k systemd
- 23 mandb
- 24 man -k systemd
- 25 man -k systemd | less
- 26 export SYSTEMD_EDITOR=vim
- 27 systemctl edit sshd.service
- 28 vim /etc/profile.d/virocks.conf
- 29 systemctl show --all crond
- 30 systemctl cat crond
- 31 systemctl show crond
- 32 systemctl show --all crond
- 33 rpm -qa | grep systemd
- 34 systemctl -v
- 35 systemctl --version
- 36 cd /etc/
- 37 cd systemd/
- 38 ls
- 39 vim system.conf
- 40 cd system/
- 41 ls
- 42 cd ..
- 43 pwd
- 44 systemctl list-units -t target
- 45 systemctl list-units
- 46 systemctl list-units -t target
- 47 cd /usr/lib/systemd/system
- 48 grep -i isolate *.target
- 49 systemctl list-dependencies
- 50 systemctl get-default
- 51 systemctl isolate multi-user.target
- 52 systemctl list-dependencies
- 53 systemctl isolate reboot.target
- 54 yum install -y git
- 55 git clone https://github.com/sandervanvugt/systemd
- 56 git clone https://github.com/sandervanvugt/luth
- 57 ls systemd/
- 58 history
- 59 history | less
- 60 cd systemd/
- 61 ./countdown 12
- 62 vim /root/systemd/countdown
- 63 ./countdown 12
- 64 vim /root/systemd/countdown
- 65 ./countdown 12
- 66 pwd
- 67 cd /usr/lib/systemd/
- 68 ls *target
- 69 ls
- 70 cd system
- 71 ls *target
- 72 vim printer.target
- 73 cd /etc/systemd/system/
- 74 ls
- 75 cd printer.target.wants/
- 76 ls
- 77 ls -l
- 78 vim cups.service
- 79 cd
- 80 yum install -y httpd
- 81 systemctl cat httpd.service
- 82 systemctl status httpd.service
- 83 systemctl enable --now httpd
- 84 yum install -y nginx
- 85 systemctl status nginx
- 86 systemctl cat nginx
- 87 systemctl mask nginx.service
- 88 systemctl start nginx.service
- 89 history
- 90 systemctl edit httpd.service
- 91 SYSTEMD_EDITOR=vim
- 92 systemctl cat httpd.service
- 93 vim /etc/ssh/sshd_config
- 94 systemctl stop sshd; systemctl start sshd
- 95 systemctl status sshd.service
- 96 systemctl disable --now sshd.service
- 97 systemctl status sshd.service
- 98 systemctl start sshd.service
- 99 systemctl status sshd.service
- 100 vim /etc/ssh/sshd_config
- 101 systemctl enable --now sshd
- 102 yum install vsftpd
- 103 systemctl cat httpd
- 104 systemctl edit httpd
- 105 systemctl cat httpd
- 106 systemctl status httpd
- 107 systemctl daemon-reload
- 108 systemctl stop httpd
- 109 ps aux | grep http
- 110 ps aux | grep vsf
- 111 systemctl start httpd
- 112 ps aux | grep http
- 113 ps aux | grep vsf
- 114 kill -9 6853
- 115 ps aux | grep http
- 116 systemctl status httpd
- 117 systemctl status vsftpd
- 118 systemctl stop httpd
- 119 systemctl start httpd
- 120 systemctl list-dependencies
- 121 systemctl cat httpd
- 122 cd /etc/systemd/system/
- 123 vim myunit.service
- 124 systemctl cat httpd
- 125 vim myunit.service
- 126 systemctl status myunit.service
- 127 systemctl start myunit.service
- 128 systemctl status myunit.service
- 129 systemctl enable myunit.service
- 130 vim myunit.service
- 131 systemctl cat httpd.service
- 132 vim myunit.service
- 133 systemctl cat sshd.service
- 134 vim myunit.service
- 135 systemctl enable myunit.service
- 136 ps aux
- 137 kill -9 7369
- 138 systemctl status myunit.service
- 139 cat myunit.service
- 140 cd
- 141 history
- 142 systemd/countdown 12
- 143 vim systemd/countdown
- 144 cat /etc/fstab
- 145 cd /run/systemd/generator/
- 146 ls
- 147 vim -.mount
- 148 vim -- -.mount
- 149 poweroff
- 150 cd /run/systemd/generator/
- 151 ls
- 152 cp boot.mount /etc/systemd/system/data.mount
- 153 fdisk /dev/sda
- 154 mkfs.xfs /dev/sda3
- 155 mkdir /data
- 156 cd /etc/systemd/
- 157 vim data.mount
- 158 ls
- 159 pwd
- 160 cd system/
- 161 ls
- 162 vim data.mount
- 163 systemctl enable --now data.mount
- 164 vim data.mount
- 165 systemctl daemon-reload
- 166 systemctl enable --now data.mount
- 167 mount
- 168 cd /usr/lib/systemd/system
- 169 ls *mount
- 170 vim tmp.mount
- 171 systemctl enable --now tmp.mount
- 172 cd /tmp
- 173 ls
- 174 cd /
- 175 cd
- 176 cd systemd/
- 177 ls
- 178 vim nfsdata.mount
- 179 vim nfsdata.automount
- 180 vim /etc/exports
- 181 systemctl enable --now nfs-server
- 182 showmount -e localhost
- 183 pwd
- 184 vim nfsdata.mount
- 185 mkdir /nfsdata
- 186 systemctl enable nfsdata.automount --now
- 187 cp nfsdata* /etc/systemd/system
- 188 systemctl enable nfsdata.automount --now
- 189 mount
- 190 systemctl status nfsdata.mount
- 191 cd /nfsdata/
- 192 mount
- 193 systemctl status nfsdata.mount
- 194 cd
- 195 cd systemd/
- 196 ls
- 197 lscpu
- 198 cd /sys/bus/cpu/
- 199 ls
- 200 cd devices/
- 201 ls
- 202 echo 0 > cpu1/online
- 203 pwd
- 204 lscpu
- 205 cd /root/systemd/
- 206 vim stress1.service
- 207 vim stress2.service
- 208 cp stress* /etc/systemd/system/
- 209 systemctl start stress1
- 210 systemctl start stress2
- 211 top
- 212 loginctl list-users
- 213 loginctl enable-linger student
- 214 exit
- 215 history
- [root@localhost ~]#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement