Tuesday, 19 April 2016

How to make your Ubuntu installation faster than before


I know, guys, that this has been the hot discussion in every corner of the web, and there had been many tutorials and tips and tricks shared with you all regarding making your Ubuntu faster. But I still chose to write this thing because some of the modifications proposed by the tutorials around the web don't actually work, while some of them actually make your OS snappier than before. As such, this article is an attempt to group of those 'working' tweaks that can make your Ubuntu faster.

Speed is indeed an important issue in today's fast world
I am the owner of a Dell Inspiron 14 laptop, with 3 GB RAM and 320 GB hard-disk. So, I initially hoped Ubuntu to be very snappy on my system. But actually the picture was not so good. While the speed was much better than the initial Windows 7 installation (which I wiped out, entirely, thanks to my hatred of closed-source), in case of Linux we can always expect more. So, lets get straight to those small tweaks which can help save your day. :)

1. Use Preload: This has been repeated many times across the web, and you can easily recall that preload loads the essential modules and dependencies for running a particular program and keep them running in the background. Thus, when you start the program next, it loads faster. It is an especially useful daemon in case you depend on the productivity applications like Word processors, presentation editors etc. since they take some time usually to load. If you haven't installed preload already, fire up your shell using Ctrl+Alt+T and enter:

sudo apt-get install preload

This will install and automatically start preload.

2. Update and upgrade your system: At least once in a week if not more frequently, remember upgrading your system. This improves the already installed software on your system, and the essential components utilised by Ubuntu are also upgraded. Some updates can dramatically improve the speed and stability of your system. Open your shell and type:

sudo apt-get update 
sudo apt-get upgrade

3. Set Grub timeout to 0: You can save a few seconds while booting your system, if you set Grub timeout to 0, i.e cause it to exit into the OS immediately after starting. To do this, enter into terminal:

sudo gedit /etc/default/grub

Now, find the line 'GRUB_TIMEOUT' and set it to 'GRUB_TIMEOUT=0'. Save and close the file, and enter:

sudo update-grub2

You're done.

4. Remove unnecessary applications: Use one application of each variety. For example, if you're into writing, using a single distraction-free editor instead of the whole bunch including Uberwriter, pyroom, marave, foruswriter etc. all together will help a lot. This doesn't mean you can't install or play-test any new application of a variety. But whatever you do, at the end of the week always spare some minutes for uninstalling unnecessary applications that you don't use.

To see a list of installed applications, open Software Centre and go to 'Installed' tab.

5. Remove downloaded package files: Whenever you install or update a software, the associated .deb file is first downloaded into /var/cache/apt/archives folder. So, it is a good habit to keep your system clean. For this, you can simply type into the terminal:

sudo apt-get autoclean

6. Remove unnecessary dependencies downloaded: Say you install a piece of software, and uninstall it after a certain while. Since Linux is an integrated platform and relies heavily on the active interactions between programs as per the UNIX Philosophy (that it is better to make programs which do one thing only, but do it well) dependencies are a huge necessity whenever you install virtually anything.

Due to the magic of Ubuntu's package manager, you don't see much fuss about installing them. apt-get simply grabs the necessarily packages from the central server and install them in one go.

So, it is a good practice to run the following command at least once in every 4-5 days to make your system fresher:

sudo apt-get autoremove 

This removes the non-required dependencies from your system.

Janitor is a great friend when you use the system for long
7. Cleanup your system: Many cleaners including Janitor, Bleachbit etc. are available, but in my opinion, the easiest and most effective (in my case, at least) option is to use Ubuntu Tweak. This is one magical application that bundles all necessary functionalities for successfully maintaining your system within a single GUI.

So, install it first from the PPA (Personal Package Archive):

sudo apt-add-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

The GUI is just plain simple. Make use of Janitor tab from within the application.

This will help remove configuration files for your uninstalled apps, previous versions of kernel, etc.

8. Disable unnecessary startup applications: When you log into the system, a number of unnecessary applications start running in the background, which are better to be disabled for speed. Run this command into the terminal:

sudo sed -i ‘s/NoDisplay=true/NoDisplay=false/g’ /etc/xdg/autostart/*.desktop

Now, open Startup Applications from System menu and disable the following:

Many such unnecessary applications can be prevented from autostart
Backup Monitor (if you don't need to backup your system regularly)
Bluetooth manager



Check for new hardware devices
Chat
Gwibber
Orca screen reader
Personal File Sharing
Ubuntu One (if you don't like to use the cloud system)
Update notifier (you can always upgrade the system from the terminal itself).

That's all for now, folks. I've intentionally skipped things such as tweaking the swappiness, using zram for low RAM systems etc. because I haven't seen them to be much effective. Additionally, using lighter programs such as AbiWord, Gnumeric etc. or lighter Desktop Environments such as Xfce and LXDE etc. are helpful to save your speed, but at the same time they may affect your productivity.

So, this much for now, and see you all soon.

No comments:

Post a Comment