As you become a regular and experienced Ubuntu user, you may notice that the speed of your Ubuntu system decreases over time. This may be due to a variety of applications you have installed from time to time, or because your configuration settings are not optimal for a faster Ubuntu experience. In this article, I’ll show you several ways to speed up your Ubuntu system that have worked for me over the years.
The commands and procedures mentioned in this article were run on an Ubuntu 20.04 and Ubuntu 18.04 LTS system and they will also work on the upcoming Ubuntu 22.04.
Reduce boot time by optimizing grub configuration
By default, your system grub gives you 10 seconds to choose between operating systems on a dual-boot system. If you know that in most cases you will have to boot an Ubuntu system via grub, it is pointless to sit down and manually choose Ubuntu over another operating system. One option is to change the grub settings so that your system automatically boots Ubuntu after a short period of, say, 2 seconds.
To do this, open your terminal program either via Ubuntu Dash or via the key combination Ctrl+Alt+T.
The grub configuration file is located in the /etc/default/ folder and can be modified in the following way 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
Over time you will probably install more and more applications on your system. Some of them may become part of your startup by choice or automatically. Many startup applications take a long time to start up and you have to wait a long time before you can work with your system. One way to save time is to configure your startup to run only the applications you really need.
You can access the startup applications from the application list or from 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 track of frequently run applications, and loads the appropriate dependencies already into system memory so that these applications load quickly when needed. You can use the following command as root to install this utility on your system:
$ sudo apt-get install preload
Install applications faster through the apt-fast wrapper
If, like me, you often use the apt-get command to download applications from the command line, here’s a faster alternative. Apt-fast is a shell script wrapper that downloads an application package from multiple locations at once, making it faster than the apt-get command.
Here you can learn how to install it from the terminal. Use the following command 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 the best server for faster software updates
The software mirror that your system uses to download software updates plays a big role in how fast the download is. Therefore, you should make sure that you use the closest mirror, as this will increase the download speed significantly.
To do this, open the Software and Updates utility from 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 different mirrors to find out which one is closest and best for you. You can then choose the suggested server to download the updates faster.
Through these simple methods described in this article, you will notice that the system you have been using works faster than before. The system will now boot faster, applications and updates will download faster, and frequently used applications will load faster.