Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [systemctl]

Questions about systemctl - the main tool to interact with systemd and the service manager.

1
vote
0answers
16 views

Does systemctl consider service dependencies when starting or stopping multiple services in one command?

systemctl allows to pass multiple service names in start or stop command. Let's assume in systemd service A is configured to be stopped before service B. When I now execute systemctl stop B A will ...
1
vote
1answer
9 views

Show journal logs from the time a service was restarted

Is there a canonical way to get all the logs from journalctl since a service was last restarted? What I want to do is restart a service and immediately see all the logs since I initiated the restart. ...
3
votes
2answers
65 views

redhat 7 + How to stop systemctl service permanent

we are install some service on redhat 7 but for now we no need the service application anymore is it possible to disable the start of the service? I not mean to disable it on the next reboot what ...
2
votes
0answers
14 views

systemctl echos prints interference from other unit

I am working on a service which runs just fine. My poblem (or rather a mild annoyance) is that when I run systemctl status foo.service or journalctl -u foo.service I will occasionally see error ...
0
votes
1answer
29 views

Service unable to start at boot time

I am automating the startup of a Jenkins service on a Debian 9 machine. My service works well. The service definition is : [Unit] SourcePath=/etc/init.d/jenkins Description=LSB: Start Jenkins at ...
0
votes
1answer
19 views

Systemctl restart service triggering another command

I created systemd service, which runs a script that auto-generates some configuration files if these don't exist, and loads the services depending on them, or loads the services with the existing ones....
0
votes
1answer
44 views

Systemd - Set MAC address and IP address

I am trying to use systemd to set the MAC address and IP address of eth1 on my board. MAC address To set the MAC address, have created the following service: /lib/systemd/system/eth1mac.service [...
22
votes
1answer
822 views

One systemctl command to both start and enable

Using one command to both start and enable systemctl managed software would be useful to spare a few lines in a few scripts, making them a bit more aesthetic (not really a problem but a nice thing to ...
0
votes
1answer
59 views

Fedora tries to mount deleted swap partition which is not in fstab or systemd

When creating a new swap partition in Fedora 29 to enlarge it I removed the old one using GParted and removed their respective entries in /etc/fstab. I created new entries for the new swap partitions ...
1
vote
0answers
73 views

systemctl doesn't work from crontab

I'm trying to run a script calling systemctl from crontab but the command is not being executed. Other scripts work fine from crontab. The script works when executed in a terminal. This is the script:...
3
votes
2answers
199 views

Systemctl status always shows full log, even with --lines

1So, I'm trying to get the status of a unit, but only the first 3 lines like this: systemctl --user status resilio-sync --lines=3 I've tried various variations of this with -n 3 etc..., nothing ...
0
votes
0answers
64 views

User Resource management: cgroups + systemd + ssh

I am trying to limit the memory of a single user that keeps crashing our OpenSuse Server. What I have done is as desribed here, to modify the limit of the user's slice via systemctl set-property ...
0
votes
0answers
533 views

service: Start request repeated too quickly. (code=exited, status=127)

I am simply trying to start my node application as a service I am pointing to the server.js file and have that set as executable. I would like to have this node app restarting on server reboot and ...
1
vote
2answers
89 views

Linux Service Cannot Open Display

On my Odroid running Ubuntu 16.04.3 LTS I have a python2 program that interacts with a display device (projector). When I run this program from the command line: python ~/imgProc/torcam.py ...
5
votes
1answer
448 views

pm-suspend vs systemctl suspend?

For Linux distributions using systemd, is there a practical difference between these two commands? systemctl suspend pm-suspend Which should I use or prefer?
1
vote
0answers
184 views

Systemctl httpd.service file changed on disk

When start httpd with systemctl, I get the error: Warning: The unit file, source configuration file or drop-ins of httpd.service changed on disk. Run 'systemctl daemon-reload' to reload units. I run ...
1
vote
2answers
70 views

Can systemd 'adopt' or 'inherit' a process or cgroup?

I have a service that I would like to manage through systemd - let's call it foo. I wrote unit files, and they're working just fine. So, if I run systemctl start foo, the service starts correctly, and ...
1
vote
1answer
44 views

Piping output of zypper ps -sss into systemctl restart

I do not want to restart the server after a zypper up. Instead I want to restart all services using deleted files as shown by zypper ps -sss. I thought I could do something like zypper ps -sss | tr '\...
0
votes
1answer
71 views

How to prevent this service from starting at boot

This question is different from the possible candidate since here I am asking how to remove the service at startup I am using a Seeed ReSpeaker Core v2.0 board. I would like to use the UART ...
2
votes
2answers
585 views

How to disable CUPS service on reboot with systemd?

I often connect to a network, which has a lot of printers. When printer discovery is ongoing, a lot of distracting messages pop up in GNOME. I use printer only rarely, so I would prefer to keep CUPS ...
-1
votes
1answer
35 views

systemctl zabbix invoke sudo shell command in python scrip

two days ago,I change my running of zabbix-agent from zabbix_agentd run directly to systemctl start zabbix-agent.There is a weired thing.I write a python script to monitor java GC status, which invoke ...
1
vote
1answer
63 views

grep breaks formatting of systemctl

If I call command systemctl without grep, then formatting looks correctly: Now I want to filter only lines with 'yarn', but this time line is broken into two parts: same happens when console is two ...
0
votes
2answers
508 views

syslog-ng won't start because error binding socket with permission denied

I've recently rebooted one of my machines after a long time and a now I'm having a lot of problems with configuration changes. syslog-ng service is not working anymore with the following error from ...
0
votes
1answer
51 views

systemd doesn't recognize init.d status

I have created systemd script - /etc/systemd/system/test123.service which inside is set to execute on start/stop the service in /etc/init.d/foo.sh with parameters start/stop,and foo.sh when started/...
1
vote
1answer
175 views

is there any difference between /usr/bin/poweroff and /usr/bin/shutdown? [duplicate]

I just realized that /usr/bin/poweroff and /usr/bin/shutdown are symbolic link to systemctl, but I don't know how systemctl is being run. so is there any difference between /usr/bin/poweroff and /usr/...
1
vote
2answers
366 views

“systemctl set-property user-1009.slice CPUQuota=50%” - Failed to set unit properties on user-1009.slice: Unit user-1009.slice is not loaded

I'm trying to set per-user limits on processes, most of them are run with sudo --user. Why do user-1001 and user-1008 on my system have the slice files, but I can't get it on 1009? # systemctl set-...
1
vote
1answer
865 views

Restarting a service remotely with ssh and sudo errors

I am using the following command to try and restart a service ssh username@server "systemctl restart storeapp.service" However I am getting the following error message. Failed to stop storeapp....
-1
votes
1answer
97 views

How should I enable system services to start on demand?

I rarely use virtualbox [on Kubuntu FWIW], it has two system services that load vboxdrv and virtualbox-guest-utils. Can I set these services so they don't load on boot but do load on demand, or do I ...
0
votes
1answer
38 views

Restarting service based on log output keywords

I am trying to have services restart when a certain text output appears in systemctl status or a log file. The full line in this example is: Aug 27 01:05:16 SSD plexdrive410[1321]: [USR/LOCAL/BIN/...
0
votes
1answer
30 views

No Wi-Fi Adapter Found yet I'm still using wifi. My “Wired” setting is connected but I have no ethernet cord plugged in

I usually use ethernet for the internet but now I want to use the wifi and I don't have the option, in settings it says "No Wi-Fi Adapter Found". If I remember correctly I used to be able to use wi-fi ...
1
vote
0answers
15 views

Kali Linux KDE not showing GUI for initial login [duplicate]

this is my first Linux OS, and I'm trying to get more acquainted with my environment. I've got Kali Linux KDE working well, but when I first start linux, it boots into the terminal screen for TTY1 ...
0
votes
1answer
399 views

Running script at shutdown and reboot to prevent chromium session loss

I'm running Ubuntu 18.04.1 and I'm trying to create a script that shuts down Chromium properly before shutting down the system so that it doesn't give me "restore session" popup after booting. I ...
1
vote
0answers
139 views

Enabling service using systemctl on a mounted OS/device

I am trying to create a bootable USB stick that will contain the Raspbian OS and will have some extra applications and services enabled. What I normally do is flash the image of Raspbian OS on to the ...
2
votes
1answer
104 views

Targets and Unit files on Boot System

I have been going through all the docs and examples regarding the targets (referred to as runlevel) for the past few days but I am still confused with the topic. Can anyone explained me the ...
2
votes
1answer
272 views

Why does systemctl halt asks for password but systemctl reboot and systemctl poweroff not?

I am using Debian 9.5. From terminal whenever I type the command systemctl halt, it will say: Authentication is required to start halt.target and it will ask for password. But I can use commands ...
6
votes
1answer
1k views

the --now switch of `systemctl`

As stated in the man page, systemctl --now enable servicename should enable and start the service. But it never works for me, under many different distributions. While the output of: systemctl is-...