V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
tobecoming
V2EX  ›  问与答

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

  •  
  •   tobecoming · 2011-08-06 01:49:24 +08:00 · 5396 次点击
    这是一个创建于 4658 天前的主题,其中的信息可能已经有所发展或是发生改变。
    6 条回复    1970-01-01 08:00:00 +08:00
    reus
        1
    reus  
       2011-08-06 10:42:24 +08:00
    请善用google
    tobecoming
        2
    tobecoming  
    OP
       2011-08-06 12:05:46 +08:00
    @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
        3
    tobecoming  
    OP
       2011-08-06 12:15:11 +08:00
    @reus 建立multi-user.target和graphical.target 的同步链接,可是这两个文件和default.target 是一样的,完全就不会有变化啊= =............
    reus
        4
    reus  
       2011-08-06 18:22:13 +08:00
    ls -l /lib/systemd/system/default.target
    看指向哪个呗,指向multi-user.target就相当于level3,指向graphical.target就相当于level5
    reus
        5
    reus  
       2011-08-06 18:22:35 +08:00
    其实为什么你要设置这个呢?保持默认的就ok啊
    tobecoming
        6
    tobecoming  
    OP
       2011-08-06 21:02:28 +08:00
    @reus = =原来是这样,用vi看那两个文件还以为是一模一样的,谢谢赐教,linux新手瞎折腾,哈哈
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5890 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 03:10 · PVG 11:10 · LAX 20:10 · JFK 23:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.