Questions tagged [systemctl]
Questions about systemctl - the main tool to interact with systemd and the service manager.
341 questions
0
votes
1
answer
30
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 ...
4
votes
2
answers
287
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 ...
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 ...
1
vote
1
answer
489
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 ...
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: ...
2
votes
2
answers
193
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-...
0
votes
2
answers
56
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
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:
...
-2
votes
1
answer
410
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 (...
0
votes
0
answers
64
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
0
answers
97
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....
1
vote
1
answer
369
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
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
1
answer
237
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 ...
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
2
answers
141
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 ...
2
votes
1
answer
701
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 (...
1
vote
0
answers
163
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 ...
-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
207
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
0
answers
121
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&...
1
vote
1
answer
697
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 ...
5
votes
2
answers
843
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 ...
1
vote
1
answer
217
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 ...
3
votes
1
answer
9k
views
What is the preset field in systemctl status? [duplicate]
This is the output:
systemctl --user status syncthing ✔ 11:12:37
○ syncthing.service - Syncthing - Open Source Continuous File ...