小编aka*_*ecc的帖子

为什么 Ubuntu 18.04 使用 `/sbin/init` 而不是 `systemd`?

首先,这是我的系统环境:

# cat /proc/version
Linux version 4.15.0-52-generic (buildd@lgw01-amd64-051) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019

# cat /etc/issue
Ubuntu 18.04.2 LTS \n \l
Run Code Online (Sandbox Code Playgroud)

参考这个Ubuntu Wiki,ubuntu从15.04开始默认使用Systemd,Systemd以PID 1作为运行/sbin/init。但是,我在 ubuntu 18.04 上发现了不同的结果:

# ps aux | awk '$2==1{print $0}'
root         1  0.0  0.8 159692  8784 ?        Ss   Oct24   0:21 /sbin/init noibrs splash

# lsof -p 1 | grep txt
systemd   1 root  txt       REG              252,1  1595792     927033 /lib/systemd/systemd
Run Code Online (Sandbox Code Playgroud)

所以,我的问题是:

  1. 为什么 Ubuntu 18.04 使用 …

linux ubuntu init systemd

2
推荐指数
1
解决办法
4796
查看次数

标签 统计

init ×1

linux ×1

systemd ×1

ubuntu ×1