标签:systemd

systemd

systemd 是linux操作系统的系统和服务管理器,作为boot启动后的第一个进程(PID=1),systemd扮演初始化系统,以及启动和维护用户空间服务。

为了兼容SysV,如果systemd初始化被调用并且进程id不是1,它将执行telinit,并且将同步参数到该应用,所以在正常系统登录状态下的init和telinit是等同的。更多信息通过man telinit 了解。

当作为系统实例启动,systemd通过system.conf 解析配置文件,如果作为用户进程启动,从user.conf解析配置文件,更多信息通过systemd-system.conf 了解。

  • 系统同时存在sysV init脚本使能和systemd service,那么到底是生谁效的?

    如果同时存在systemd 单元文件和sysVinit脚本,亦或者upstart配置文件,理论上systemd>sysv init>upstart.

  • 如下路径的unit 关系,哪些unit是使能的?

    参考 man systemctl ->COMMANDS->Unit File Commands-> enable NAME...

    在/lib/systemd/system 保存了所有unit file,其中部分.service 文件包含[install] 部分,当调用...