Questions tagged [systemctl]
115 questions
29
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
- 696
- 1
- 7
- 14
28
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,106
- 5
- 37
- 58
17
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,…
Dee
- 641
- 1
- 10
- 20
16
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
- 269
- 1
- 2
- 3
12
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,521
- 5
- 21
- 31
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
- 1
- 1
- 7
9
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
- 321
- 2
- 7
7
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
- 517
- 6
- 13
7
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
- 173
- 1
- 5
7
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
- 121
- 1
- 1
- 5
7
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…
SadSeven
- 185
- 1
- 1
- 5
6
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
- 141
- 1
- 1
- 4
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
- 281
- 4
- 9
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
- 335
- 6
- 16
4
votes
3 answers
`systemctl --user` results in "Failed to connect to bus" in google compute instance
I'm connected to a google compute instance via ssh with Debian 9. When I try any systemctl --user ... command (systemctl --user status for instance) I get an error: "Failed to connect to bus: No such file or directory".
I have tried setting…
Snoober
- 71
- 1
- 5