linux 下的 service 和systemctl 服务管理方式

linux 下的 service  和systemctl 服务管理方式

man service 得到:执行一个system V 风格的启动脚本

service - run a System V init script

man systemctl 得到: 控制systemd 系统和服务管理器

systemctl - Control the systemd system and service manager

  • systemd:完全替代init,可并行启动服务,并能减少在shell上的系统开销,相比传统的System V是一大革新,已被大多数Linux发行版所使用。
init(为英语:initialization的简写)是 Unix 和 类Unix 系统中用来产生其它所有进程的程序。它以守护进程的方式存在,其进程号为1。Linux系统在引导时加载Linux内核后,便由Linux内核加载init程序,由init程序完成余下的引导过程,比如加载运行级别,加载服务,引导Shell/图形化界面等等。

Unix 系列中(如 System III 和 System V)init的作用,和研究中的 Unix 和 BSD 派生版本相比,发生了一些变化。大多数Linux发行版是和 System V 相兼容的,但是一些发行版如Slackware 采用的是BSD风格,其它的如 Gentoo 是自己定制的。后来Ubuntu[1][2] 和其他一些发行版采用 Upstart[3] 来代替[4] 传统的 init 进程。至2015年,大部分Linux发行版都已采用新的systemd替代System V和Upstart,但systemd向下兼容System V。

  

猜你喜欢

转载自www.cnblogs.com/zy09/p/11120453.html
今日推荐