Questions tagged [systemd]

systemd is a collection of daemons, libraries and tools for system management. Ubuntu's Upstart system was replaced with systemd starting with Ubuntu 15.04.

systemd is intended to make the boot process faster and more efficient when compared with pre-existing init systems, such as by using parallelization.

More detailed technical information about systemd can be found on the Ubuntu Wiki and Wikipedia. Freedesktop.org also has a page for systemd.

Lennart Poettering, the author of systemd, has a blog post providing background on why systemd is needed, including some history on other init systems such as Upstart.

systemd is still considered controversial by some; many of these reasons are listed on without-systemd.org. Lennart Poettering also wrote a blog post in defense of systemd. Regardless, many major Linux distributions are switching to it. This includes Ubuntu since its parent distribution, Debian, is one of them. Ubuntu now uses systemd by default starting with Ubuntu 15.04.

1711 questions
646
votes
10 answers

How to list all enabled services from systemctl?

How can I list all enabled services from systemctl? I know running systemctl command by itself lists all services, but I would like to only get the enabled ones.
oceanBT
  • 6,697
  • 4
  • 13
  • 12
298
votes
2 answers

Difference between systemctl and service commands

systemd gives us the systemctl commands suite which is mostly used to enable services to start at boot time. We can also start, stop, reload, restart and check status of services with the help of systemctl. We can do, for example, sudo systemctl…
luv.preet
  • 5,997
268
votes
4 answers

How do I stop Apache2 from automatically starting on boot?

How do I stop Apache2 from automatically starting on boot? I can't seem to find an option that disables the automatic start-up when I turn on the machine.
chip
  • 2,971
263
votes
2 answers

How do I make my systemd service run via specific user and start on boot?

I just upgraded from Ubuntu server 14 to version 15. I had trouble getting my upstart script working after the upgrade, and read that systemd is the new default. I'm far from a linux expert, so please go easy on me :-) Here is what my upstart script…
void.pointer
  • 2,805
  • 2
  • 16
  • 12
230
votes
1 answer

How do I override or configure systemd services?

Many sysv init scripts used a corresponding file in /etc/default to allow the administrator to configure it. Upstart jobs can be modified using .override files. How do I override or configure systemd units, now that systemd is the default in Ubuntu?
muru
  • 207,228
207
votes
10 answers

Command to list services that start on startup?

Is there a command to list services that run on startup? I imagine it would involve parsing /etc/init.d/, and the various /etc/rc.* directories.
Eric H
  • 2,173
199
votes
3 answers

How do I run a single command at startup using systemd?

I'd like to startup an Apache Spark cluster after boot using the following command: sudo ./path/to/spark/sbin/start-all.sh Then run this command when the system prepares to reboot/shutdown: sudo ./path/to/spark/sbin/stop-all.sh How can I get…
macourtney7
  • 2,897
190
votes
3 answers

What is the difference between "systemctl start" and "systemctl enable"?

I installed MariaDB server to my machine. While setting up, I was met with the problem of whether I should have it enabled all the time, as the documentation I follow suggests with these steps: sudo yum install mariadb mariadb-server sudo systemctl…
173
votes
5 answers

How to disable systemd-resolved in Ubuntu?

How can I disable systemd-resolved in Ubuntu 17.04? Disabling it with systemctl disable didn't work, the service seems to be restarted (by Networkmanager?)
Bastian Voigt
  • 4,836
  • 4
  • 13
  • 21
116
votes
5 answers

Why are some systemd services in the "masked" state?

When I run the command sudo systemctl list-unit-files (I think the sudo is optional), I get output which shows all services and their state. Here is a snippet from my machine: UNIT FILE STATE ... debian-fixup.service…
knb
  • 5,292
112
votes
8 answers

systemctl failed to connect to bus - docker ubuntu:16.04 container

I'm trying to use the systemctl command in a ubuntu:16.04 docker container. I'm running the following command... systemctl status ssh However I'm getting the error... Failed to connect to bus: No such file or directory Why is this not working? Is…
110
votes
3 answers

What is the difference between "systemctl mask" and "systemctl disable"?

I want to improve the boot time of my Ubuntu GNOME 16.04 by disabling plymouth services when booting up. I've found two answers on how to do it on various websites namely: # systemctl disable plymouth-quit-wait.service # systemctl mask…
mhm
  • 1,412
107
votes
4 answers

Where is "journalctl" data stored?

When I issue journalctl I get a massive log of all system services, but where is all this information stored?
php_nub_qq
  • 1,559
  • 4
  • 11
  • 23
107
votes
2 answers

Systemd logs (`journalctl`) are too large and slow

My journalctl is keeping over 300 MB of logs as revealed by journalctl --disk-usage. Everything appears to be in order when I run journalctl --verify: $ journalctl --disk-usage Archived and active journals take up 328.0M on disk. $ journalctl…
94
votes
4 answers

Where are the systemd units/services located in Ubuntu?

I keep finding, while googling, that they're located at /usr/lib/systemd/system/ and /etc/systemd/system/. However, in my ubuntu, the first doesn't even exist, and the other has only a few services bluetooth.target.wants …
Poperton
  • 1,283
1
2 3
99 100