Questions tagged [systemctl]

systemctl is used to control the systemd system and service manager.

systemctl can be used to control the systemd system/service manager.

Reference: http://www.dsm.fordham.edu/cgi-bin/man-cgi.pl?topic=systemctl

503 questions
178
votes
32 answers

nginx.service failed because the control process exited

nginx.service failed because the control process exited $ systemctl status nginx.service nginx.service - Startup script for nginx service Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled) Active: failed…
daliborsb
  • 1,781
  • 2
  • 10
  • 4
98
votes
1 answer

Does the command systemctl and service exists on linux only and not mac?

Hi I'm trying to see the status of my apache services on my Mac. I tried the command sudo service httpd status but command not found I look up in Google and discover systemctl so I try that sudo man systemctl and it shows no manual entry for…
Henry Yang
  • 2,283
  • 3
  • 21
  • 38
92
votes
1 answer

Not able to use systemd on ubuntu docker container

Problem It seems systemd is not active or available in Ubuntu Docker containers. Setup I'm running Docker containers from the ubuntu:16.04 and ubuntu:16.10 images. Tests If I execute: systemctl status ssh in the 16,04 container the result is the…
Duncan Gravill
  • 4,552
  • 7
  • 34
  • 51
76
votes
4 answers

Difference between Systemctl and service command

I always run my Apache server in this way: sudo service apache2 start But in many guides I saw commands like this: sudo systemctl start apache2 Can somebody shortly write the difference between these commands and give me advice about what command…
Roman Romanov
  • 896
  • 1
  • 7
  • 8
60
votes
11 answers

Unable to start Docker Service in Ubuntu 16.04

I've been trying to use Docker (1.10) on Ubuntu 16.04 but installation fails because Docker Service doesn't start. I've already tried to install docker by docker.io, docker-engine apt packages and curl -sSL https://get.docker.com/ | sh but it…
Salva Corts
  • 862
  • 1
  • 7
  • 12
43
votes
5 answers

Running mongodb on ubuntu 16.04 LTS

How can I run Mongodb, as a service, on Ubuntu 16.04 LTS? A few days ago I had upgrade my server to Ubuntu 16.04. I have noticed the my MongoDB service does not start when I reboot. Trying to use sudo initctl start mongod Did not do the…
Sagi Forbes
  • 2,139
  • 2
  • 13
  • 16
34
votes
2 answers

How to debug a failed systemctl service (code=exited, status=217/USER)?

I'm trying to add my first service on rhel7 (which resides in AWS/EC2), but - the service is not configured correctly - as I get: [ec2-user@ip-172-30-1-96 ~]$ systemctl status clouddirectd.service -l ● clouddirectd.service - CloudDirect Daemon …
boardrider
  • 5,882
  • 7
  • 49
  • 86
31
votes
2 answers

systemctl status shows inactive dead

I am trying to write my own (simple) systemd service which does something simple.( Like writing numbers 1 to 10 to a file, using the shell script). My service file looks like…
nandanator
  • 421
  • 1
  • 4
  • 5
29
votes
4 answers

How to use systemctl in Ubuntu 14.04

I try to perform the following command in Ubuntu 14.04: systemctl enable --now docker-cleanup-dangling-images.timer I also tried it with sudo, I tried to replace systemctl with service and systemd but nothing works sudo: systemd: command not…
DenCowboy
  • 13,884
  • 38
  • 114
  • 210
25
votes
3 answers

"sudo systemctl enable docker" not available: Automatically run Docker at boot on WSL2 (using a "sysvinit" / "init" command or a workaround)

I am using Ubuntu on WSL2 (not on Docker Desktop). According to How to fix docker ‘Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?’ on Ubuntu, I can automatically start the docker daemon at boot…
questionto42
  • 7,175
  • 4
  • 57
  • 90
22
votes
3 answers

Output from systemctl start/restart/stop

I want to see output from my systemctl commands. For example: systemctl restart systemd-networkd would display the output of systemctl status systemd-networkd. I know that I could write a script that always puts the commands sequentially but I…
Stephen Boston
  • 971
  • 1
  • 12
  • 23
22
votes
6 answers

Docker (CentOS 7 with SYSTEMCTL) : Failed to mount tmpfs & cgroup

(I'm a Docker beginner. Then I followed some tutorials for CentOS-7) In my CentOS 7.2, I tried to learn Docker by following the steps below. # docker version Client: Version: 1.10.3 API version: 1.22 Go version: go1.5.3 Git commit: …
夏期劇場
  • 17,821
  • 44
  • 135
  • 217
20
votes
1 answer

Systemd http health check

I have a service on a Redhat 7.1 which I use systemctl start, stop, restart and status to control. One time the systemctl status returned active, but the application "behind" the service responded http code different from 200. I know that I can use…
clausfod
  • 315
  • 1
  • 3
  • 7
18
votes
3 answers

systemctl short status output format for specific service

is it possible to get status for specific systemd service $ systemctl -a | grep sshd.service sshd.service loaded active running OpenSSH server daemon $ but without grep, only with systemctl ? Something like systemctl…
Dmitry Perfilyev
  • 536
  • 1
  • 4
  • 14
15
votes
2 answers

systemd `systemctl stop` aggressively kills subprocesses

I've a daemon-like process that starts two subprocesses (and one of the subprocesses starts ~10 others). When I systemctl stop my process the child subprocesses appear to be 'aggressively' killed by systemctl - which doesn't give my process a…
GoZoner
  • 67,920
  • 20
  • 95
  • 145
1
2 3
33 34