How to remove unwanted service in your Linux system
To Stop and Disable unwanted service in your Linux system
In this article let us discuss how to remove the unwanted service and packages which is installed automatically without the user permission while setting up the server. These services consumes more system resource and slows down your system boot up process.
To show all process and Services
Use ps command to display currently running process with process id.
Example
[root@linuxhelp Desktop]# ps ax
PID TTY STAT TIME COMMAND
1 ? Ss 0:01 /sbin/init
2 ? S 0:00 [kthreadd]
3 ? S 0:00 [migration/0]
4 ? S 0:00 [ksoftirqd/0]
5 ? S 0:00 [migration/0]
6 ? S 0:00 [watchdog/0]
7 ? S 0:07 [events/0]
8 ? S 0:00 [cgroup]
9 ? S 0:00 [khelper]
10 ? S 0:00 [netns]
11 ? S 0:00 [async/mgr]
.
.
.
.
4371 ? Sl 0:00 /usr/bin/gnome-terminal -x /bin/sh -c cd ' /root/Deskt
4372 ? S 0:00 gnome-pty-helper
4373 pts/0 Ss 0:00 /bin/bash
4385 pts/0 R+ 0:00 ps ax
To display all available services
Run the service command to display all available services in your system.
Example
[root@linuxhelp Desktop]# service --status-all
abrt-ccpp hook is installed
abrtd (pid 1899) is running...
abrt-dump-oops is stopped
acpid (pid 1680) is running...
atd (pid 1954) is running...
auditd (pid 1439) is running...
automount (pid 1788) is running...
bgpd is stopped
Usage: /etc/init.d/bluetooth {start|stop}
certmonger (pid 2064) is running...
Running
cgred is stopped
conmand is stopped
cpuspeed is stopped
crond (pid 1943) is running...
cupsd (pid 1655) is running...
cyrus-imapd is stopped
dhcpd is stopped
Stop the process
If you want to kill the running process use kill command.
Example
[root@linuxhelp Desktop]# kill -9 1913
[root@linuxhelp Desktop]# service httpd status
httpd dead but pid file exists
To disable the service
In red Hat distribution basically chkconfig command is used to start and stop the services.
Example
[root@linuxhelp Desktop]# chkconfig httpd of
After this chkconfig you must restart your system. After restarting the “ httpd” service, it does not start automatically. Because we have stopped that httpd service.
Example
[root@linuxhelp Desktop]# service httpd status
httpd is stopped
If you use kill command it stops the service temporarily. If you want to stop unwanted service you use chkconfig command.
To stop and disable the services in graphical mode
Following procedure is used to stop and disable the unwanted service in graphical mode.
First Go to task bar and choose system.

Next choose Administration option and select Service options.

Now you can see Service configuration dialogue box.

Let' s choose httpd service

The httpd service is stopped in the service configuration.

Next start httpd service again. Click start button.

Now to disable the httpd service. click disable button.

Now you can see this httpd service is in disable mode.

Next I’ m going to enable this service. Click enable button.

Now you can see this service is enabled.

Comments ( 0 )
No comments available