How to set up a runlevel 3 in Debian 8?
Solution 1
Two things you need to know:
1) Systemd boots towards the target given by "default.target". This is typically a symbolic link to the actual target file.
2) Systemd keeps it's targets in /lib/systemd/system and /etc/systemd/system. A file in /etc/systemd/system takes precedence over those shipped with the OS in /lib/systemd/system -- the intent is that /etc/systemd is used by systems administrators and /lib/systemd is used by distributions.
Debian as-shipped boots towards the graphical target. You can see this yourself:
$ ls -l /etc/systemd/system/default.target
... No such file or directory
$ ls -l /lib/systemd/system/default.target
... /lib/systemd/system/default.target -> graphical.target
So to boot towards the multiuser target all you need do is to put in own target:
$ cd /etc/systemd/system/
$ sudo ln -s /lib/systemd/system/multi-user.target default.target
Solution 2
It is highly recommended not to mess with the manual symlink-ing, but rather use appropriate options of the systemctl
command. In this case, to set the default target you should run:
# systemctl set-default multi-user.target
Related videos on Youtube
Zobody
Updated on September 18, 2022Comments
-
Zobody over 1 year
I have installed Debian 8, but I neeed to use just multi-user text mode, runlevel 3, instead of appear my Gnome 3.
But I saw that doesn't exist
/etc/inittab
.And now?
-
JdeBP almost 9 yearsAn answer that starts out so well, and then goes rapidly downhill from the second sentence onwards. The question was about Debian Linux version 8. The "new distributions" like Debian 8 that you speak of don't use upstart. In fact, upstart has never been the default on Debian Linux.
-
vk5tu over 7 yearsThat option was added for user convenience (after answering this question, at my request, and using this answer as the reasoning for why it was needed). It's not "highly recommended" so much as "highly convenient". Wheezy has this option when systemd is updated, so upvoted your answer.