How to Disable Services in Linux

Linux system provides a list of commands to manage running services on a system. This article covers some of the commands that may help in the management of services.

(1) Display status of services

sudo service --status-all

You can disable service by using a simple command:
sudo systemctl disable apache2

(2) ps command

Display options

ps --help

Display a list of services

ps ax

You can use grep command with pipe (|) command to identify a specific command

ps ax | grep terminal

Now you can use the kill command to terminate the service

kill -9 <PID>

(3) netstat command

Display the network protocol with details such as Type, State, I-Node, etc.

netstat -lp

(4) update-rc.d

Another script update-rc.d is available on Linux that can be used to disable services.

update-rc.d --help

To remove services

update-rc.d -f apache2 remove

Conclusion

Linux has a lot of flexibility to configure services on a system. Administrators just need to know the commands that need to be removed or disabled from the system.

Subscribe us to receive more such articles updates in your email.

If you have any questions, feel free to ask in the comments section below. Nothing gives me greater joy than helping my readers!

Disclaimer: This tutorial is for educational purpose only. Individual is solely responsible for any illegal act.

You may also like...

Leave a Reply

Your email address will not be published.