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-defaultYou might get:
graphical.targetThis 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.targetChange between runlevels / boot targets
On SysVinit, you can use this command:
sudo init 3 # switch to runlevel 3
sudo init 1 # single-user modeWhen using systemd Linux box, do this:
To change to multi-user (non-GUI):
sudo systemctl isolate multi-user.targetTo switch to GUI:
sudo systemctl isolate graphical.target
Single-user mode (rescue mode):
sudo systemctl isolate rescue.targetBelow is a brief table summary for the commands in Linux for both SysVinit and systemd:
| Task | SysVinit Command | systemd Command |
|---|
| View current runlevel | runlevel | systemctl get-default |
| Change runlevel | init 3 | systemctl isolate multi-user.target |
| Set default runlevel | Edit /etc/inittab | systemctl set-default target |
| Shutdown now | shutdown -h now | shutdown -h now |
| Reboot now | reboot | reboot |
| Send user warning | wall "message" | wall "message" |
| Kill a process | kill PID | kill PID |
| Power management | acpid | acpid + 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!

