Questions tagged [systemd]

systemd is an alternative approach to SystemV and Upstart init daemons for Linux. It is intended to provide a better framework for expressing services' dependencies, allow more work to be done in parallel at system startup, and to reduce shell overhead.

Filter by
Sorted by
Tagged with
2 votes
2 answers
705 views

systemd service on shutdown with disk access [backup]

I'd like to run a little backup script (btrfs snapshot + transfer to usb) on system shutdown. The following service executes perfectly fine on shutdown, but not on reboot as intended: [Unit] ...
120 votes
5 answers
130k views

Systemd service - what is `multi-user.target`

I have come across a .service that contains the following: [Install] WantedBy=multi-user.target The original .service file can be found here. What is the the meaning of multi-user.target? I am on ...
3 votes
3 answers
3k views

How do I manually trigger systemd's "auto mounting" of encrypted partitions/drives?

I set up two LUKS encrypted drives to automount on system startup (using crypttab and a LUKS file key). It works fine, but unfortunately, if I disconnect one of the drives, the "auto decrypting&...
0 votes
0 answers
9 views

Can't upgrade firmware -- fwupd fails to start

I have a Thinkpad T470s running Pop_OS 22.04 and since I got it a year ago, I haven't been able to do any firmware upgrades as fwupd fails to start. When I run sudo systemctl status fwupd I get: × ...
0 votes
1 answer
2k views

Managing systemd services on read-only filesystem

I am looking for strategies how to manage enabling and disabling of systemd services on a read-only filesystem. It's not possible as the multi-user.target.wants directory contents get modified. ...
2 votes
2 answers
2k views

Suppress systemd: "Directory to mount over is not empty, mounting anyway."

I am purposefully mounting a read-write copy of a directory on top of the read-only version of itself. This generates a log message such as: Aug 27 14:31:02 svelte systemd[1]: mnt-btrfs\x2dvol-...
0 votes
1 answer
29 views

Force reboot if `fstab` mount fails instead of going to emergency mode

I have a fstab with read-only root-fs and also a rw /var mounted on a USB reader with a uSD in it. Sometimes at boot time system fails to mount /var. It looks like that the system cannot find the ...
0 votes
1 answer
17 views

unable to restart ser2net on docker container after editing ser2net.yml ad restarting docker

Edited /etc/ser2net.yml file in docker container. Added following entry in the ser2net file: connection: &con40000 accepter: tcp,40000 enable: on options: banner: *banner ...
5 votes
1 answer
2k views

How do I configure loginctl lock-sessions with i3?

Currently, I'm using i3 with xscreensaver. I would like to configure loginctl such that lock-session and lock-sessions. How is this supposed to be done? lock-session [ID...], unlock-session [ID...] ...
123 votes
2 answers
148k views

What are the systemctl options to "List all failed units"

systemctl Returns a list of the units, whether they are loaded, active, their sub and description. systemctl is-failed Returns a list of status only. What is the syntax to return the details of ...
0 votes
0 answers
27 views

Starting httpd fails in Fedora 39 on WSL2

I installed via WSL2 Fedora version 39, I also installed httpd, but when I run one of this two commands: systemctl status httpd service httpd status I get this error: System has not been booted with ...
0 votes
1 answer
2k views

Custom location for the "installation symlink" of a systemd unit file?

Enabling a systemd service to start at boot is done by enabling it. Enabling creates a symlink at a specific location. Example: $ systemctl enable rsyslog ...
1 vote
0 answers
28 views

systemd service getting disabled - why?

I have a systemd service definition (see below) and I've enabled it but in some conditions the target python script starts and returns an error after 10-20 seconds. In this condition systemd loops ...
1 vote
1 answer
300 views

logging with util-linux without systemd unit specified

If I log with util-linux logger as below: /bin/logger "hello world" I can see through journalctl my log line: journalctl --since "-1m" Oct 08 09:12:17 myhomepc duda[11670]: hello world however ...
0 votes
1 answer
37 views

How do I Get My Fingerprint Sensor to work with SDDM Login in NixOS (Plasma 6)

My fingerprint sensor works fine, in fact it works quite well except when it comes to SDDM. I use fprintd and systemd. I have looked online for solutions, one involved changing some code in a systemd ...
1 vote
1 answer
5k views

Systemd and group credentials: failed at GROUP spawning

Recently, one of my servers running Deb 10 stopped responding to everything except SSH. After solving an issue where the filesystem was read-only due to a botched fstab, I am now met with almost all ...
3 votes
1 answer
4k views

How to hide boot messages (silent boot) in debian jessie (raspberry pi)?

I'm working with raspberry pi. Previously (debian wheezy), I used the following codes to hide boot messages and have a silent boot, until a code (playing omxplayer on loop) would run from /etc/rc....
0 votes
0 answers
28 views

How to change boot order in systemd (PopOS) UEFI?

I habe Windows 10 on one partition, PopOS 22.04 on another. I managed to get them working with the systemd boot manager. How can I change the boot order in the boot menu? (I want Windows to be first, ...
1 vote
1 answer
1k views

socat: call from script, bashrc or systemd?

I want to use socat to direct serial commands over ethernet to an ethernet-serial converter (static IP address).  I am wondering what would be a good way of starting socat. As I understand it, systemd ...
0 votes
0 answers
20 views

Systemd: do not suspend if operation is performed

How to configure systemd so if an operation is being performed, do nothing on systemctl suspend and optionally suspend after the operation is completed? Operations example: archive extraction, rsync, ...
0 votes
1 answer
62 views

Is there a way to schedule a lazy timer relative to another timer?

(x-mas.service) [Unit] Description=Celebrate X-Mas [Service] Type=simple ExecStart=/usr/sbin/x-mas-day [Install] WantedBy=multi-user.target (x-mas.timer) [Unit] Description=Add "X-Mas" to ...
0 votes
1 answer
4k views

How to set default boot partition if I have two EFI partitions?

I dual boot Windows and Pop_OS!, and recently, Windows updated and screwed things up :( I have two EFI partitions on one drive, one small (old) one that I previously used for Ubuntu/Windows, and a new ...
25 votes
5 answers
27k views

Writing a systemd service to be executed at resume

my Dell laptop is subject to this bug with kernel 3.14. As a workaround I wrote a simple script /usr/bin/brightness-fix: #!/bin/bash echo 0 > /sys/class/backlight/intel_backlight/brightnes (and ...
1 vote
1 answer
24 views

How can I make auto-complete systemd unit names be case-insenstive?

Bash auto-complete helped immensely with the php-like naming conventions to systemd unit names. It completely solves the mix of Kebab-case, snake_case, camelCase. But I still get frustrated with ...
2 votes
1 answer
2k views

Login not chdir()ing to correct home directory (AD/realmd/sssd)

I'm forced (ugh) to join several linux machines to a domain. I'm currently using debian stable, and am joining the machines using a join script I wrote (at https://rbmj.github.io/join.sh for ...
0 votes
0 answers
40 views

Howto reboot system after systemd unit started?

On Ubuntu 16 Xenial (systemd version 229) I have the following systemd service: [Unit] Description=Example unit Documentation=man:apt(8) ConditionACPower=true After=apt-daily.service [Service] Type=...
994 votes
6 answers
1.8m views

How to see full log from systemctl status service?

I check service status with systemctl status service-name. By default, I see few rows only, so I add -n50 to see more. Sometimes, I want to see full log, from start. It could have 1000s of rows. Now,...
1 vote
0 answers
24 views

why systemd --user termination triggers check on every other systemd --user process?

I've a debian host with hundreds of users. Each time a user logs out, the user termination process reports a run-user-<user-id>.mount: Succeeded for every user logged in the system, causing a ...
11 votes
4 answers
23k views

Automatically enable systemd services installed using deb?

I'm building a bunch of services to install on my own (automatically created) servers. I'm migrating from upstart on Ubuntu 14.04, where services are enabled by default (we have to do extra work if we ...
6 votes
2 answers
2k views

How to create rootfs for user mode Linux on Fedora 18?

I want to create a rootfs to be used with an UML kernel and be able to use the internet. I was using febootstrap with packages: bash, coreutils, net-tools, iputils. After using febootstrap-supermin-...
0 votes
0 answers
8 views

Disable hibernate until next reboot

I have a dedicated GPU on my laptop (Microsoft Surface Book 1) which is running nixos, with systemd. The GPU is detachable and power management is a bit of a mess. So I have a script that awakens the ...
13 votes
1 answer
5k views

How do I reload a group of systemd services?

I want to reload (not restart!) a group of services upon an event. For example, if I update my SSL certificates, I want every service that uses them reloaded (nginx and postfix come to mind). Neither ...
0 votes
1 answer
41 views

Can I group a set of related systemd service files into a common directory under `/etc/systemd/system`?

The usual directory to place systemd unit files is /etc/systemd/system/ It contains a number of service files by default. If I have a number of related service files which are all part of the same ...
0 votes
1 answer
3k views

How to disable LLMNR on Ubuntu 17.10

My understanding is that if I am using third party DNS (Google, etc.) or DNS provided by my ISP (Comcast, etc.), I do not need the LLMNR feature on.  I am attempting to disable it, but setting LLMNR=...
6 votes
2 answers
2k views

Make OpenVPN restart upon new network connection on systemd

How would you go about making OpenVPN automatically restart upon connecting to a network? The issue is that every time a network connection is lost, or if the computer is booted without a network ...
0 votes
0 answers
12 views

systemd-networkd client-identifier DHCP Server and client DUID assignment with B.A.T.M.A.N mesh

I have 3 Linux boxes running kernel 5.15 and systemd version 250.5+. I have one of the boxes running as a B.A.T.M.A.N mesh master, with a DHCP Server managed by SystemD, and the other two are mesh ...
0 votes
1 answer
2k views

How to enable DNS over HTTPS (DoH) on Pop!_OS 22.04

I recently started using Quad9 DNS and now want to enable DoH(not DoT). I was looking to enable it without any third party software (This is already possible on Windows). All the guides I can find are ...
0 votes
1 answer
28 views

reboot via dbus-send without interaction?

trying to investigate why handbrake and kodi cannot shutdown or reboot my system, I narrowed the problem down to these "Interactive authentication required" messages: % dbus-send --system --...
0 votes
1 answer
63 views

systemd service restarting without any obvious cause

I have two Spring applications that chug along nicely, nothing special happening, and then out of the blue the applications restart; journalctl shows these lines: Jan 15 04:43:11 nyota.softworks.nl ...
1 vote
0 answers
12 views

Systemd logging to journal stops after service outputs very long lines

I have a process that outputs its logs to standard error, and I'm running it as a systemd service with Type=simple. I have left the StandardError and StandardOutput fields at their default values (...
0 votes
0 answers
10 views

Executing ExecStopPost on reboot

How to configure the service correctly so that the command from ExecStopPost is executed when the OS is rebooted. my.service [Unit] Description=my.service After=syslog.target After=network.target ...
4 votes
2 answers
2k views

openvpn with systemd: reconnect

I'm using openvpn enabled as a service. It works well, but once I get assigned a new IP address or lose the connection, I can't access to the internet any more. Then I have to systemctl restart ...
1 vote
1 answer
36 views

fstab and systemd automount overlay

On an embedded device based on Yocto Linux my rootfs is RO, while I have an additional partition for RW data. Now I want to automount at boot an overlay onto /etc stored on a different partition. Here ...
0 votes
1 answer
75 views

Proper way to start a shell in single user mode under systemd?

What is the equivalent way to start a shell under systemd enabled system? in sysinit/grub I would simply mount the root filesystem as rw and pass init=/bin/bash to the kernel, and optionally set it to ...
0 votes
0 answers
46 views

D-bus monitoring does work from the command line, but not as a systemd service

I wrote a bash script reading SMS messages using the ModemManager, mostly with mmcli. It works fine from the command line, but not when started as a systemd service. I quickly found out that this line ...
6 votes
1 answer
3k views

X2Go: How to enable/disable

Documentation and various internet answers suggest x2goserver will have a service on systemd systems which can be started (or stopped, etc) with systemctl start x2goserver. However, there is no such ...
10 votes
1 answer
5k views

Kill systemd oneshot service after timeout

Is it possible to kill a oneshot service after a timeout? Suppose a service is triggered periodically by a timer. The service typically takes 3 seconds to finish. However, your service is also buggy ...
0 votes
1 answer
2k views

systemd & python logging

I wrote a simple python3 skript and want to make a service from it. Here are the two files #!/bin/python3 while True: print('True') Systemd Service: [Unit] Description=True Service [Service] ...
3 votes
1 answer
89 views

Managing ordering dependencies between systemd template instances

Abstracted example: I have two recurring tasks A and B that I want to setup as systemd services. As the tasks are quite similar to each other, I am using a template [email protected]; A and B will be ...
1 vote
1 answer
3k views

High CPU Usage from systemd-udevd

I have a dell studio 1569 and just installed linux onto it. I noticed that the cpu has been running high due to systemd-udevd. Going though different posts on the web including this one, I used "...

1
2 3 4 5
92