1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| //移除服务 systemctl reset-failed mysqld
//查看服务状态,可以发现不能使用,移除成功了 systemctl status mysqld
//查找所有或者某个服务 systemctl list-units --type=service | grep network
//列出所有可用单元 systemctl list-unit-files
//列出所有运行中单元 systemctl list-units
//列出所有失败单元 systemctl --failed
//使用systemctl命令杀死服务 systemctl kill mysqld
//列出所有系统挂载点 systemctl list-unit-files --type=mount
//挂载、卸载、重新挂载、重载系统挂载点并检查系统中挂载点状态 systemctl start tmp.mount systemctl stop tmp.mount systemctl restart tmp.mount systemctl reload tmp.mount systemctl status tmp.mount
//启动服务 systemctl start mysqld
//停止服务 systemctl stop mysqld
//开机自启 systemctl enable mysqld
//开机关闭 systemctl disable mysqld
|