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. 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.

881 questions
556
votes
9 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
  • 5,661
93
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,321
67
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
  • 843
65
votes
9 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,122
63
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,212
61
votes
9 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
  • 2,020
54
votes
4 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…
比尔盖子
  • 1,403
50
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
  • 14,139
  • 30
  • 88
  • 115
48
votes
13 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
  • 581
46
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…
43
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
  • 6,016
40
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
  • 745
39
votes
7 answers

How to know if I am using systemd on Linux?

How could I know if my linux starts with systemd or whatever package?
Lucho
  • 518
37
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
  • 751
37
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
  • 848
  • 2
  • 12
  • 22
1
2 3
58 59