Ubuntu Runlevel

Des années que je cherchais l'information pour pouvoir changer le runlevel par défaut !

Debian/Ubuntu have switched from sysV to systemd, and systemd has it's own way of managing the boot targets (which was called runlevels) here are the commands used to set the default or switching to another target provided by systemctl:

  • systemctl isolate used to switch between targets

    • systemctl isolate multi-user switchs to the multi user target
    • systemctl isolate graphical switchs to the graphical interface target
  • systemctl get-default outputs the current default target

  • systemctl set-default changing the default boot target

    • systemctl set-default multi-user will set the default boot target to the multi user target and this will simple get done by creating a symlink /etc/systemd/system/default.target points to /lib/systemd/system/graphical.target
    • systemctl set-default graphical setting back the default boot target to the graphical interface