Questions tagged [systemd]

Systemd is a replacement for the classic init during boot.

When booting most linux systems many items need to be bootstrapped, services started, networks configured etc etc. One of the classic ways to do this was init and init scripts. This worked quite well, but performance was sometimes lacking, which was not an issue on classic setups sunch as servers.

However over time the setups diverged and a modern Linux program may need to consider many variations in these scripts.

Red Hat (in the form of the software engineers Lennart Poettering and Kay Sievers) wrote a replacement called systemd. This 'new init' is supposed to be faster and more capable, and hopefully the new joined standard on many Linux distributions.

There has been some complains about the current stability and the complexity of the new, tightly integrated system. While stability is likely to increase over time the system does not adhere to the Unix philosophy, making it a hotly debated issue.

795 questions
479
votes
7 answers

How to remove systemd services

If I install a new service then decide I don’t want that application anymore and delete it, the service is still listed in the output from systemctl as error. Where is this coming from and how can I remove them thoroughly?
eMeL
  • 4,891
  • 3
  • 15
  • 7
83
votes
4 answers

systemd - Giving my service multiple arguments

Is it possible to give my systemd service more than one argument? I'd like to execute a program with multiple arguments which have to be decided by the final user. E.g: ./program arg1 arg2 To start it a single argument app I'd need something like…
peperunas
  • 1,221
  • 3
  • 12
  • 16
62
votes
6 answers

Writing a service that depends on Xorg

I'm trying to write a user level service for redshift, and it needs to wait until Xorg is up and running. My current service file looks like…
mkaito
  • 2,032
  • 1
  • 14
  • 17
61
votes
1 answer

systemd forking vs simple?

I am writing my first systemd unit file. For Type, there are a few choices: forking, simple, etc. I have read the Redhat Documentation on this topic (Table 9.9) , but still am not sure when I should use which option. Any guidelines?
leeyuiwah
  • 773
  • 2
  • 6
  • 8
55
votes
8 answers

Start a systemd service inside chroot from a non systemd based rootfs

With init scripts (or with openrc) I alway could run services from a different installation root. but when I run chroot /somepath/to_root /usr/bin/systemctl start someservice I got: Running in chroot, ignoring request. Is there a way to force…
user2284570
  • 1,799
  • 7
  • 35
  • 62
55
votes
1 answer

The @ symbol and systemctl and vsftpd

I have a two part question. What is the significance of the @ symbol in systemctl scripts? How to start vsftpd in fedora 16, (which in some tutorials seems to contain an @ in it's name)? I have done everything the tutorials say, and it still…
rubixibuc
  • 2,002
  • 6
  • 21
  • 32
48
votes
3 answers

How do you make a systemd service as the last service on boot?

Many years ago, we can write our startup-script into /etc/rc.local. After all system services loaded, your script will run. Now, we use systemd, we don't have rc.local anymore. Systemd starts the service parallel. You can write your own service to…
比尔盖子
  • 683
  • 2
  • 7
  • 15
47
votes
1 answer

Activation via systemd failed for unit 'dbus-org.freedesktop.resolve1.service': Unit dbus-org.freedesktop.resolve1.service not found

I am using manjaro / arch linux and I see the following error messages in my system log. journalctl -f ... dbus-daemon[798]: [system] Activating via systemd: service name='org.freedesktop.resolve1' unit='dbus-org.freedesktop.resolve1.service'…
nelaaro
  • 13,149
  • 30
  • 84
  • 111
43
votes
12 answers

what causes “systemd: Failed at step USER spawning /usr/sbin/opendkim: No such process”

How can I remove following error: systemd: Failed at step USER spawning /usr/sbin/opendkim: No such process It occurs when I try to start opendkim service on Centos.
Syed
  • 531
  • 1
  • 4
  • 4
41
votes
3 answers

How do I figure out why systemctl service "systemd-modules-load" fails?

For some time I've seen some red text flashing by during boot. Today I decided to look into it. The systemctl service systemd-modules-load.service is failing with this text: tomas@bonus-debian:~$ sudo systemctl status systemd-modules-load ●…
Hubro
  • 5,716
  • 14
  • 61
  • 87
41
votes
2 answers

Restart Systemd service automatically whenever a directory changes (any file inside it)

How do I restart a Systemd service when a file change. I've got a Java service that I want to reload when any jar file changes. This is my setup: srv.service [Unit] Description=srv 0.1: Service's…
jaguililla
  • 513
  • 1
  • 4
  • 7
39
votes
6 answers

Ubuntu 17.04 systemd-resolved DNS lookups randomly fail

I upgraded to Ubuntu 17.04 and it appears to now have a new DNS resolver mechanism first introduced in Ubuntu 16.10. I am now getting DNS lookup failures 50% of the time. Every other call to nslookup is failing, with half the calls resolving fine…
moodboom
  • 725
  • 1
  • 5
  • 14
36
votes
3 answers

enabled systemd unit does not start at boot

I’ve a systemd-unit on my system that is enabled. The problem is, it doesn't restart after a reboot. It depends on two other services that are both started as expected. The service is known, enabled and dead: [centos@ansible-kube-4 ~]$ sudo…
maklemenz
  • 741
  • 1
  • 6
  • 10
35
votes
4 answers

How does WSL/WSL2/WSLg work without systemd?

As I've understood it, systemd is Linuxes' "master"-daemon, managing all other processes right after it has been started up and run its init-function. Since I had this (now resolved) issue, of not being able to use any systemd commands on WSL I…
Caeleste
  • 782
  • 1
  • 11
  • 25
32
votes
3 answers

How can I run a command after boot?

I would like to run the simple shell command echo 1 > /proc/sys/kernel/sysrq at each boot, to enable the sysrq keys. When in boot should this be done, and where should I put a script to do it?
Demi
  • 788
  • 2
  • 10
  • 20
1
2 3
52 53