systemd 系统初始化程序,系统开始的第一个进程,pid为1
c/s模型client-server ##客户端服务器模型
1.systemctl 命令
systemctl list-units ##列出当前系统服务状态
systemctl list-unit-files ##列出服务的开机状态
systemctl status sshd ##查看指定服务状态
systemctl stop sshd ##关闭指定服务
systemctl start sshd ##开启指定服务器
systemctl restart sshd ##重新启动服务
systemctl enable sshd ##设定指定服务开机启动
systemctl disable sshd ##设定指定服务开机关闭
systemctl reload sshd ##使指定服务重新加载配置
systemctl list-dependencies sshd##查看指定服务的依赖关系
systemctl mask sshd ##锁定指定服务
systemctl unmask sshd ##解锁指定服务
systemctl set-default multi-user.target ##开机不启动图形
systemctl srt-default graphical.target ##开机启动图形
2.服务状态
systemctl status 服务名称
systemctl stop sshd停止ssh服务后
loaded ##系统服务已经初始化完成,加载过配置
active(running) ##正有一个或多个程序正在系统中执行
atcive(exited) ##仅执行一次就正常結束的服務,
atcive(waiting) ##正在执行当中,不过还再等待其他的事件才能继续处理
inactive ##服务关闭
enable ##服务开机启动
disable ##服务开机不自启
static ##服务开机启动项不可被管理
failed ##系统配置错误