Questions tagged [services]

A Linux service is an application (or set of applications) that runs in the background waiting to be used, or carrying out essential tasks.

A Linux service is an application (or set of applications) that runs in the background waiting to be used, or carrying out essential tasks.

They are set on different runlevels or same level or layer according to the program and style managing the services on the system.

1014 questions
118
votes
4 answers

Writing basic systemd service files

I am developing a Nodejs application that the user interacts with via HTTP on localhost. There are practically no parameters and the daemon has virtually no dependencies and it just needs to be up by log-in time. I would like to follow the idioms on…
beatgammit
  • 7,453
  • 10
  • 31
  • 32
113
votes
6 answers

How could we allow non-root users to control a systemd service?

With sysvinit, a sudoers entry like this would suffice: %webteam cms051=/sbin/service httpd * This would allow for commands such as: sudo service httpd status sudo service httpd restart Now, with systemd, the service name is the final argument.…
Belmin Fernandez
  • 9,347
  • 15
  • 46
  • 50
111
votes
4 answers

Systemd service - what is `multi-user.target`

I have come across a .service that contains the following: [Install] WantedBy=multi-user.target The original .service file can be found HERE. I am on Ubuntu 16.04LTS.
eddyP23
  • 1,221
  • 2
  • 7
  • 7
111
votes
6 answers

List of available services

Is there any command that would show all the available services in my wheezy Debian based OS? I know that in order to see all the running services you can use service --status-all.
Dragos Rizescu
  • 1,369
  • 2
  • 9
  • 13
108
votes
2 answers

How can I restart the SSH daemon on Ubuntu?

When I type in service sshd restart I get a sshd: unrecognized service error. I do have, in /etc/ssh/ a file sshd_config that I use to set config. I can also putty into the Ubuntu box (it is remote). When I type in /etc/init.d/sshd restart I get No…
bharal
  • 1,423
  • 3
  • 10
  • 10
98
votes
2 answers

What does status "active (exited)" mean for a systemd service?

I'm working with a custom service which essentially runs a web server, called thisismywebserver. Currently it's not working (ie I get an "Unable to Connect" error trying to access a page). When I run this command service thisismywebserver status to…
Highly Irregular
  • 2,455
  • 6
  • 23
  • 24
86
votes
3 answers

How do services in Debian work, and how can I manage them?

In Windows I have the services manager, where I see all system services, that can be started through Windows itself, I set up the user it uses, the rights management is in there, and I can pass variables and some other information to the services, I…
Erdinc Ay
  • 1,000
  • 1
  • 7
  • 13
82
votes
1 answer

Why doesn't my systemd user unit start at boot?

I'm trying to create a systemd user unit and have it start when the system boots. The service does start manually, however it does not start at boot. From searching the Internet I learned that in order for user units to start at boot, I supposedly…
Michael Hampton
  • 8,658
  • 2
  • 31
  • 54
72
votes
4 answers

Keeping a process running after PuTTY or terminal has been closed

I'm running a Node.js server off of a Raspbian (Debian) machine, and I'd like to start and stop the server remotely. This for me means using PuTTY to access the shell, except when I close out of the PuTTY terminal or it times out, my server goes…
Spencer
  • 723
  • 1
  • 6
  • 4
69
votes
2 answers

Ubuntu full list of available services

This question is very similar to this one: List of available services For my specific case, I'm wondering if there is a specific command to show the full list of services under Ubuntu. I did run a ls /etc/init.d and it does show a pretty…
Alex Tartan
  • 1,429
  • 1
  • 13
  • 21
60
votes
3 answers

How to make unix service see environment variables?

I have set my environment variable using /etc/profile: export VAR=/home/userhome Then if I do echo $VAR it shows /home/userhome But when I put reference to this variable into the /etc/init.d/servicename file, it cannot find this variable. When I…
altern
  • 1,900
  • 3
  • 18
  • 20
58
votes
2 answers

NFS Server changes in /etc/exports file need Service Restart?

I have NFSv4 Server (on RHELv6.4) and NFS Clients on (CentOSv6.4). Let's say in /etc/exports: /shares/website1 (rw,sync,no_subtree_check,no_root_squash) /shares/website2 …
夏期劇場
  • 1,571
  • 9
  • 22
  • 35
56
votes
4 answers

Can I prevent "service foo status" from paging its output through "less"?

How do you stop the command service status from using less on its output? I have a script that automates some sysadmin actions, and after I upgraded my server to Ubuntu 16.04, it's breaking because actions that check service status are…
Cerin
  • 1,601
  • 4
  • 18
  • 25
54
votes
11 answers

How to automatically start and shut down VirtualBox machines?

I need to run a software system that is intended to be installed as an appliance on a dedicated machine. In order to save energy, I plan to run the system on a VirtualBox VM instead. The host is a standard Linux box with a SysV-Init system, the…
jstarek
  • 1,672
  • 2
  • 16
  • 32
53
votes
3 answers

How to list all running daemons?

From my question Can Process id and session id of a daemon differ?, it was clear that I cannot easily decide the features of a daemon. I have read in different articles and from different forums that service --status-all command can be used to list…
Jackzz
  • 1,363
  • 3
  • 15
  • 21
1
2 3
67 68