ubuntu 換了 systemd 后的启動服務管理

一開始找 rrconf ,還有 sys-rc-conf ,使用 apt 命令說找不到;後面了解了下,是 ubuntu 的啓動服務把 upstart 換成了 systemd了,所以 rrconf 和 sys-rc-conf  都用不了了;

一個參照表;

Sysvinit 命令Systemd 命令备注
service frobozz startsystemctl start frobozz.service用来启动一个服务 (并不会重启现有的)
service frobozz stopsystemctl stop frobozz.service用来停止一个服务 (并不会重启现有的)。
service frobozz restartsystemctl restart frobozz.service用来停止并启动一个服务。
service frobozz reloadsystemctl reload frobozz.service当支持时,重新装载配置文件而不中断等待操作。
service frobozz condrestartsystemctl condrestart frobozz.service如果服务正在运行那么重启它。
service frobozz statussystemctl status frobozz.service汇报服务是否正在运行。
ls /etc/rc.d/init.d/systemctl list-unit-files --type=service (推荐)
ls /lib/systemd/system/.service /etc/systemd/system/.service用来列出可以启动或停止的服务列表。
chkconfig frobozz onsystemctl enable frobozz.service在下次启动时或满足其他触发条件时设置服务为启用
chkconfig frobozz offsystemctl disable frobozz.service在下次启动时或满足其他触发条件时设置服务为禁用
chkconfig frobozzsystemctl is-enabled frobozz.service用来检查一个服务在当前环境下被配置为启用还是禁用。
chkconfig --listsystemctl list-unit-files --type=service (推荐) ls /etc/systemd/system/*.wants/输出在各个运行级别下服务的启用和禁用情况
chkconfig frobozz --listls /etc/systemd/system/*.wants/frobozz.service用来列出该服务在哪些运行级别下启用和禁用。
chkconfig frobozz --addsystemctl daemon-reload当您创建新服务文件或者变更设置时使用。

打個廣告 三公 麻将 定制开发,可联系

转载于:https://my.oschina.net/u/2529353/blog/3017858

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值