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

learn more… | top users | synonyms

33
votes
9answers
55k views

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 ...
16
votes
4answers
9k views

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 ...
10
votes
3answers
9k views

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 ...
9
votes
2answers
1k views

How do I hide/anonymise/defend a computer when on hostile networks?

I connect to a lot of open networks when I'm pootling around. I'm fairly careful to VPN home for anything important but that's not really my boggle. The laptop runs several services (nfs, dev http ...
8
votes
2answers
7k views

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 ...
7
votes
3answers
5k views

The rc0.d,rc1.d,… directories in /etc

I'm running Ubuntu 10.04 LTS where I have the directories /etc/rc0.d, /etc/rc1.d, /etc/rc2.d, ..., /etc/rc6.d. Example files from my machine: directory example symlinks in the dir ...
7
votes
2answers
11k views

Which services should be disabled?

Following is the output of $chkconfig | grep 5:on on my laptop running Fedora 14. NetworkManager 0:off 1:off 2:on 3:on 4:on 5:on 6:off acpid 0:off 1:off 2:on 3:on ...
7
votes
1answer
2k views

What is the difference between start-stop-daemon and running with &?

I am setting up a service in /etc/init.d. I am looking at various scripts in there, some are implemented with start-stop-daemon ... and some with /path/to/script &. All of them save the pid in a ...
7
votes
3answers
10k views

How to start a script file on boot?

I am running a stupid little minecraft server. I want Lubuntu to execute the following script when the server boots up. NOT on login, and NOT on restart (unless it's starting up of course). The ...
7
votes
1answer
600 views

How to autostart a background program by a non-root user?

As a non-root user, I want to run a background job when the system boots. It's sort of a service which doesn't require root privilege. Is there a way to do it? One way is to put sudo -u user command ...
7
votes
2answers
2k views

Starting a service during startup

I've created a service for an application, and I want this application to be started on boot. In the service manifest, I realize that there's a property for this (enabled="true"), but I've been ...
6
votes
1answer
482 views

What is wrong with this shell script?

The service for a piece of software I just installed (from a provided .deb file) on a Ubuntu server won't start. When running the service I get the error: /etc/init.d/matrixsa: 44: Syntax error: "}" ...
5
votes
4answers
25k views

Keeping a process running after putty or terminal has been closed [duplicate]

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 ...
5
votes
1answer
3k views

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). ...
5
votes
2answers
404 views

Why is a service being started if it isn't mentioned in /etc/init.d?

After a clean install of Fedora 17 and distcc-server, I did a service distccd start, which completed successfully. man service indicates that it would merely be running the distccd script at ...
5
votes
1answer
70 views

Lightdm service - contradictory results for `status` command

When I run in my gnome-terminal: service lightdm status everything looks OK and it is as expected: lightdm start/running, process 1221 But when I run: service --status-all 2>&1 | grep ...
5
votes
0answers
48 views

Is there an ICMP echo request service?

Often, in applications that I develop, I like to include a network status indicator for various devices on the network. The easiest way to monitor these devices is by pinging them. But ICMP echoes are ...
4
votes
2answers
6k views

rpc.statd running on system not using NFS

I have a Debian machine that gets warnings (via the Tiger automatic auditor) that rcp.statd is listening on such-and-such socket. Googling shows rpc.statd is a daemon used by NFS. As far as I know, ...
4
votes
1answer
308 views

What is meant by “Unknown instance” when restarting a service?

I am trying to get vsftpd file server running on Ubuntu 13.10, I'm unable to connect to the server from another network, although this other network is connected to the server's network and ping is ...
4
votes
1answer
1k views

start-stop-daemon makes cron pidfile with wrong pid

I have an init.d script to start crond which specifies the following for start(): start-stop-daemon -S --quiet --make-pidfile --pidfile /var/run/crond.pid --background --exec /usr/sbin/crond ...
4
votes
1answer
205 views

Monitor a process in Debian

I want to create a service that monitors the existence of a certain process. I wrote the following shell script: #!/bin/sh while : do w=`ps u -A | grep -P ".+Sl.+/usr/local/MySource/endpoint" -c` ...
4
votes
2answers
67 views

What's the recommended way to run a service as a non-root user?

I have a simple init.d script which starts and stops a process. I call the init.d as root, but I'd like the process it controls to run as a specific user. The most common suggestion online seems to ...
4
votes
1answer
3k views

nmap shows me that one service is “open|filtered” while locally it's “open”, how to open?

I have a Quake 3 server. And it's launched successfully. The problem is that no one can connect to that server. I am running: nmap -sU -p 27960 hostname and it's showing me that it's state ...
4
votes
1answer
56 views

Transmission-daemon service spontaneously stops

I've installed, configured and ran transmission-daemon on my CentOS 6 machine using service transmission-daemon start This works nicely, and I can see the web interface on http://server.ip:9091 as ...
4
votes
1answer
91 views

Determine monthly internet transfer to detect right FUP

I live in a country where many ISP (internet service providers) have FUP (fair use policy, limit on amount of data transferred). I need to get a new connection and I would like to measure how much ...
4
votes
2answers
813 views

How to get notified when svcadm restarts a service that died

I'm using svcadm to keep my node.js server running on Illumos, is there a way to get notified if svcadm restarts the server because it crashed? Specifically if the process went down on its own and not ...
4
votes
1answer
1k views

MySQL stop/waiting issues; “can't connect … through socket” [duplicate]

So this was my first time putting up a LAMP stack on a Bodhi machine (previously experience with WAMP, and LAMP on 10.04); I got Apache going, and a Drupal install begun, then I go to create a new ...
3
votes
2answers
1k views

How to start the cron daemon

I am using RHEL 5.4 I killed the cron daemon accidentally. I wanted to stop a cron task, didn't know how to do it, ended up killing the cron daemon itself. How do I start it again?
3
votes
2answers
745 views

Bash script needed to run every second

I have a few cleanup commands to run for my datacaching scheme. I was thinking a bash script would be an easy way to check if the full clean up job needed to be run. But the cache is very time ...
3
votes
4answers
388 views

How to set proper monitoring of my services in a automated way? So that if one crash it auto on the fly restarts?

How can i setup monitoring to my system services? Either using automated script which scan every moment, if httpd, mysqld, and my custom daemon is running or not, if not running it will automatically ...
3
votes
1answer
165 views

What is the alternative or equivalent to Windows services on Gnu/Linux?

I was wondering what is the alternative or equivalent to Windows services on Gnu/Linux. Is it a sever like X or Pulseaudio but that wouldn't make any sense because the theme service on windows, a ...
3
votes
1answer
638 views

What code runs when I type “sudo service nginx start”

I am having this problem: http://stackoverflow.com/questions/10939072/add-nginx-as-a-ubuntu-service-stop-and-reload-doesnt-work I am trying to understand if my code to start nginx is point to the ...
3
votes
5answers
8k views

Apache won't start on Fedora 15

I can't get Apache to start on Fedora 15. I downloaded a project into /var/www/html and changed myself to the owner (recursively), though I don't think I changed any SELinux contexts or anything like ...
3
votes
2answers
75 views

What environment and credential is used by startup, background and service processes

Startup scripts (on boot) Processes running in (or sent to) the background (when using SSH -fN for example) Services etc... What $path variable will they be using? What credentials? Anything else I ...
3
votes
2answers
4k views

What is the service that's responsible for automounting a USB drive in CentOS 6.4?

I know of the legacy Linux way of mounting a USB stick or drive: mount /dev/sdb1 /mnt/ But in some CentOS 6.x installations I saw, you just insert the USB stick and CentOS automagically mounts it, ...
3
votes
1answer
2k views

Start network service at boot time on CentOS

I've recently reinstalled CentOS onto a computer of mine. I have OpenSSH Server on it now, as did I before I reinstalled the operating system. Here's the difference: Before, SSH started without even ...
3
votes
3answers
934 views

linux launch script /etc/init with a specific user

I've created a script in /etc/init/mms-agent.conf : start on runlevel [2345] stop on runlevel [06] exec /usr/bin/env python /home/mms/mms-agent/agent.py >> /home/mms/agent.log 2>&1 ...
3
votes
2answers
159 views

Is service stop synchronous or asynchronous?

I did sudo service ... stop before shutting down the machine remotely, over SSH, but then I realized I didn't know if stop is synchronous or not and I wondered if I was not too fast to shut down the ...
3
votes
3answers
242 views

systemd service that needs .ssh/id_dsa password

I have a systemctl service that starts a process smd-loop in a screen session. This process requires acces to remote SSH sources (for syncing purposes) and thus needs to be able to access my id_dsa ...
3
votes
1answer
643 views

How do systemd and chkconfig interact with respect to services and runlevels?

I recently updated some of our machines to Fedora 17. I have noticed that there are some services that I can configure their runlevels using chkconfig, while others don't appear there at all, and can ...
3
votes
2answers
3k views

Using nohup at /etc/init.d/service

I have been trying to create a daemon using /etc/init.d/myservice and it will call a shell script that contains nohup within the script line. Will it affect it if I could do service stop later?
3
votes
1answer
82 views

Init-systems and service management on different distributions

Is there some overview which Linux distribution comes with which (default) init system and uses which tool for starting/stopping services? Is there some distribution independent way to ...
3
votes
1answer
476 views

What is the “mintsystem” service setting and when would I want to activate it?

In hunting around my GUI for a place to enable sshd I clicked on "Services" from the Administration section of the Linux Mint (16) menu. It opened a window titled "Service Settings" and inside it I ...
3
votes
1answer
2k views

How to manage fedora services and daemons using the GUI?

I am using Fedora 17, I need a GUI program to start/stop and enable/disable services and daemons. I have installed "system-config-services" but it did not have enable/disable feature(run it with ...
3
votes
1answer
65 views

Can't start the MySQL service on a recently upgraded VM

I have a VM running Ubuntu server which I just upgraded to 14.04. The VM provides access to a MySQL database. However, after upgrading, the database refuses to start and I don't know enough about it ...
3
votes
3answers
285 views

What is the recommended way of checking running services?

I'm often exposed to various GNU/Linux systems including CentOS, SLES and Debian. I want to know: what is the recommended method of checking all running services across these systems? I am aware of ...
3
votes
1answer
3k views

Problem starting a service running Debian

I want to run a UPNP renderer as a service on a Raspberry Pi using Raspian, a Debian based distro. Actually, everything runs fine but one thing : I can't manage to start the service at boot time at ...
3
votes
0answers
586 views

Plymouth splash not working and causing VT problems

Since I tried installing Plymouth (boot splash), I'm facing two problems : It's not working My Virtual Terminals (tt1 - 6) aren't working anymore Here what I did : Added plymouth hook (after ...
2
votes
4answers
1k views

How can I run a process in a terminal window and then hide that window?

I want to run python ~/program/proxy.py in a terminal when I boot up. And then hide this terminal window (because it is just a proxy program, and I don't want to see the debug info). So how can I get ...
2
votes
2answers
614 views

Get running status of mongodb

Having a script where I start/stop various services depending on what I need. For example Apache, BIND, MySQL, PostFix, Memcached, Tomcat, ... and so on. Depending on status options to script etc. ...