Reviewing the differences between Linux SysVinit (runlevels) and Systemd (targets) commands was something I was always curious to learn. After taking a walk in New York City during the summer I decided to put this list together.

How to see the current runlevel in Linux?

SysVinit (older systems)

Default runlevel is set in: /etc/inittab
Example line:

id:3:initdefault:

This means runlevel 3 (multi-user, no GUI).

systemd (modern systems)

Use this command to check it out:

systemctl get-default

You might get:

graphical.target

This means this is set to graphical mode using GUI for Linux.

If you want to switch to multi-user mode (non-GUI), the run:

sudo systemctl set-default multi-user.target

Change between runlevels / boot targets

On SysVinit, you can use this command:

sudo init 3   # switch to runlevel 3
sudo init 1   # single-user mode

When using systemd Linux box, do this:

To change to multi-user (non-GUI):

sudo systemctl isolate multi-user.target

To switch to GUI:

sudo systemctl isolate graphical.target

Single-user mode (rescue mode):

sudo systemctl isolate rescue.target

Below is a brief table summary for the commands in Linux for both SysVinit and systemd:

TaskSysVinit Commandsystemd Command
View current runlevelrunlevelsystemctl get-default
Change runlevelinit 3systemctl isolate multi-user.target
Set default runlevelEdit /etc/inittabsystemctl set-default target
Shutdown nowshutdown -h nowshutdown -h now
Reboot nowrebootreboot
Send user warningwall "message"wall "message"
Kill a processkill PIDkill PID
Power managementacpidacpid + journalctl

Hopefully this helps someone out there. It helps me to review the Linux basics. I usually tend to forget them. If you like my content consider grabbing one of my T-Shirt of coffee mugs designs in my ITPro Helper shop. Thanks!

Leave a comment

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