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.

1606 questions
573
votes
9 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
  • 5,948
  • 4
  • 11
  • 11
287
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,687
  • 8
  • 23
  • 41
257
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,831
  • 4
  • 16
  • 13
236
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,535
  • 2
  • 13
  • 12
196
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
  • 193,181
  • 53
  • 473
  • 722
194
votes
9 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,043
  • 2
  • 14
  • 5
184
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,747
  • 6
  • 16
  • 26
169
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…
Chathurika Senani
  • 1,819
  • 3
  • 11
  • 11
160
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,526
  • 4
  • 11
  • 20
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…
Duncan Gravill
  • 2,315
  • 4
  • 12
  • 9
102
votes
4 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
  • 4,804
  • 4
  • 33
  • 40
99
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,479
  • 3
  • 11
  • 22
97
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…
vanillascotch
  • 1,282
  • 2
  • 12
  • 13
89
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…
WinEunuuchs2Unix
  • 99,709
  • 34
  • 237
  • 401
88
votes
3 answers

How can I flush the DNS on Ubuntu 17.04?

How can I flush the DNS on Ubuntu 17.04? I seem to have a few DNS issues at the moment since upgrading to 17.04 from 16.10 and went to flush the DNS but I can't find how to. Can anyone tell me please?
dibs
  • 3,479
  • 8
  • 27
  • 38
1
2 3
99 100