Questions tagged [systemctl]
93 questions
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
- 1,824
- 5
- 27
- 50
26
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
- 646
- 7
- 14
15
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
- 259
- 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,361
- 4
- 16
- 30
12
votes
3 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
- 461
- 1
- 8
- 18
11
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
- 111
- 1
- 1
- 7
7
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
- 181
- 1
- 6
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
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
- 497
- 6
- 13
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
- 5
- 15
5
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
- 153
- 1
- 4
4
votes
1 answer
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
- 101
- 1
- 1
- 4
4
votes
2 answers
Ubuntu 16.04 Systemd not possible to use systemctl
I have a Ubuntu 16.04 server, since the last restart,
systemctl doesn't work anymore.
For example if I want to start the nginx, I get the following error:
root@SERVER:/# systemctl start nginx
Failed to start nginx.service: Unknown unit:…
ghovat
- 143
- 1
- 3