CentOS7常用操作 2016-08-05 23:30

systemctrl使用

CentOS 6.X之前版本的chkconfig工具,到了CentOS 7版本更改为systemctrl。

CentOS 6 CentOS 7
chkconfig --list systemctl list-unit-files --type=service
chkconfig docker systemctl is-enabled docker
chkconfig docker on systemctl enable docker
chkconfig docker off systemctl disable docker
service docker start systemctl start docker
service docker stop systemctl stop docker
service docker restart systemctl restart docker
service docker status systemctl status docker
- systemctl reload docker

修改主机名

hostnamectl --static set-hostname docker1
Tags: #systemctrl    Post on Linux