Slim Down and Speed Up Linux

While Linux is pretty efficient with a computer's resources out of the box, there are still ways you can make it run leaner and meaner on your desktop. Using a little bit of know-how, a willingness to run a few terminal commands, and a mind for efficiency, you can get every last bit of power from your Linux box, or get more life from an older system. Read on for a roundup of ways to slim down and speed up Linux that any level of user can implement.
One quick note: Many of these tweaks require altering system files, disabling processes or otherwise changing how your system runs. Whenever you alter a system file, back it up. The easiest way is to open a terminal and create a ".backup" version of it. For instance, to back up the /etc/hosts file, open a terminal and type:
sudo cp /etc/hosts /etc/hosts.backup
More importantly, if you're unsure of anything, don't do it!
Prune your processes
The easiest and safest way to free up memory in any Linux system is to stop unnecessary programs and background processes from running, and then get your system to remember how you like it. Most Linux distributions have a tool in their "System" or "Administration" menus that let you see what's going on and halt things, if necessary—in Ubuntu, there are two of them: System->Preferences->Sessions, and System->Administration->Services.
Install Lighter, Faster Applications

- Office programs: AbiWord, Gnumeric, KOffice—OpenOffice, like its proprietary adversary, Microsoft Office, has more features, settings and tools than any one user is likely ever going to need. For those who just want to be able to type documents and make basic spreadsheet edits, AbiWord and Gnumeric are a nice compromise between speed and features. KOffice is a bit more full-featured and KDE-oriented, but seems to run faster than OpenOffice.
- File browsing: Thunar, PCMan—Both are fast, streamlined file browsers that don't try to offer up all the multimedia extras and graphical niceties that can bog down the default Nautilus (GNOME) and Konquerer (KDE) browsers. The PsychoCats site has a helpful guide for switching from Nautilus to Thunar; KDE users can also install Thunar or look into installing Dolphin from repositories, and any user can check out Google Docs, Zoho or other online office suites.
- Web browsing: Opera, Konquerer—There are extremely light browsers that use far less memory than Firefox (Dillo, Epiphany, and the like), but the convenience and ease of use are hardly comparable. Opera, however, offers a small memory savings, and KDE's built-in browser is extensible and noticeably lighter.
Remove extra virtual terminals
Virtual terminals are a good tool to have—they offer a last-ditch escape to command line for a chance to fix things in a crashing system. But many Linux systems come with six of them enabled, which isn't usually necessary. You can usually disable five of them with few consequences. If you're using Gutsy, open a terminal and type in the following commands:cd /etc/event.d... and so on, through the tty6 file. If you're still on Feisty or other Linux distros, you'll likely have to edit the file in /etc/inittab and add a # character in front of the lines ending with tty3, tty4 and the like.
sudo mv tty3 tty3.bak
sudo mv tty4 tty4.bak
Reduce swappiness

sudo sysctl -w vm.swappiness=10To make that fix permanent, enter the following command (trading "gedit" for "kate" in KDE systems, or "nano" or "vi" if you have neither):
sudo gedit /etc/sysctl.confIn the file that comes up, look for the line vm.swappiness=x and change the value to 10, or add the line if it doesn't exist.
Get good with the terminal

Five more tips and guides to speeding up your system
- Speed up GNOME menu—A simple but noticeable tweak, especially on older computers.
- Speed up OpenOffice—Also applies to Windows and Mac versions.
- Speed up Ubuntu Boot and Shutdown Process—This guide applies mainly to Ubuntu 7.04, "Feisty Fawn," and earlier versions.
- Give Ubuntu a speed boost—Note that some of the tweaks in the linked article could, if done improperly, leave a system unbootable, so proceed with caution.
- Change GNOME Menus to Use PCMan File Manager—If you don't want to make a complete PCMan transition, this trick launches the browser from GNOME's top bar menu.
Kevin Purdy, Lifehacker's newest Associate Editor, digs finding optimization tips. His weekly feature will appear every Friday on Lifehacker.