Questions tagged [systemd]
Systemd is a replacement for the classic init during boot.
847
questions
1
vote
1
answer
17
views
Can I define and use a variable to use in systemd unit file itself?
Trying to avoid possible mistakes I'd like to define and use variables to be used withing the systemd unit file itself, i.e.: not for the command executed.
For example consider this (invalid) unit:
[...
1
vote
0
answers
53
views
systemd: ensure, service is started after mysql
I have a systemd path unit, which watches a config file to apply db changes if the config file changes. To ensure the path unit runs after mysql, I added these lines:
Wants=mysqld.service
After=mysqld....
1
vote
0
answers
26
views
What does "job result is dependency" mean, and how do I debug it?
Here's my nice failure output, with PII snipped out:
command was journalctl -xu my_service
Jun 24 21:47:03 ip-XX-XX-XX-XX systemd[1]: Dependency failed for Runs the server.
░░ Subject: A start job for ...
0
votes
1
answer
21
views
Systemd Service not being loaded when migrating from Debian 8 to Yocto
I have an app.service that I have been using on a debian machine that is symlinked to /etc/systemd/system/multi-user.target.wants it works well and starts my app.
I have recently been working on ...
0
votes
1
answer
104
views
Automatically mount a per-user drive on login with systemd
I have a NAS which provides SMB/CIFS shares and I've also just set up a new PC (running EndeavourOS/Arch) and want to automatically mount those shares. In the past I've always handled this by simply ...
1
vote
0
answers
84
views
How can I use unified kernel images with Ubuntu and Debian?
I would like to use unified kernel images (UKIs) and systemd-boot to take advantage of some of the hardware security features it provides (such as measured boot and real secure boot). I think that the ...
0
votes
0
answers
62
views
Systemd-resolved and ping
The question
Systemd-networkd succesfully requests an IP address for my computer and routes its traffic to and from the gateway as expected.
Systemd-resolved can correctly resolve FQDNs and IP ...
0
votes
0
answers
54
views
How to indefinitely restart a systemd service until it succedes?
I have a systemd service on a machine that could be killed (or otherwise fail) which I want to restart upon failure indefinitely, trying a restart every 2 seconds until it succeeds (or the end of the ...
0
votes
1
answer
42
views
What happens to core dump when pid is reused
When using the core dump management system called systemd-coredump we can see the list of core dumps with coredumpctl list.
The list of core dumps is listed with date and pid.
To extract the actual ...
0
votes
0
answers
56
views
systemd-networkd gains ipv6 but not ipv4
hoping for some help debugging a systemd-networkd issue.
I have both systemd-networkd and wpa_supplicant.
I've enabled a [email protected] systemd unit that corresponds with an /etc/...
0
votes
0
answers
46
views
How to detect the hibernation phase for suspend-then-hibernate without env variable?
On Ubuntu, it's possible to run a script before and after a laptop is suspended by adding a script to /lib/systemd/system-sleep. When using the suspend-then-hibernate command, officially it's possible ...
0
votes
0
answers
58
views
Running an application with an VPN in a systemd-nspawn container while host is using different VPN
My host is behind a NAT and connects to some other bastion host via wireguard, on interface wg0, with AllowedIPs set to 0.0.0.0/0,::/0, which routes all traffic through that bastion host.
Now, I'd ...
0
votes
0
answers
46
views
Possible to expand/use a variable value, in another variable, in a systemd service file?
All I want to do, is to re-use the name I enter in the User= specification in a systemd .service file; e.g. I would have liked to do this in a .service file:
# ...
User=my-username
Environment="...
0
votes
1
answer
23
views
What is the difference/precedence of resolved.conf and a .network configuration?
There are two places where I can set up the DNS server for a systemd linux (static configuration):
in /etc/systemd/resolved.conf, in the [Resolve] section, a DNS= entry
in /etc/systemd/network/<...
0
votes
0
answers
95
views
Linux systemd-resolved not answering MulticastDNS
In general, I'm currently replacing all networking stuff with the builtin systemd facilities. NetworkManager, dnsmasq, dhcpcd, avahi-daemon -- all gone, and things seem to be mostly working.
Except ...
0
votes
0
answers
33
views
"Failed to Mount API filesystems". On copied drive with updated partition UUID's
So I directly cloned the partition layout of my main linux installation.
Which is Fedora 38, using commands as follows.
sgdisk --backup=table /dev/sda
sgdisk --load-backup=table /dev/sdb
I updated ...
0
votes
0
answers
76
views
Simple CentOS 7 systemd service doesn't run on CentOS 9
I'm running a minecraft server on CentOS 7 using this systemd service to restart it on crashes.
The service config is located at /etc/systemd/system/my_minecraft_server.service:
[Unit]
Description=...
0
votes
2
answers
127
views
Cannot change interface name for add-in network card
I am trying to assign persistent names to network interfaces on a Linux Mint 21.3 PC. This particular PC often has PCIe devices added and removed, so the 'predictable' naming scheme of enpXs0 is ...
1
vote
0
answers
31
views
Different results from a script when using absolute or relative path in Linux
I get different behaviors running “/etc/init.d/wls start” compared to changing to the /etc/init.d directory and running “./wls start” on a RHEL 8 Linux system. The first one uses “systemctl” while ...
1
vote
0
answers
28
views
How to run a program after the last modification of a file with systemd?
I'd like to run a program after the last modification of a particular file. The program should not be run concurrently with itself. If the file is modified while the program is running, it should be ...
0
votes
1
answer
40
views
Firefox has permission to start wpa_supplicant when calling navigator.geolocation
I've been dealing with some annoying attacks lately, and got super paranoid after discovering wpa_supplicant.service running as it definitely should not be on this particular machine. After a little ...
0
votes
0
answers
67
views
How to start tomcat at boot time as a systemd service?
This is my Unit file:
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
Wants=network.target
After=syslog.target network-online.target
[Service]
Type=forking
...
0
votes
0
answers
98
views
systemd before,after,requires all not working like expected
I have an nfs mount on a debian12 system running systemd252, i need this to be mounted at startup before zfs but after network-online.target, so i tried using /etc/fstab but that keeps loading before ...
0
votes
0
answers
134
views
debian 12 , systemctl-timesyncd is inactive on boot
I have tried follow ways to enable systemd-timesyncd , but not working. after reboot , it still is inactive , although it's active before reboot.
1.
timedatectl set-ntp yes
sudo systemctl enable ...
1
vote
0
answers
44
views
Is CPUQuota per core or per machine?
In order to prevent buggy sites from freezing my system I imposed a CPU Quota limit of 95%, a Memory High of 2G and a Memory Max of 3G on my Firefox flatpak as described by the flatpak documentation.
$...
0
votes
0
answers
218
views
Failed to enable unit: Invalid argument systemctl enable .service
I have made a startup_test.sh with the following contents
cd /home/xyz/Desktop/
gnome-terminal -e "bash -c ./efg"
#desktop folder contains an executable named efg.
If I run gnome-terminal -...
0
votes
2
answers
49
views
How would you include a specific module to load at boot in Debian?
I am working with Klipper for 3D printing, and I came across a pull request that allowed for TTY support in Klipper, to allow a Mosaic Palete 3 Pro to control the printer for its Connected Mode.
I ...
0
votes
0
answers
81
views
Failed to start User Manager, No CGroup Medium Found
I have run into a strange issue that, from what I can tell, the root cause is associated with or directly related to CGroups. Unfortunately I do not understand enough about SystemD or CGroups to know ...
1
vote
1
answer
213
views
start non-root user systemd and systemd services via sudo without enable-linger
I'm like to be able to start a systemd session (e.g. systemd --user) for a given non-root user, and subsequently start a service (e.g. systemctl --user start SERVICE.service), all via a sudo -iu USER ...
0
votes
0
answers
131
views
Running aplay via systemd
As per this post, I seem to be able to work around a problem with sound playback by running aplay -f cd /dev/zero. I've put the command into a script at ~/Scripts/openAudio. I want the script to run ...
0
votes
1
answer
292
views
How to configure systemd-resolved's mDNS responder to respond to multiple hostnames?
Is there a way to configure systemd-resolved's mDNS-responder behavior so that my Linux box will respond to more than one mDNS hostname?
For example, I'd like to be able to ping my linux box (from ...
0
votes
0
answers
140
views
Debian 12 bookworm - snap: install error access denied
I am trying to snap install the multipass package under Debian 12 bookworm (running under WSL), but I'm getting an error during the install.
This is a new problem. snap previously worked and ...
0
votes
0
answers
26
views
Is it possible to create a non-forking vnc service?
I followed this article to create a vnc service. The service is forking and uses a PID-file. My version of the service description — [email protected] — looks like this:
[Unit]
Description=Start ...
0
votes
0
answers
100
views
notify-send messages sent from a systemd unit delayed
There's an active systemd service
[Unit]
Description=Launch the screenlock daemon service
PartOf=graphical-session.target
After=i3wm.service
[Service]
Type=simple
ExecStart=env screenlock-daemon
...
0
votes
1
answer
499
views
How to reload system-connections files?
After I edit a file in /etc/NetworkManager/system-connections/ I tried:
nmcli conn reload
systemctl daemon-reload
systemctl reload NetworkManager
systemctl restart NetworkManager
but no matter what, ...
1
vote
2
answers
1k
views
How to start systemd user service at login
I am trying to start a systemd user service at user login. But my service keep starting at boot and remain running after I logout. I am on Linux Mint 21.2. Here is what I did so far.
Create unit file ...
0
votes
1
answer
216
views
How to make sure a process spawned via ssh get's terminated with the connection?
Apparently people try to keep processes they started via ssh running even when the connection is gone, see https://duckduckgo.com/?q=ssh+process+still+active+after+connection+close
So I was believing ...
0
votes
0
answers
133
views
systemd-networkd: Updating statically assigned ipv6 prefix
I want to be able to change my statically assigned ipv6 address prefix in my systemd-networkd configuration file without rebooting my entire system. For example if I entered the following in a file /...
0
votes
1
answer
381
views
Run a systemd service at logout
I have a script that I want to run at logout/reboot and shutdown with a .service file in /etc/systemd/system.
[Unit]
Description=My description
DefaultDependencies=no
Before=poweroff.target halt....
0
votes
1
answer
43
views
Does fsck.mode=force in GRUB overrides 6th column option in fstab?
I set fsck.mode=force fsck.repair=yes against GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub file. Will this option override numbers set in the 6th column of /etc/fstab? For example, will my root ...
0
votes
0
answers
113
views
Rotate journald at a specific time
Is it possible to either configure journald to rotate logs at a specific time of day, or to externally trigger a log rotation (say in a systemd timer or cron job)?
The reason is to play nicely with ...
1
vote
1
answer
1k
views
Set umask for systemd service, but files created by the process are still using the default
This is the unit for the Transmission torrent client, which was compiled and installed from source.
/etc/systemd/system/transmission.service:
[Unit]
Description=Start the Transmission daemon
After=...
0
votes
1
answer
411
views
Systemd service timing out/restarting every few minutes even though service runs successfully
I have a Raspberry Pi 5 8gb running Raspberry Pi OS and the issue I'm having is that qbittorrent-nox, that I installed using apt keeps crashing after around 1 minute and 30 seconds.
Since I have a ...
0
votes
1
answer
472
views
Disable stdout buffering in systemd, how to make it print everything?
On Debian, when I ask for service status, it only prints out a few lines:
sudo service tor status
CPU: 3ms
Dec 15 17:57:27 systemd[1]: Starting tor.service - Anonymizing overlay network for ...
0
votes
2
answers
1k
views
NetworkManager slows down shutdown and more in Debian 12?
First problem
Since I last updated my computer earlier this week, my computer started needing about 11 minutes to turn off. At first glance, it is NetworkManager.service and wpa_supplicant.service ...
0
votes
0
answers
77
views
How to run Apache airflow that is installed by PyPy as systemd?
I installed Apache airflow using PyPy and the executable is in
/home/my_user/anaconda3/envs/my_env/bin/airflow
The installation is working fine and I wanted to make it a systemd.
[Unit]
Description=...
0
votes
0
answers
460
views
Debian can't wake up after suspend
After some time my system suspending. After the system has suspended itself I can't wake up the computer.
I use Debian 12 and KDE.
How to fix that?
0
votes
1
answer
336
views
WSL not initializing because of systemd-firstboot.service
I had an issue with my WSL after enabling systemd, it was stuck initializing. I have an arch distro set up, so this might be specific to that.
WSL-Version: 2.0.9.0
Kernelversion: 5.15.133.1-1
...
0
votes
1
answer
117
views
Linux Mint: Network connection only several seconds after boot
I have the following problem:
After the boot process, it takes a few seconds until a network is available. This means, for example, that network drives cannot be mounted or certain websites are only ...
0
votes
0
answers
72
views
How can I verify the scripts in /lib/systemd/system-shutdown are being run?
I have a simple script that I want to run just before shutdown. I'm trying to verify this script are being run but I'm not seeing any messages from my script on my system's debug serial, kernel log, ...