1

I found two ways to change the default runlevel in systemd:

https://wiki.archlinux.org/index.php/systemd#Change_default_target_to_boot_into

# systemctl enable multi-user.target

http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions/

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

Background: I don't want to start XDM/GDM on a server.

Which is the preferred way to change the default runlevel?

2 Answers 2

2

In my opinion the best way to avoid running XDM/GDM is simply to avoid installing it. The second best way would be to disable it in systemd. There is certainly no reason to play with runlevels when you always want to boot into the very same setup.

If you still wished to do that, the way documented by upstream is generally the correct one. Archlinux wiki is unreliable in that it can contain obsolete or distribution specific information and you didn't specify whether you actually use Archlinux. In this very case if you look in the wiki again, it now says:

systemctl set-default -f multi-user.target

This command will just create/replace the link. In this exceptional case the distribution wiki now looks more up to date than the upstream FAQ.

-1

The systemctl command does it now, the ln command sets it for next boot. For a init 3 style, you want the multi-user target (no display managers). So do the ln command for a permanent change.

Good cheatsheet here: http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet for us SysVinit veterans converting to Systemd

1
  • systemctl enable doesn't perform any immediate action. Commented Apr 5, 2015 at 5:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .