반응형
1. 서비스 관련 명령어 |
설명 | SysVinit | Systemd |
Start a service | service dummy start | systemctl start dummy.service |
Stop a service | service dummy stop | systemctl stop dummy.service |
Restart a service | service dummy restart | systemctl restart dummy.service |
Reload a service | service dummy reload | systemctl reload dummy.service |
Service status | service dummy status | systemctl status dummy.service |
Restart a service if already running | service dummy condrestart | systemctl condrestart dummy.service |
Enable service at startup | chkconfig dummy on | systemctl enable dumm.service |
Disable service at startup | chkconfig dummy off | systemctl disable dummy.service |
Check if a service is enabled at startup | chkconfig dummy | systemctl is-enabled dummy.service |
Create a new service file or modify configuration | chkconfig dummy --add | systemctl daemon-reload |
2. Run Level 관련 명령어 |
설명 | SysVinit | Systemd |
System halt | 0 | runlevel0.target, poweroff.target |
Single user mode | 1, s, single | runlevel1.target, rescue.target |
Multi user | 2 | runlevel2.target, multi-user.target |
Multi user with Network | 3 | runleve3.target, multi-user.target |
Experimental | 4 | runleve4.target, multi-user.target |
Multi user, with network, graphical mode | 5 | runlevel5.target, graphical.target |
reboot | 6 | runlevel6.target, reboot.target |
Emergency Shell | emergency | emergency.target |
Change to multi user runlevel/target | telinit 3 |
systemctl isolate multi-user.target systemctl isolate runlevel3.target |
Check current runlevel | runlevel | systemctl get-default |
Set multi-user target on next boot | sed s/^id:.*:initdefault:/id:3:initdefault:/ | systemctl set-default multi-user.target |
3. 기타 명령어 |
설명 | SysVinit | Systemd |
Systen halt | halt | systemctl halt |
Power off the system | poweroff | systemctl poweroff |
Restart the system | reboot | systemctl reboot |
Suspend the system | pm-suspend | systemctl suspend |
Hibernate | pm-hibernate | systemctl hibernate |
Follow the system log file |
tail -f /var/log/messages tail -f /var/log/syslog |
journalctl -f |
4. systemd 새로운 명령어 |
설명 | 명령어 |
Execute a systemd command on remote host | systemctl dummy.service start -H user@host |
Check boot time |
systemd-analyze systemd-analyze time |
Kill all processes related to a service | systemctl kill dummy |
Get log for events for today | journalctl --since=today |
Hostname and other host related information | hostnamectl |
Date and time of system with timezone and other information | timedatectl |
출처 : http://linoxide.com/linux-command/linux-systemd-commands
반응형
'IT 이야기 > Linux' 카테고리의 다른 글
[RHEL 공통] rsyslog를 이용한 history 내역 관리 (0) | 2019.12.18 |
---|---|
[RHEL 6, 7] RHEL 6 vs RHEL7 주요 변경 항목 (0) | 2019.12.09 |
[RHEL7] Systemd 서비스 (0) | 2019.12.09 |
[RHEL 공통] /proc(proc filesystem) 디렉터리 구조 (0) | 2019.12.09 |
[RHEL7] 디스크 용량 새롭게 할당 받기 (0) | 2019.12.08 |
댓글