6

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?

  • 2
    Even before systemd Debian never split text vs graphics mode into run levels. The default run level was always 2, for graphics and text. – jordanm Jun 17 '15 at 1:36
  • 1
    Forget about runlevels. – JdeBP Jun 17 '15 at 14:46
18

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
  • Ok, thanks for your reply. But exists a Documentation that is listed all changed in Debian 8? – Vitor Mazuco Jun 18 '15 at 14:43
8

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
  • 1
    That 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. – vk5tu Feb 18 '17 at 11:45
0

You MUST HAVE ROOT PRIVILEGE to do that in Debian.

Firstly, su. Then enter root password.

when you have root privilege, just type init [runlevel] or `telinit [runlevel] is OK.

Because init is under /sbin and Debian is so simplified. It have no feature like Ubuntu which will tell you that init is under /sbin, you must have root privilege to do that.

By the way, poweroff, reboot and so on are all in similar situation as init.

If you just want to shutdown or reboot, type systemctl poweroff or systemctl reboot. It will shutdown or reboot system without require root privilege.

-1
root@kali:~# systemctl set-default runlevel3.target 
Created symlink /etc/systemd/system/default.target → /lib/systemd/system/multi-user.target.
-5

The new distros don't use /etc/iniitab. They instead they use /etc/init/rc-sysinit.conf. So there are a few ways of doing this:

  1. edit the kernel comand line in bootloader configuratoin file (if its grub, then grub.cfg)

  2. edit /etc/init/rc-sysint.conf (DEFAULT_RUNLEVEL=2)

  3. Choose to Edit at the bootmenu locate the kernel line, add a space and specify the run level as shown here :

https://wiki.debian.org/RunLevel

  • 2
    An 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. – JdeBP Jun 17 '15 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.