Linux command list

systemctl command: start, stop and inspect services

__ __ _ _____
\ \ / /__| |_|_ _|__ _ __ _ __ ___
\ \ /\ / / _ \ '_ \| |/ _ \ '__| '_ ` _ \
\ V V / __/ |_) | | __/ | | | | | |
\_/\_/ \___|_.__/|_|\___|_| |_| |_| |_
 
A sandbox for trying systemctl. Nothing here can touch your real files.
user@webterm:~/project$
 

systemctl controls the services on a Linux machine. Learn how to read `status`, why `start` and `enable` are different, and how to list what is running, by running the commands in a real terminal in your browser.

Updated: 2026-09-07

Syntax

systemctl subcommand service

It controls services, the programs that keep running in the background.

Try it first

Start by asking about the state.

$ systemctl status nginx
 nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; disabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2026-03-23 08:00:00 UTC; 2h ago

Two lines are worth reading.

LineMeaning
LoadedWhether the unit is set up. disabled means it will not start at the next boot
ActiveWhether it is running now. inactive (dead) means it is not

So it is stopped, and it will stay stopped after a reboot.

Starting it

Service operations need administrator rights.

$ systemctl restart nginx
Failed to restart nginx.service: Interactive authentication required.
See system logs and 'systemctl status nginx.service' for details.
$ sudo systemctl start nginx
$ systemctl status nginx
 nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; disabled; vendor preset: enabled)
   Active: active (running) since Mon 2026-03-23 08:00:00 UTC; 2h ago
   Main PID: 1001 (nginx)
   Tasks: 2 (limit: 4915)
   Memory: 2.3M
   CGroup: /system.slice/nginx.service
           └─1001 /usr/sbin/nginx

Now active (running), with a process id. When you only want the state, is-active is shorter.

$ systemctl is-active nginx
active

Now, versus from the next boot

This is where systemctl catches people out. Starting it does nothing about the next boot.

$ systemctl is-enabled nginx
disabled

For a service that must survive a reboot, you need enable.

$ sudo systemctl enable nginx
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service /lib/systemd/system/nginx.service.
$ systemctl is-enabled nginx
enabled
SubcommandNowFrom the next boot
startRuns itUnchanged
stopStops itUnchanged
enableUnchangedRuns it
disableUnchangedDoes not run it

"It worked until we rebooted" is the sound of a missing enable.

Listing what is running

$ systemctl list-units --type=service
UNIT                                LOAD   ACTIVE   SUB     DESCRIPTION
nginx.service                       loaded active   running A high performance web server and a reverse proxy server
ssh.service                         loaded active   running OpenBSD Secure Shell server
cron.service                        loaded active   running Regular background program processing daemon
networking.service                  loaded active   running Raise network interfaces
systemd-resolved.service            loaded active   running Network Name Resolution

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

5 loaded units listed. Pass --all to see loaded but inactive units, too.

Only running units by default. Add --all to see the stopped ones too.

Stopping it

$ sudo systemctl stop nginx
$ systemctl is-active nginx
inactive

When you actually reach for it

systemctl is the first thing you type when something that should be running is not.

SituationWhat to type
Check whether it is runningsystemctl status nginx
Apply a config changesudo systemctl restart nginx
Re-read the config without dropping connectionssudo systemctl reload nginx
Make it survive a rebootsudo systemctl enable nginx
Find out why it failedjournalctl -u nginx

Read the state with status, read the reason with journalctl. Those two carry most of a server incident.

Things that trip people up

start and enable are not the same. With only start, the service is gone after the next reboot. When you want both, sudo systemctl enable --now nginx does them together.

.service can be left off. nginx and nginx.service mean the same thing. A name that does not exist says so.

$ systemctl status nosuchservice
Unit nosuchservice.service could not be found.

status is a summary. It will not tell you why a start failed. Read journalctl -u nginx for that.

Practise it hands-on

webterm.appthis site

  • Advanced Terminal Commands

    Learn commands for specific situations

    Try the tutorial

learn.webterm.appa separate site

>_WEBTERM LEARN

WebTerm Learn: from one command to actually using it

Commands stick when they show up in a real sequence of work, not one at a time. There is a course that builds them up in order.

See the course

Related commands

journalctl / sudo / ps / kill

Frequently asked questions

What is the difference between start and enable?
`start` runs it **now**; `enable` makes it run **from the next boot**. For both at once, `sudo systemctl enable --now nginx`.
I get Interactive authentication required.
Starting and stopping services needs administrator rights, so put `sudo` in front. Read-only subcommands such as `status` and `is-active` do not need it.
restart or reload?
`restart` stops the process and starts it again. `reload` asks a running service to re-read its configuration, which keeps connections alive. Not every service supports reload.
How do I list what is running?
`systemctl list-units --type=service`. Only active units are listed by default; add `--all` to include the stopped ones.
Where do I see why it failed?
`journalctl -u <service>`. status only summarises; the reason a service failed to start is in the log.