Disable Unused Services
I'm stuck on the "Disable Unused Services" section
I see the instructions for installing htop. But after I do that…
1. What command do I use to see all processes currently running?
2. How can I determine which of these services are necessary for my purposes and which can be disabled? (For the record, I basically just want to run some WordPress websites on my linode.)
3. According to the Library guide, "Please note that services that are configured to start at system boot will run again should you reboot your server, so it may be safer to disable them from automatically starting using your distribution's particular method for doing so." What is Ubuntu 12.04's particular method for doing so?
I am generally opposed to starting new forum topics, so I searched through this forum and the rest of the Internet for answers to these questions. While I found some information on other websites, I couldn't tell if the instructions given there were geared toward a setup like a linode and none of the instructions I found answered all of these questions.
Thanks.
10 Replies
Look at the processes in a listening state. Make sure your terminal window is big enough stuff fit's on a single line. You'll also see the program name and PID on the end, so the stuff that is not needed can be disabled. Normally this is /etc/init.d/
2. You'll probably only want Apache/Nginx/Mysql/PHP/SSH/exim(or whatever you use for mail) in a listening state.
3. update-rc.d -f
The
@Kyle:
1. What command do I use to see all processes currently running?
@Kyle:
2. How can I determine which of these services are necessary for my purposes and which can be disabled?
@Kyle:
3. What is Ubuntu 12.04's particular method for doing so?
Just kidding
But for general linux questions, it's quicker just to google them.
@Nuvini:
1. With htop you can see the processes. However, what you want to know is your listening processes. For this you can use netstat. eg. netstat -tulpe
Look at the processes in a listening state. Make sure your terminal window is big enough stuff fit's on a single line. You'll also see the program name and PID on the end, so the stuff that is not needed can be disabled. Normally this is /etc/init.d/
stop 2. You'll probably only want Apache/Nginx/Mysql/PHP/SSH/exim(or whatever you use for mail) in a listening state.
3. update-rc.d -f
remove (or disable) The
part is how it is listed in /etc/init.d/
And ntpd you'll want that running too
@obs:
@Nuvini:1. With htop you can see the processes. However, what you want to know is your listening processes. For this you can use netstat. eg. netstat -tulpe
Look at the processes in a listening state. Make sure your terminal window is big enough stuff fit's on a single line. You'll also see the program name and PID on the end, so the stuff that is not needed can be disabled. Normally this is /etc/init.d/
stop 2. You'll probably only want Apache/Nginx/Mysql/PHP/SSH/exim(or whatever you use for mail) in a listening state.
3. update-rc.d -f
remove (or disable) The
part is how it is listed in /etc/init.d/ And ntpd you'll want that running too
:)
True. Except when leap seconds occur
@Nuvini:
However, what you want to know is your listening processes.
I thought the goal was to disable all running processes that aren't being used in order to free system resources and remove potential security vulnerabilities. What's the reason for only wanting to know listening processes?
Then while personally I don't think someone is gonna abuse processes like that once they're on your system, it's possible. Still, it depends on what you have running and installed. (e.g. Anacron can usually be disabled if it's running)
-Tim
-Tim