systemctl命令

systemctl --version # 检查版本号
whereis systemd  # 检查二进制文件安装位置
whereis systemctl # 检查库文件安装位置
ps -eaf | grep systemd # 检查systemd是否运行
systemctl list-unit-files # 列出所有单元
systemctl is-enabled sshd.service # 检查某个服务是否启用
systemctl status sshd.service # 检查某个服务的状态
systemctl list-unit-files --type=service # 列出所有服务
systemctl enable sshd.service # 自动启动
systemctl disable sshd.service # 禁用
systemctl kill sshd # 杀死服务

results matching ""

    No results matching ""