linux下systemd常用命令
systemd常用命令
systemctl list-unit-files # 列出所有可用单元(服务)。
systemctl list-units # 列出所有运行中的单元。
systemctl --failed # 列出所有失败的单元。
systemctl list-unit-files | grep enable # 查看自启动的软件。
systemctl is-enabled mysqld.service # 查看某个单元是否开机启动。
systemctl status mysqld.service # 查看某个单元的状态。
systemctl start mysqld.service # 启动某个单元。
systemctl restart mysqld.service # 重启某个单元。
systemctl stop mysqld.service # 停止某个单元。
systemctl daemon-reload # 修改了某个单元的配置文件后,重载配置文件。
systemctl reload mysqld.service # 重载某个单元。
systemctl enable mysqld.service # 设置开机自启动。
systemctl disable mysqld.service # 关闭开机自启动。
systemctl kill mysqld # 杀死单元。
systemctl list-unit-files # 列出所有可用单元(服务)。
systemctl list-units # 列出所有运行中的单元。
systemctl --failed # 列出所有失败的单元。
systemctl list-unit-files | grep enable # 查看自启动的软件。
systemctl is-enabled mysqld.service # 查看某个单元是否开机启动。
systemctl status mysqld.service # 查看某个单元的状态。
systemctl start mysqld.service # 启动某个单元。
systemctl restart mysqld.service # 重启某个单元。
systemctl stop mysqld.service # 停止某个单元。
systemctl daemon-reload # 修改了某个单元的配置文件后,重载配置文件。
systemctl reload mysqld.service # 重载某个单元。
systemctl enable mysqld.service # 设置开机自启动。
systemctl disable mysqld.service # 关闭开机自启动。
systemctl kill mysqld # 杀死单元。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!