systemctl使用说明

tomosak2年前Linux923

启动服务

systemctl start ssh.service

关闭服务

systemctl stop ssh.service

重启服务

systemctl restart ssh.service

显示服务的状态

systemctl status ssh.service

在开机时启用服务

systemctl enable ssh.service

在开机时禁用服务

systemctl disable ssh.service

查看服务是否开机启动

systemctl is-enabled ssh.service

查看已启动的服务列表

systemctl list-unit-files|grep enabled

查看启动失败的服务列表

systemctl --failed

标签: systemctl

相关文章

Linux查看开机启动的服务

在Linux系统中,可以使用不同的命令和工具来查看开机启动的服务。 以下是一些常用的方法: systemctl 命令: 使用 systemctl 命令可以查看系统中所有正在运行的服务以及它们的状态。   systemctl&nbs...

Linux一键更换国内软件源脚本

脚本当前使用的开源镜像站 镜像站名称镜像站地址IPv6Kali LinuxFedoraEPEL1阿里云mirrors.aliyun.com✓✓✓✓2腾讯云mirrors.tencent.com✓✓✓✓3华为云mirrors.huaweicloud.com✓✓✓✓4网易mirrors.163...

Docker管理

启动dockerdocker run -d -i -t/bin/bash上述命令执行某些命令回报错Failed to get D-Bus connection: Operation not permitted可使用如下命令启动docker run&n...

Ubuntu下安装LXDE+XRDP

1、安装无推荐软件的LXDE环境apt-get install  lxde -y12、安装XRDPapt-get install xrdp13、删除LXDE中多余的不好用的xtermapt-get purge xterm...

Linux系统中获取有线网卡MAC地址并转换为SHA1哈希值

ip -br link | grep -Ev '^(lo|br)' | awk '{print $3}' | awk 'NR==1...

彻底删除.user.ini文件的方法

.user.ini是干什么的?其实这个文件是军哥LNMP一键包中的文件,根据军哥的官方解释:LNMP 1.2及更高版本防跨目录功能使用.user.ini,该文件在网站根目录下,可以修改.user.ini 里面的open_basedir的值来设置限制访问的目录或删除来移除防跨目录的设置。怎么删除?其实...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。