快捷搜索:  汽车  科技

linux 终端进入文件夹目录(服务管理systemctl命令详解)

linux 终端进入文件夹目录(服务管理systemctl命令详解)systemctlrestarthttpd.service6.查看所有已启动的服务systemctlstatushttpd.service5.重新启动某服务systemctlhttpdnfs-server.service2.设置开机自启动systemctlenablehttpd.service3.停止开机自启动systemctldisablehttpd.service4.查看服务当前状态

syetemclt就是service和chkconfig这两个命令的整合,在CentOS 7就开始被使用了。

摘要: systemctl 是系统服务管理器命令,它实际上将 service 和 chkconfig 这两个命令组合到一起。

linux 终端进入文件夹目录(服务管理systemctl命令详解)(1)

下面以nfs服务为例:

1.启动httpd服务

systemctlhttpdnfs-server.service

2.设置开机自启动

systemctlenablehttpd.service

3.停止开机自启动

systemctldisablehttpd.service

4.查看服务当前状态

systemctlstatushttpd.service

5.重新启动某服务

systemctlrestarthttpd.service

6.查看所有已启动的服务

systemctllist-units--type=service

猜您喜欢: