问个白痴问题,systemd替代了inittab的功能,那么在systemd下是如何设置runlevel的?

2011 年 8 月 6 日
 tobecoming
6673 次点击
所在节点    问与答
6 条回复
reus
2011 年 8 月 6 日
请善用google
tobecoming
2011 年 8 月 6 日
@reus Q: How do I change the default runlevel to boot into?

A: The symlink /etc/systemd/system/default.target controls where we boot into by default. Link it to the target unit of your choice. For example, like this:

# ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

or

# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

= =........完全没有看懂
tobecoming
2011 年 8 月 6 日
@reus 建立multi-user.target和graphical.target 的同步链接,可是这两个文件和default.target 是一样的,完全就不会有变化啊= =............
reus
2011 年 8 月 6 日
ls -l /lib/systemd/system/default.target
看指向哪个呗,指向multi-user.target就相当于level3,指向graphical.target就相当于level5
reus
2011 年 8 月 6 日
其实为什么你要设置这个呢?保持默认的就ok啊
tobecoming
2011 年 8 月 6 日
@reus = =原来是这样,用vi看那两个文件还以为是一模一样的,谢谢赐教,linux新手瞎折腾,哈哈

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://v2ex.ih06.com/t/16522

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX