Turn off unneeded services on your Linux machine

Rob —  June 10, 2013 — 2 Comments

One of the easiest ways to start securing your server (and speeding it up) is to turn off unnecessary services that are usually running by default. This little script will go through and turn off those services. Please read through the script to see what it is doing and comment out (put a # in front of the line) anything that you want to keep running.

I put little descriptions in front of each to help you determine what each service is/does. Copy this into a file called turn_off_services.sh and chmod +x it to make it executable. Then, just run it!

Related posts from Linux Brigade!

  • Keep your WordPress site secure!Keep your WordPress site secure! I work for a hosting company. On average, I’ll clean up at least 3-4 WordPress sites each month for our clients. Most of the time, they’re running on old versions of WordPress and have […]
  • How to use GNU Screen in LinuxHow to use GNU Screen in Linux Screen is billed as a “full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells)” (from the man page). Linux admins use […]
  • Block Countries from your server easily with CSFBlock Countries from your server easily with CSF If you don’t have a need for certain international visitors to your Linux server, its easy to block them out!  First, you’ll need to make sure that CSF is installed.  You can follow our […]
  • Untangle your networkUntangle your network Whether you’re the admin of your office network or your home network (or both), it’s always a good idea to have security and order in place. Untangle is software that you can install as […]
  • Lock down your phpMyAdmin access!Lock down your phpMyAdmin access! There are a couple of ways that I lock it down.. I won’t get into specifics because I don’t want you (or you!) trying to find it, but I can’t count the number of times I’ve seen an old […]

2 responses to Turn off unneeded services on your Linux machine

  1. I was wondering if it was your hosting that made your site (WordPress at that!) load so fast, but I now know that it’s all of the tweaking that you’re doing to your server. Thanks for adding the descriptions to your code. I’m a newbie suffering from information overload, so I’m still going to have to do a little homework and refresh my memory for some of this (hidd, nfs, nis…huh??) :)

  2. Ah, this will come in handy for sure. It always good to have your servers running as efficiently as possible so turning off unneeded services will be very helpful. I like how you showed that we can specify what will be turned off incase we actually do need one of the services.

Leave a Reply

*

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">