Ubuntu Tweak Guide
I laugh whenever I heard someone make a comment that “Linux is hard to install”, or that “Linux is only for geeks and nerds”.
Installing Ubuntu can literally be as easy as typing in some very basic information, and clicking next a few times. Almost all of the time (except in rare cases of unusual hardware) you will wind up with a perfectly functional, perfectly speedy install without (like in Windows) having to go through and find drivers, and applications on your own. Those few mouse-clicks get you pretty much everything you need to use and enjoy your PC.
There is, however always some room for tweaking. I can tweak out Windows XP with the best of them, and make it an even leaner, meaner OS than it already is. The same thing applies to Ubuntu. There are many little things you can do, some very safe, some a little bit more risky that you can do to really improve Ubuntu’s speed, as well as make it a little more fun to use.
Disclaimer: Please note that these are my personal processes and procedures for installing, tweaking and configuring Ubuntu to meet my own personal needs and expectations. You may not want the same options, configurations and or risks involved. Please remember that following this guide is done at your own risk, and you accept full responsibility of anything that may happen such as data loss or corruption, a non-bootable system or your refrigerator eating your toaster. No matter what happens, I am not responsible. Also, please don’t comment or e-mail me telling me why you disagree with one of my changes, I do it my way - you do it yours. If you do have something meaningful too add that can improve my process, please do let me know! Also, if I have bad information, and you can back that up that fact with good information, please provide multiple links to that good information so I can research it (In other words, I won’t believe you if you just tell me, or if you link to a single post on the Ubuntu Forums.
First, let you tell you about my system, so you can compare it to yours, and decide which tweaks you want to consider, and note any differences that may very well affect what you configure and how you tweak.
My system is “homebuilt” with the following components:
- Intel Core2Duo e4600 2.4GHz Processor
- Gigabyte GA-P35-DS3L Motherboard with the Intel P35 Chipset
- G.SKILL 8GB (4 x 2GB) DDR2 800 (PC2 6400) Memory Model F2-6400CL5Q-8GBPQ
- ATI Radeon HD 2600 Pro 512MB PCI-e Graphics Card connected to a HANNspree 22″ LCD (HF229H)
- Sound Blaster Audigy
- Three Hard Drives:
- WD 320
- WD 250
- Seagate 120
There’s obviously more to it, but that’s all I think that is important here - I have some other stuff, like a case and power supply, a DVD Writer, etc., but I doubt those specifics would be important too you for the purpose of following this guide.
The first tweak starts before I even install. Well, it’s not really a tweak, but worth mentioning, at least. I always use the “Alternate Install” CD. I like the control of the traditional Debian installer better. It feels more like I’m installing an Operating System!
Now, we will get into installing Ubuntu:
Partitioning:
There are many schools of thought on this. I can’t possibly explain every possible configuration here, and I won’t attempt to. Like the rest of the guide to follow, I will tell you what I have, and what I have set up - it’s up to you to interpret this and decide for yourself how to proceed.
My WD 320GB drive is my fastest drive, and is my “boot” drive, and holds my / , /home , and Swap partitions along with a /data partition.
My WD 250GB is my second-fastest drive and get’s mounted as /virtuals and holds all of my virtual machines and ISO files.
My Seagate 120GB is my slowest drives and I mount it as /downloads and it’s basically a scratch directory, and I do store some backups, etc. on there as well. Even though it’s mounted as /downloads, it really becomes a “catch-all” drive for random files I have no better place to put, and aren’t all that important.
Filesystems:
For / and /home I stick with ext3 - for no particular reason than I know it works (and can be tweaked to be quite fast - more on that later). I know it’s silly to have a swap partition with 8GB of RAM, but I would feel weird not making at least a small swap partition - I do a lot with Virtual Machines, and I’d rather give my PC the option to swap a few bytes if necessary than have my whole sytem come crashing down.
For my /data, /virtuals and /downloads I use JFS. It’s fast, less tempermental than XFS and benchmarks very well with little CPU utilization. It’s my favorite filesystem for hosting Virtual Hard drive images.
I use the “relatime” option on all of my drives. A lot of folks think “noatime” is better, but I think relatime is a good compromise, and I can’t tell much difference anyway.
Set a Root Password:
Once everything is installed, the very first thing I do is set up a password for root. Ubuntu doesn’t use root in the traditional way, but uses ’sudo’ instead. I do the same, but I like knowing my root password just in case I get stuck in single user mode. You can do this by opening a terminal and executing the following command:
sudo passwd root
You will then be asked to “type a new UNIX password” and then “Retype password to confirm”. For your root account be sure to create a nice long, strong password. Mine has 23 characters total, and is made up of UPPERCASE letters, lowercase letters, numb3rs as well as $pec!a| characters.
Update your system:
You should see a notification in the upper left-hand corner of your screen telling you that there are updates available. Go ahead and run those now to get them out of the way. Ignore the message about “Restricted Drivers” for now (if it is telling you about any) until you get fully updated. Once the update completes, go ahead and reboot.
Restricted Drivers:
Now that you are running the latest bits availible, go ahead and install those restricted drivers. If it didn’t pop back up after the reboot, go to “System -> Administration -> Hardware Drivers” to install those.
Special Note: My 22″ LCD is attached to my Vid-card via a HDMI to DVI cable, and if I don’t manually restrict X11 to 1680×1050 in my xorg.conf it “tries” to run at 1080p (1920×1080) and looks like poo-poo.
Adding Additional Software Repositories:
I add the Sun VirtualBox Ubuntu repository as well as the Medibuntu repository. See the following pages for instructions (no sense in re-typing here):
For VirtualBox
For Medibuntu
Install Additional Software:
This is where things get very personal. Everyone has different software needs. Many users will be server perfectly well by the set of applications that come pre-installed on Ubuntu, however I have this command saved in a text file on my flash drive, and it’s a good base for me to start with, although I do naturally end up installing additional stuff later:
sudo apt-get install sysv-rc-conf build-essential ubuntu-restricted-extras msttcorefonts bluefish geany gedit-plugins preload nautilus-open-terminal virtualbox-2.0 w64codecs libdvdcss2 terminator dia filezilla alpine irssi audacity compizconfig-settings-manager dvdrip epiphany-browser vlc lastfm mplayer
There are a few packages that are “meta-packages” and along with dependencies, there are quite a number of packages that get installed with that command.
One of the packages that gets installed with that command is “msttcorefonts” which give you the basic Microsoft Web fonts such as Ariel, Times New Roman, etc. I also manually install Tahoma myself since I use it as my main Interface Font. First, you have to have the Tahoma font (perhaps from a Windows Installation), you can then simply drop it into a folder under /usr/share/fonts and rebuild your font cache with: sudo fc-cache -f -v
Time for some serious Tweakage!:
Services:
If you used my install command from above, one of the packages you installed was ’sysv-rc-conf’. Go ahead an execute that by opening up a terminal and doing a sudo sysv-rc-conf.
Like the applications list, this is very personal. I don’t print from this machine, nor do I have an “cron jobs” that run, or any other scheduled tasks - I trim down my services a lot.
I disable the following:
anacron
apparmor
apport
atd
bluetooth
cron
cupsys
hotkey-setup
laptop-modules
nvidia-kernel-modules
pcmcia-util
powernowd
rc.local
rmnologin
rsync
Disable the Tickless Kernel feature:
If you are on a desktop, and planning to utilize virtualization of any type, I recommend disabling the Tickless kernel feature:
Hit alt+F2 to open the ‘Run Application’ dialog and type:
gksudo gedit /boot/grub/menu.lst
Obviously, enter your password when prompted.
Now, find
#defoptions=quiet
make it look like this:
# defoptions=quiet splash nohz=off
Then:
sudo update-grub in a terminal.
Speed up boot time:
Run boot processes in parallel. Again, do alt+F2, and this time enter:
gksudo gedit /etc/init.d/rc
Find and change the line:
CONCURRENCY=none
to:
CONCURRENCY=shell
Configure Swappiness:
Again, alt+F2, but this time enter:
gksudo gedit /etc/sysctl.conf
Add the line
vm.swappiness=n
To the end of the file where n equals a number between 0 and 100.
The default is 60
More than 1GB Ram, I reccomend 10
More than 2GB I reccomend 0
Less than 1GB, leave it alone!
Basically, with a setting of 100, the system will actively seek out stuff to swap, with a setting of 0 the system will rarely use swap (if at all).
Speed up ext3:
WARNING!!!
THIS IS DANGEROUS - THIS CAN BREAK YOUR SYSTEM IF YOU MESS UP!
If you do not feel absolutely comfortable trying this, and if you can not risk losing data, do not try this - PLEASE! The speed differences are neglitable. Do NOT apply this tweak if you do not have a UPS in place.
First, open a termina and execute:
Then, find the lines for your ext3 partitions.
Your / partition will also have a errors=remount-ro leave that, and add a comma (no space) and data=writeback.
It will look something like this:
/ ext3 relatime,errors=remount-ro,data=writeback 0 1
Your /home will not have the errors=remount-ro and will look something like this:
ext3 relatime,data=writeback 0 2
While you are here, make note of what “devices” are ext3 (/dev/sda1 /dev/sda2 for example).
go back to your /boot/grub/menu.lst (alt+f2: gksudo gedit /boot/grub/menu.lst) and go back to that #defoptions= line and add
rootflags=data=writeback
to the end of that line.
Again, in a terminal do:
sudo update-grub
Now, go back to where you noted what devices where ext3 partitions, and in a terminal run the following command for each ext3 partition:
sudo tune2fs -o journal_data_writeback /dev/sd(x)(#)
for example, for my root partition, it’s:
sudo tune2fs -o journal_data_writeback /dev/sdc1
and for my /home partition it’s:
sudo tune2fs -o journal_data_writeback /dev/sdc2
Yours will most likely be different.
REBOOT!
Random Settings/Tweaks:
Here are some other things I do:
- Remove user switcher applet from panel
- Add System Monitor applet to panel, and configure to show CPU, Memory and Load
- Configure gnome-terminal to display white on black
- Change number of workspaces to 4.
Trim down my GNOME Session:
Go to System -> Preferences -> Sessions:
Uncheck everything except:
- Power Manager
- Pulse Audio Session Management
- Update Notifier
- Volume Manager
Configure Fonts:
See screenshot:
Please note, that you will not have Tahoma if you did not install it manually - it is NOT part of the msttcorefonts package. If you do not have the means to install Tahoma, I recommend leaving everything set to default except for “Fixed width font:” you can change that to Andale Mono.
Also, I set up Firefox to use Sans-Serif as default, with Ariel for Sans-Serif, Times New Roman for Serif and Courier New for Monospace.
Finishing Touches:
- Customize theme (I prefer the “Human-Clearlooks” theme to the default “Human” theme, small subtle differences, but different).
- Grab a cool wallpaper from the net (I like www.interfacelift.com).
- Customize Compiz (i like the cube better than the ‘wall’ for example).
Wow - that was a lot of typing! I hope this helps someone out there. If you are new to Ubuntu, don’t let this scare you, but know there is more that can be done after installing the system to make it perform better. If you are a Ubuntu (or Linux) veteran, have fun, and above all, Happy Tweaking!

Written by jaysonrowe. Read more great feeds at is source WEBSITE
no comments.
Read more articles on otherSoftware and Ubuntu and Linux and Computing.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article
















