美文网首页Shell编程
systemctl命令使用指南

systemctl命令使用指南

作者: 大雪糕丶 | 来源:发表于2019-04-18 17:37 被阅读0次

Systemctl是一个systemd工具,主要负责控制systemd系统和服务管理器。
Systemd是一个系统管理守护进程、工具和库的集合,用于取代System V初始进程。
Systemd的功能是用于集中管理和配置类UNIX系统。

重要:
Systemctl 接受 服务(.service),挂载点(.mount),套接口(.socket)和设备(.device)作为单元。

RHEL 7相关命令和之前的对比

(systemctl命令中服务名后面的.service可以省略)

作用 Centos7之前 Centos7
启动服务 service firewalld start systemctl start firewalld.service
重启服务 service firewalld restart systemctl restart firewalld.service
停止服务 service firewalld stop systemctl stop firewalld.service
重新加载配置文件(不终止服务) service firewalld reload systemctl reload firewalld.service
查看服务状态 service firewalld status systemctl status firewalld.service
设置开机启动 chkconfig --level 3 firewalld on systemctl enable firewalld.service
开机不自启动 chkconfig --level 3 firewalld off systemctl disable firewalld.service
查看所有已启动的服务 chkconfig --list systemctl list-units --type=service

查看所有服务列表:
systemctl list-unit-files --type=service
列出所有运行中单元
systemctl list-units
查看服务是否开机启动:
systemctl is-enabled firewalld.service
查看启动失败的服务列表:
systemctl --failed

相关文章

  • systemctl命令使用指南

    Systemctl是一个systemd工具,主要负责控制systemd系统和服务管理器。Systemd是一个系统管...

  • linux命令:systemctl

    CentOS 7.x开始,CentOS开始使用systemctl命令代替service命令 *systemctl ...

  • systemctl管理服务---RHEL7系统

    systemctl管理服务(RHEL 7系统) 命令 systemctl enable 服务名称 命令:将服务加到...

  • CentOS 7下启动、关闭、重启、查看MySQL服务

    1.启动命令 systemctl start mysqld.service 2.关闭命令 systemctl s...

  • Systemctl 命令

    CentOS 7 开始 使用systemd来管理服务进程了 systemd是代替 init 作为父进程(PID=1...

  • systemctl命令

    来自:http://man.linuxde.net/systemctl systemctl 命令是系统服务管理器指...

  • systemctl命令

    systemctl命令是系统服务管理器指令,它实际上将 service 和 chkconfig 这两个命令组合到一...

  • systemctl 命令

    在上篇SentOS yum安装MariaDB我们提到Mariadb数据库: 操作Mariadb1.启动MariaD...

  • Systemctl命令

    01、首先检查系统上是否安装了systemd以及当前安装的Systemd的版本是什么? 02.检查systemd和...

  • systemctl命令

    参考原文:http://www.ruanyifeng.com/blog/2016/03/systemd-tutor...

网友评论

    本文标题:systemctl命令使用指南

    本文链接:https://www.haomeiwen.com/subject/xpgtgqtx.html