As you become a regular and veteran Ubuntu user, you might notice a decline in the speed of your Ubuntu system over time. This may result from a wide number of applications that you might have installed time to time or that your configuration settings are not optimal for a faster Ubuntu experience. In this article, I will show several ways to speed up your Ubuntu system that have worked for me over years.
The commands and procedures mentioned in this article have been run on an Ubuntu 18.04 LTS system.
Reduce boot time by altering grub configuration
By default, your system grub gives you a time of 10 seconds to select between operating systems on a dual boot system. When you know that you have to boot an Ubuntu system on grub most of the times, it is useless to sit and manually choose Ubuntu over any other OS. One way to do so is to change the grub settings so that your system automatically boots Ubuntu after a short duration of say, 2 seconds.
In order to do this, open your Terminal application either through Ubuntu Dash or through the Ctrl+Alt+T shortcut.
The grub configuration file is located in the /etc/default/ folder and can be altered in the following manner to change the grub timeout.
Use the following command to open the grub file in the Nano editor:
$ sudo nano /etc/default/grub
The highlighted part in the following image is where you can set the grub timeout which is 10 seconds by default:
You can change it to a shorter duration, preferably 2 seconds. Press Ctrl+X in order to save and exit the file. Then enter the following command in order to update the system grub:
$ sudo update-grub
Now when you start your system the next time, you will not have to wait for 10 seconds to boot to Ubuntu.
Get rid of heavy startup applications
As you become a regular Ubuntu user, you keep installing more and more applications on your system. Some of these may become a part of your startup willingly or automatically. A lot of startup applications take a lot of time at system boot and you have to wait long in order to start working on your system. One way to save time is to configure your startup to run only genuinely needed applications.
Access Startup Applications from the Applications list or through the Ubuntu Dash as follows:
You will be able to view a list of applications added to your startup.
You can easily remove an extra application from startup simply by selecting the application and then click the Remove button.
Alternatively, you can press the Edit button and add a delay after which a specific application will be launched after startup. In the Edit dialog, add a command in the following format before the already written command as follows:
sleep 20; dropbox start -i
Make use of the Preload utility to decrease application launch time
Preload is a system utility that runs in the background, keeps a track of frequently run applications, and already loads the relevant dependencies in system memory so that those apps are loaded quickly when needed. You can use the following command as root in order to install this utility to your system:
$ sudo apt-get install preload
Install applications faster through the apt-fast wrapper
If you, like me, frequently use the apt-get command in order to download applications through the command line, here is a quicker alternative. Apt-fast is a shell script wrapper that downloads an application package simultaneously from multiple locations, making it faster than the apt-get command.
Hers is how you can install it through the Terminal. Use the following command in order to add the ppa repository:
$ sudo add-apt-repository ppa:apt-fast/stable
Then enter the following command:
$ sudo apt-get update
Now use the following command to install apt-fast $ sudo apt-get install apt-fast
Now you can save time by installing your applications in a much faster way.
Select best server for faster software updates
The software mirror that your system uses for downloading software updates plays a major role in how fast the download would be. Therefore, it is best to make sure you are using the nearest mirror as it increases the download speed to a great extent.
In order to do so open the Software and Updates utility through the system dash as follows:
In the Ubuntu Software tab, click the ‘Download from’ dropdown and then select Other from the list.
Then click the Select Best Server button on Choose a Download Server dialog.
The system will then test various mirrors to see which one is nearest and best for you. You can then choose the suggested server for faster downloading of updates.
Through these simple ways described in this article, you will notice that the same system you were using will appear to perform faster than before. You will now have a faster boot, faster applications and updates downloading and also quick loading of frequently used applications.