How to configure systemd to boot Linux to console mode (runlevel 3)?

How to configure Linux (am using Fedora 21) managed by systemd to boot to console (init 3) mode?

systemd has the concept of targets as a more flexible replacement for runlevels in sysvinit.

Runlevel 3 is emulated by multi-user.target. runlevel3.target is a symbolic link to multi-user.target.

You can switch to ‘runlevel 3’ by running

# systemctl isolate multi-user.target 

On boot, systemd activates the target unit default.target whose job is to activate services and other units by pulling them in via dependencies. systemd parses its own kernel command line argument systemd.unit=.

This may be used to temporarily boot into the multi-user.target boot unit:

systemd.unit=multi-user.target

On some systems you have to disable the `lightdm.service` or `kde.service` or `gdm.service` whichever might be still active

# systemctl disable kde.service
# systemctl disable lightdm.service
# systemctl disable gdm.service

Eric Z Ma

Eric is a father and systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

2 comments:

  1. If your system still boots into gui despite the above steps:
    On some systems you have to do one more thing: disable the lightdm.service or kde.service whichever might be still active

    systemctl disable kde.service
    or
    systemctl disable lightdm.service

Leave a Reply

Your email address will not be published. Required fields are marked *