Basic Linux Maintenance
April 4, 2007 5:58 PM   Subscribe

I am running Ubuntu (Edgy Eft) on my computer and while I am feeling more and more confident about most aspects of a Linux OS I am still unclear on what sort of regular maintenance operations I should be performing.

I have Googled this and while some useful information has come up I am still not sure I am doing everything I can to keep my computer running as smoothly as possible. What sort of regular maintenance tasks should I be doing? Anything I should be clearing out or deleting on a regular basis? Any system utilities I should be taking advantage of? My computer has a small hard drive and a slow(er) processor. Any advice?
posted by LeeJay to Computers & Internet (13 answers total) 12 users marked this as a favorite
Best answer: Really, honestly, it will not just die or slow down if you let it sit there. I know this may be a little difficult to understand coming from the slums of proprietary software.

That said, it's probably a good idea to install updates as they come out for security reasons. See the little orange icon in on the top bar?
posted by phrontist at 6:23 PM on April 4, 2007

Nope, I can't think of anything you should be doing.

Have fun!
posted by unixrat at 6:29 PM on April 4, 2007

Best answer: If you're coming from Windows, there really aren't a lot of "maintenance" type activities that you need to do, besides keeping the software patched and up to date. (If you're using the default Gnome desktop in Ubuntu, there should be a little notification thing that pops up in the upper-right corner when updates are available.)

Hard drive defragmentation isn't really necessary with the default ext3 filesystem (at least according to most people), and the whole thing gets checked every few bootups automatically. (The program is called "fsck" for FileSystem ChecK, if you do a search on the Ubuntu forums you'll find a lot of information on it. Bottom line, the system does it when it needs to do it; unless there's a problem you shouldn't need to ever intervene.)

Log files are rotated and deleted automatically, so you shouldn't need to do anything there, although if you find that you're running out of disk space, you can make the system keep fewer logs (doing so is a separate question in itself). Occasionally there have been bugs in certain programs that have caused log files to grow out of control, but in general things like that are considered bugs and fixed aggressively.

So in general, I'd say the answer is "no," with the reservation about making sure that you're always keeping up-to-date with the security upgrades. (But be careful with major upgrades, backup first!) My theory on my Linux machines is 'if it ain't broke, don't fix it.' I have a backup server running Debian Stable (which has an upgrade cycle best described as 'glacial') which hasn't had anything other than occasional security updates, and has been running with the same uptime as the AC power, for more than two years. And on the scale of Linux-machine uptimes, that's not even very impressive.

Do, however, make sure you're getting backups regularly. (As long as you've not overridden any defaults, you should get most of everything important just by copying /home/* to a DVD or external hard drive. Also check inside /var and /etc for anything that looks important, although as a general rule, I'd advise on keeping anything important to you in your home folder and back that one up most regularly. Be sure that you get all the invisible files and folders inside it, too!)
posted by Kadin2048 at 6:31 PM on April 4, 2007 [1 favorite]

Be sure that you get all the invisible files and folders inside it, too!

Ctrl + H shows these in Nautilus (Ubuntu/Gnome's default file browser).
posted by musicinmybrain at 6:33 PM on April 4, 2007

Keeping your system patched is important. I got lazy a couple years ago and didn't patch my linux box for six months - it got hacked.

Other than that they really are rock stable.
posted by pombe at 6:33 PM on April 4, 2007

I switch back and forth regularly now and (Edgy) has needed nothing in the way of maintenance other than those almost-automatic updates. You may just want to do housekeeping in your home directory, I suppose. Other than the horrible time I had installing it, it's rock solid.
posted by IronLizard at 6:45 PM on April 4, 2007

Ubuntu makes it so easy to stay patched though! Back in my day we had to...
posted by phrontist at 6:45 PM on April 4, 2007

Response by poster: Thanks for all of the information so far. I always make sure to install recommended upgrades and patches and backup regularly so I'm OK there. I will keep an eye on /var and /etc.

Really, honestly, it will not just die or slow down if you let it sit there. I know this may be a little difficult to understand coming from the slums of proprietary software.

This may be my biggest problem. I still sometimes think in terms of Windows issues and assume there must be something I need to do to keep things running smoothly.
posted by LeeJay at 6:47 PM on April 4, 2007

All U need to do is install any security updates, Ubuntu is good about telling you when any are available.

U don't need to do any disk defraging, as Linux (and Unix) filesystems are good at not getting fragmented.
posted by zaphod at 6:48 PM on April 4, 2007

Backups, backups, backups. (Everyone ignores backups. I have an external disc and I use "backup2l" to automatically make (leveled) backups every night. There are almost certainly tools that are better and easier, though.)

The rest of the system will take care of itself.

Debian-derived OSes will run forever, as long as you don't try to outsmart it. You may create files in /opt, /usr/local, and /home . Leave the rest of the filesystem alone, and it will serve you for years.

Welcome, and congratulations.
posted by cmiller at 8:12 PM on April 4, 2007

Best answer: If you are dual booting and use a shared FAT32 drive, it will become fragmented - boot back into windows from time to time to defragment (or convert it to an ext3 partition - windows can read those too, using the Ext2ifs freeware)

Once in a while, I clean out some of the cruft - old packages that I don't use any more, and that sort of thing. This post shows you how to use deborphan to remove unnecessary packages.
posted by chrisamiller at 8:27 PM on April 4, 2007

Response by poster: Thanks chrisamiller. I don't dual boot (solely Ubuntu here) but that info on cleaning out old packages is useful, thanks!
posted by LeeJay at 9:36 PM on April 4, 2007

Best answer: Regarding unused packages:

A release or two back Ubuntu made some changes to apt-get that automatically flag packages which are only installed as dependencies. A more reliable way to clean these up (assuming the package they were installed for has been uninstalled) is by running the command "apt-get autoremove" from the command line.
posted by chundo at 8:53 AM on April 5, 2007

« Older A different kind of malware test   |   Where should we go in August? Newer »
This thread is closed to new comments.