Questions tagged [systemctl]
Questions about systemctl - the main tool to interact with systemd and the service manager.
343 questions
0
votes
0
answers
11
views
Help with a systemctl error from cron in Debian
This error may be specific to systemd - or perhaps bluetooth :
This is a "headless" system. I would like to auto-connect my BT speaker after a reboot. Before upgrading my system from '...
2
votes
2
answers
113
views
I'm confused. Is my UFW firewall working or not?
Linux Endeavouros.
I don't understand how to tell if my firewall is on or not.
Using systemctl status ufw gives:
ufw.service - CLI Netfilter Manager
Loaded: loaded (/usr/lib/systemd/system/ufw....
0
votes
1
answer
33
views
"set value" for [linuxmint] 22.2 as "APT::Default-Release" in [apt-config] or "/etc/apt/apt.conf.d/*"
Like it says in the title, I've tried "Zara", "zara" and "22.2", all to no avail. Think I'll try "main" or "mint" next. Is it likely that the value ...
0
votes
2
answers
37
views
Unbind/re-bind usb device via systemctl service running as user (with a custom group)
Basically, without giving the user any new permissions, I am looking to be able to write to
/sys/bus/usb/drivers/usb/unbind
and
/sys/bus/usb/drivers/usb/bind
via a systemd service running as the ...
5
votes
2
answers
299
views
Permissions required to use machine transport with systemctl
I'm trying to set up some tasks and services on my machine across different users.
One task is to run regular backups using restic with a regular user restic. While I can skip file permission checks ...
1
vote
0
answers
91
views
Should systemctl restart be equivalent to stop + start?
Today, while trying to debug some rsyslog issues, I changed the rsyslog configuration files and then ran
systemctl restart rsyslog
A sytemctl status showed that rsyslog was running, but its log files ...
2
votes
3
answers
224
views
How to extract specific fields from systemctl output for a custom report
I would like to build a report coming from the output of certain commands.
For instance, I have the output of such command:
systemctl --type=service --state=running |
grep -e cron -e apache2 -e ...
0
votes
1
answer
190
views
systemctl daemon-reload needed after reboot
I have an issue that after each reboot my service will be gone until I do a systemctl daemon-reload.
The service:
[Unit]
Description=MyService
Requires=local-fs.target remote-fs.target
After=network....
1
vote
1
answer
526
views
How do I keep Fedora to try to suspend my system when idle?
I have a Fedora Linux system under my desk at home. It runs the Workstation setup (with GNOME) even though it mostly is used headless. It is my file server (samba), mail server (dovecot, mailman) and ...
0
votes
0
answers
36
views
Degraded status in Crostini container after Developer config and SSH config
systemctl status shows a Degraded state after following Chromeos Development Docs associated with and tweaking the ssh and sshd_config. I've got info about my Build&Machine specs and setup sharing&...
8
votes
2
answers
1k
views
hostnamectl: source of Firmware Age
When I run hostnamectl command, I get this output:
$ hostnamectl
Static hostname: myhostname
Icon name: computer-desktop
Chassis: desktop 🖥
Machine ID: ...
0
votes
2
answers
237
views
Can't get a systemd service to start in Fedora
I'm writing a systemd service that will literally do something "stupid," such as display an on-screen message at shutdown time, saying something such as "Thank you for using this ...
2
votes
2
answers
196
views
How to list services are only in "disabled" preset via systemctl?
I want to know which services don't start automatically with system boot because PRESET mode is disabled via systemctl list-unit-files.
Both commands produce an error message:
systemctl list-unit-...
1
vote
2
answers
300
views
systemd-random-seed.service takes a lot of time to start / timeout
I have a Linux device with several services of my own.
Kernel: 4.14.151
systemd: systemd 249 (249.11-0ubuntu3.12)
My services are written as sysvinit services and automatically generated as systemd ...
0
votes
2
answers
65
views
Unable to get user created service to launch on boot
OS: Nobara Linux 41 (up to date)
I have scoured the forums for possible solutions to this issue, however I still cannot seem to make it work.
I have a user created service that I am attempting to run ...
0
votes
0
answers
145
views
acpitool -S: solution to problem of a laptop that won't hibernate properly?
I have been struggling for over a month with a new Lenovo Thinkpad P16 Gen2 laptop running Ubuntu 22.04 LTS, that would not successfully suspend. Maybe 90% of the time it worked okay, the other 10% ...
0
votes
1
answer
2k
views
Controlling what services are included in a systemd "slice"
I've re-written this opening paragraph... trying to hide my disdain for systemd. I'll settle for saying that I find systemd's "logic" baffling, and let it go at that. To get to the question:
...
0
votes
1
answer
94
views
SpamAssassin fails to run with Systemd but works at CLI
I am trying to setup SpamAssassin on my mail server (Rocky Linux 9.5). Just a basic setup!
This is the options variable at /etc/sysconfig/spamassassin:
SPAMDOPTIONS="-d -c -m5 -H --create-prefs --...
-2
votes
1
answer
432
views
What happens when you run systemctl enable on a unit file that doesn't have an [Install] section?
When you run systemctl enable and provide it a service name, what happens if there is no [Install] section in the service?
❯ systemctl enable myapp.service
The unit files have no installation config (...
2
votes
1
answer
326
views
How to automatically start a GUI application when plugging in a USB device?
I want to automatically start a GUI application, whenever I plug in a certain USB device.
When started, the application runs in the foreground and should not run as root.
How can I do that?
In my ...
0
votes
0
answers
67
views
How to wait for child processes to finish and then restart the systemctl service to avoid downtime?
I have a situation where I want to migration from using system slice to ABC slice for a systemctl service. Now that service is running some child processes as well during communication from data plane ...
0
votes
1
answer
377
views
How to run a systemd-enabled container with Podman?
I am trying to run a systemd-enabled container using Podman, specifically with a Rocky Linux base image. While I have seen multiple references to Podman supporting systemd, I haven't been able to set ...
0
votes
0
answers
101
views
Does a systemd service send org.freedesktop.DBus.Properties.PropertiesChanged signal at boot-up?
I have 2 systemd services.
a.service
b.service
b depends on a but I don't want to explicitly mention the dependency in b.service file.
Instead I am waiting on the
org.freedesktop.DBus.Properties....
0
votes
2
answers
511
views
How to handle different enp*s0 interfaces with networking.service?
I use the networking through the networking.service and the /etc/network/interfaces configuration file on a Debian 12 system (as shown here).
Problem
I added a GPU and after rebooting, the computer ...
1
vote
1
answer
395
views
Systemd service does not start automatically at boot, service is enabled
I’m facing an issue with a systemd service I created on an Ubuntu 20.04.6 system running on an ARM64 platform. The service is supposed to execute a simple Bash script at boot, but it does not start ...
0
votes
2
answers
222
views
Systemctl does not start my enabled service automatically on bootup
I have created and enabled my custom systemd 253.1 service file on Linux. I ran 'systemctl enable samba-container' successfully and the 'systemctl status' command shows that the service is enabled.
I ...
0
votes
1
answer
105
views
Systemd services ran in user mode giving unexpected permission errors
Trying to run a systemd service with systemctl --user start foo.service which contains ExecStart=touch /bar/baz where /bar has permissions drwxrwxr-x 1 root storage. The user running the command ...
0
votes
2
answers
465
views
First ssh-agent request fails on WSL with systemd socket-activation
Running Fedora on WSL2, I find that the socket activation on ssh-agent doesn't quite work properly: the first request that triggers the actual service starting fails. This may be a git fetch or git ...
0
votes
1
answer
251
views
Do i have to do restart the audit daemon manually after fedora regular update?
While regular updating (not version upgrade) my fedora 39 system via dnf update this error message appeared.
Ausgeführtes Scriptlet: audit-3.1.5-1.fc39.x86_64 ...
0
votes
1
answer
172
views
Systemctl unit fails on "Requisite", but still executes "ExecStart" command
I'm trying to create a systemctl unit, that will only start if another one is active. As far as i know, it can be done by specifying a Requisite field. Thus, i've configured my unit like so:
[Unit]
...
1
vote
0
answers
1k
views
How to get PPPD to work with systemd-networkd?
This appears similar to another question, but nothing was ever followed up on it.
I'm currently having trouble with pppd as a systemd service. I'm waiting for the network adapter to come online before ...
0
votes
0
answers
34
views
executing script in systemctl does not take the arguments [duplicate]
I have a systemctl service which does not take the arguments. It works on the command line, but not within systemctl.
[Service]
Type=forking
User=sunyata
WorkingDirectory=/home/sunyata/steamsrv/...
0
votes
2
answers
144
views
Battery notification script works on its own but does not work when triggered by a systemd-service
On my Gentoo Linux with dunstify as a notification daemon and StumpWM as a window manager, I wrote the following bash-script that is meant to inform me about my battery status:
#!/bin/bash
#This ...
1
vote
2
answers
935
views
systemctl daemon-reload: show diff between running config and current file
I run the following command :
systemctl status tomcat10.service
#and get the following warning:
Warning: The unit file, source configuration file or drop-ins of tomcat10.service changed on disk. Run '...
2
votes
1
answer
705
views
How do I enable hibernate for all users (no sudo)?
I managed to resize my LVM partitions, set up my swapfile, and disable secure boot, so now I can hibernate with sudo systemctl hibernate. However, I want to be able to hibernate from my power menu (...
0
votes
1
answer
256
views
libvirtd not starting after unsuccessful GPU passthrough
I attempted to follow this guide on Ubuntu 22.04:
https://wiki.gentoo.org/wiki/GPU_passthrough_with_libvirt_qemu_kvm
I didn't need to change my BIOS or my Kernel, and I skipped the step involving the ...
1
vote
0
answers
164
views
SELINUX issue running systemctl from script invoked by rsyslogd
We have a constant issue where sssd is getting itself in failed state when an oom-killer event happens and kills a user's memory hog job. No idea why this happens as the oom-killer is not touching ...
0
votes
1
answer
74
views
Interactive: systemctl on boot not the same as systemctl via CLI!
I want to execute an interactive session on the console via systemctl on boot up.
My .service file looks something like this:
[Unit]
Description=My service.
[email protected] network-online....
-1
votes
2
answers
1k
views
What's the difference between `active` and `running` states of `systemctl list-units`?
I see from manual of systemctl that's the difference is high- and low- levels.
What does that mean?
I suppose that active means "started automatically while OS starts" and running means &...
0
votes
1
answer
86
views
What is starting a particular service
I am running AlmaLinux 9, and I have a service (called it "X"). I want to figure out what is starting service X (since it is disabled).
Is there a command that will show which other service ...
0
votes
1
answer
210
views
systemctl status lists the same service twice?
This is a somewhat mystifying situation - not a crisis as far as I can tell, since the service in question still seems to work.
The background is, I wanted to upgrade to the latest apache2, which isn'...
0
votes
1
answer
642
views
RHEL service works when starting manually, but won't start automatically when enabled for reboot. (main process exited, code=exited, status=126/n/a)
I created a linux service to start a shell script when the server (re)starts.
While testing my server I saw that the service is able to start when I do it manually but won't start when I enable it ...
0
votes
0
answers
125
views
systemd does not restart service after power loss though Restart=on-failure
I have a weather station service, weewx, on a Raspberry Pi 3. When there is a power cut (thunderstorm), the Pi reboots when the power is back, but not the service weewx which remains in "inactive&...
0
votes
1
answer
230
views
systemctl --type=service and systemctl list-unit-files do not show all services
I have wireguard installed on a Manjaro host, and Debian Server host
The following commands show wireguard in the results on Manjaro, but nothing on the Debian server, yet the wireguard is definitely ...
1
vote
1
answer
700
views
How to enable IPv6 on subinterface in Linux using sysctl?
I tried the following:
sysctl -w net.ipv6.conf.Ethernet1.200.disable_ipv6=0,
but it gave following error:
sysctl: cannot stat /proc/sys/net/ipv6/conf/Ethernet1/200/disable_ipv6: No such file or ...
4
votes
2
answers
2k
views
How can I list services and timer units with systemctl which can be enabled after installing new unit files?
My situation
I installed a few new unit files under $HOME/.local/share/systemd/user/
ls -1 $HOME/.local/share/systemd/user/
some.service
some.timer
some_other.service
I ran the following command to ...
5
votes
2
answers
844
views
Reason for processing `systemctl status` via command substitution?
In a script, I've found a curious way to process systemctl status's output:
echo "$(systemctl status the_unit_name)" | grep -q 'Active: active'
instead of the obvious:
systemctl status ...
0
votes
1
answer
218
views
Prevent defunct of child process when systemctl exits
I have 1 service registered with systemd
open_ssh.script
autossh -M 0 -L 8080:127.0.0.1:8080 -i .ssh/id_rsa USER@HOST -fN
auto_open_ssh.service
[Unit]
Description=SSH Tunnel Service
After=network....
1
vote
1
answer
219
views
How to indicate hour range in Timer using OnCalendar?
systemd 219 version
Ubuntu 22.04.2 LTS
[Unit]
Description=Run myscript.service every 5 minutes
[Timer]
OnCalendar= *-*-* 10-23:10/5:00
Persistent=true
[Install]
WantedBy=timers.target
I need to run ...
0
votes
1
answer
84
views
systemd units disabled when calling systemctl daemon-reload
I am debugging some embedded system running systemd. The behavior I am observing is that the systemd targets basic.target, local-fs.target and multi-user.target are disabled after I run systemctl ...