On occasion, you'll need to start and stop various system services (somewhat equivalent to the task manager utility in Windows). This is (as long as you have root privilege) amazingly easy.
First, you can find out what services are even installed on your host based on their corresponding file names by running:
$ ls /etc/init.dMost of the files listed will correspond to a system service: httpd represents the Apache web server, network represents networking, cups represents the CUPS printing subsytem and so on.
You can manipulate any of these services with the administrative command:
# service servicename actionwhere action is typically one of start, stop, restart, or status (which just prints the current running status of that service). For example:
# service cups status cupsd (pid 871) is running ... # service cups stop Stopping cups: [ OK ] # service cups status cupsd is stopped # service cups start Starting cupsd: [ OK ]
![]() | Note |
---|---|
Whenever you see a program name that ends with the letter "d", that frequently means that this is a daemon or system service. The file that manages the service might be called just "cups", for instance, but the actual service that is currently executing would show up in ps output commonly as "cupsd". |