Questions tagged [systemctl]
122 questions
32
votes
3 answers
How do I get systemctl to print in color when being interacted with from a non-tty?
When I run a command like this:
# systemctl status plexmediaserver
I get nicely colored output. But when I run the following command:
# watch -n300 --color systemctl status plexmediaserver
Is there any way I can do this watch command with color…
cronburg
- 726
30
votes
3 answers
systemctl access denied when root
When I run
sudo systemctl disable avahi-daemon.socket
I get
Failed to execute operation: Access denied
But it's run as root, how can access be denied? (CentOS 7)
spraff
- 2,458
18
votes
4 answers
How to enable systemd on WSL2: Ubuntu 20 and CentOS 8
I'm on WSL2 (Windows Subsystem for Linux, v2) and got the CentOS 8 WSL from:
https://github.com/yuk7/CentWSL
And the Ubuntu 20 WSL downloaded from Windows Store has no systemd enabled too.
Got it run as usual, however, systemd is not running,…
Dan D
- 759
17
votes
1 answer
“sudo: systemctl: command not found” when run on CentOS 6.6
I am using CentOS 6.6. When I try running the command
sudo systemctl start elasticsearch
I get an error like this:
sudo: systemctl: command not found
As per my understanding systemctl is not supported in CentOS versions 6.9 and before.
Can someone…
CoderPJ
- 279
14
votes
1 answer
How does systemctl schedule system shutdown?
When I type shutdown -h +30, Linux somehow schedules runlevel's change within 30 minutes. On Debian, /sbin/shutdown is symbolic link to /bin/systemctl. My tests indicate that shutdown does not use neither cron nor systemd timers.
How does system…
patryk.beza
- 1,661
12
votes
2 answers
A start job is running for sys-subsystem-net-devices
So a while back I was unable to get my wifi to automatically connect in Arch Linux, I looked up some videos and found one that made me do the command sudo systemctl enable with something like netctl-auto@ and then something at the end. Well, I…
SilentStrikerTH
- 121
11
votes
1 answer
Why does systemctl show high memory usage when top and htop show much less?
I'm running an apache2.4 web server, and noticed that when I run systemctl status apache2 or run service apache2 status, it says it is using 4.2GiB of RAM, which isn't a problem for the amount of RAM I have, but I am confused, since top and htop…
Rocketman173
- 341
- 1
- 3
- 8
9
votes
0 answers
pronunciation of 'ctl' in commands like 'systemctl'
There are sorts of commands like 'systemctl', 'hostnamectl', or 'jounralctl'. I realize that 'ctl' is shorthand for control, but I'm wondering what the generally accepted pronunciation of 'ctl' is.
jlund3
- 537
9
votes
1 answer
setting environment variables from command line inside unit files
I am trying to set a date inside the unit file for logging
my unit file look like this:
[Unit]
Description=Jetty…
zozo6015
- 193
- 1
- 2
- 5
9
votes
1 answer
Error enabling sshd on Ubuntu 16.04
I just installed Ubuntu Server 16.04 on a virtual machine and then installed openssh-server. When I tried to enable sshd:
systemctl enable sshd.service
I got this message:
Failed to execute operation: Too many levels of symbolic links
Does anyone…
seven-dev
- 205
8
votes
2 answers
Ubuntu systemctl service fails with: Main process exited, code=exited, status=1/FAILURE
I am writing a python script that subscribes to some MQTT topics to localhost MQTT broker and when a message is pushed, the script will call a function in another script on the same directory to load the changes into an SQL database.
The script is…
Jazor He
- 321
8
votes
3 answers
Shorter output from systemctl status
Is there a way to get shorter/custom output from systemctl status? I really only need the active line prepended with the name of the service. So something like this:
apache2: active (running) since Thu 2020-02-06 17:20:42 +03; 16min ago
…
kaan_atakan
- 211
8
votes
3 answers
InfluxDB failed to start as a service
I'm trying to configure InfluxDB for Automatic start-up on a RHEL7 machine.
if I do:
sudo systemctl start influxdb
the service fails
[dadmin@localhost dashboard]$ sudo systemctl start influxdb
[sudo] password for dadmin:
[dadmin@localhost…
Davide
- 131
6
votes
0 answers
systemctl debian 8 jessie: Failed to get D-Bus connection: Unknown error -1
Unfortunately, in my Debian 8 jessie systemctl does not work at all.
Every systemctl command results in:
Failed to get D-Bus connection: Unknown error -1
systecmtl status udev
Failed to get D-Bus connection: Unknown error -1
How can I fix it?
I…
Ivan
- 291
5
votes
3 answers
How to debug old initd script under systemd?
I have an older initd script to start my application. It worked fine under older versions of SuSE, but fails on Open SuSE 12.3.
The strange thing is
cd /etc/init.d ; ./script start
works fine.
/etc/init.d/script start
shows a redirection to…
Gene Vincent
- 375