Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Linux 服務管理速查表:CentOS (SysV) vs Fedora (systemd) 指令對照

編輯:Linux 教學

CentOS / SysV (chkconfig / service)

chkconfig --list                    # 列出所有服務等級
chkconfig --add {servicename}       # 添加服務
chkconfig {servicename} on          # 啟用開機自啟
service {servicename} start|stop|restart|status

Fedora / systemd (systemctl)

任務舊指令 (SysV)新指令 (systemd)
啟用開機自啟chkconfig --level 3 httpd onsystemctl enable httpd.service
禁用開機自啟chkconfig --level 3 httpd offsystemctl disable httpd.service
查看狀態service httpd statussystemctl status httpd.service (詳細) / systemctl is-active httpd.service (僅 Active)
列出已啟動服務chkconfig --listsystemctl list-units --type=service
啟動服務service httpd startsystemctl start httpd.service
停止服務service httpd stopsystemctl stop httpd.service
重啟服務service httpd restartsystemctl restart httpd.service
Copyright © Windows教程網 All Rights Reserved