• Home
  • About
  • Tech
  • Projects
  • Contact
TjWallas.DevOps().Labs>

How to remove a certain service from Startup in #linux

26/5/2011

 
Many of the packages you install on linux may force their processes to run as daemons in the background on system startup without you even noticing. This can sometimes cause sluggish performance and consume a lot of resources without the need to. In this tutorial I will tell you how to know which processes actually put themselves in startup and how to prevent a certain process from starting up =)

Step one: Know which process.

First, you need to know the name of the process. If you already know the name, you can proceed directly to step 2. In order to list all process names that run on startup, type in the following commands:
 cd /etc/init.d/ 
 ls 
you will end up with an output similar to the following snapshot:
Examine these names and know what is the name of the process you want to remove from startup. You can furthermore type something like any of these commands in order to filter the results.
 ls | grep tj  # If your process name contains "tj" 
 ls | grep tj* # If your process name starts with "tj" 
 ls | grep *tj # If your process name ends with "tj" 

Step Two: Remove from Startup.

Finally, you need to remove that process name from Startup. In order to do so, you need to type in the following:
 sudo update-rc.d my-process-name disable 
If u ever need to enable that process on startup again, you can type the following:
 sudo update-rc.d my-process-name enable 
** Where my-process-name is the name of ur process that u found in step 1.



Hope u enjoyed this tutorial! If u have any questions or concerns, please drop me a comment below =)

Comments are closed.
Powered by
✕