Six strokes to speed up your Ubuntu

Source: Internet
Author: User



Ubuntu starts very fast and quickly enters the desktop after pressing the power button. But we can still make the most of the memory and make the boot faster with a variety of methods. Some methods can really speed up, especially for old computers.

Using a lightweight desktop environment and shutting down unnecessary applications can make an old computer a relief. If you forcibly run Ubuntu 's Unity desktop Environment on an old computer, the system slows down very slowly.


I. Pre-load ( Peload )


Preload is a background service that monitors the programs used on the system. It can find out which libraries (libraries) and binaries (binaries) are used by the program, pre-loaded into memory, making the program start faster. For example, you may often open the Firefox browser and LibreOfficeafter booting, then when the preload is set, the system will automatically load the files of both programs into memory when it is started. When you log in to the system to open the two programs, you will find that they start faster than before.

Most Ubuntu systems do not have preload enabled by default, and only a few versions of this service are installed. Run the following command to install the pre-load service:

Sudoapt-get Install preload



That's it! The preload service will run in the background and will not disturb your work. You can modify the pre-loaded settings in the /etc/preload.conf file, but in general you can use the default settings.


Second, set up a random startup program


You can let some programs start randomly when the system is powered on. Some programs will start randomly when they are installed--such as Dropbox. If you have a lot of random startup programs, or your system is slow, your system will take more time to start. You can disable random startup of some programs in the Random Launcher dialog box (startupapplications dialog).


Many system services that are started by default are not displayed in the list. You can set these services by running the following command:

Sudosed-i ' s/nodisplay=true/nodisplay=false/g '/etc/xdg/autostart/*.desktop

This command modifies the file properties of the random startup service, changing the value of the parameter "nodisplay" from "true" to "false". Let the service appear in a randomly launched list. Once you have run the command, reopen the Random Launcher dialog box and you will be able to see the system services that were previously hidden.



Do not change the default startup settings unless you are doing these system services. For example, if your computer does not have a Bluetooth device, you can disable the Bluetooth manager from randomly booting, and if you use the ubuntuone service, do not disable it from starting randomly.

You just need to remove the hook from the front of the program and you can disable the program from starting randomly. Do not click Remove, which will remove the program from the system. If you want to get the program to start randomly, tick it in front of you.


Third, Use a lightweight desktop environment


If your PC is older, the Unity desktop running Ubuntu is struggling to choose a lightweight desktop environment. LXDE,XFCE is a good choice, if you need is the most concise desktop, you can use xmonad. These desktop environments provide the most basic desktop functionality.




Four, Choose from lightweight Applications


Lightweight applications, combined with a lightweight desktop environment, can further improve the system performance of older computers. For example, you can use Abiword instead of LibreOffice,Abiword Although less functionality, but faster.




If you're using Mozilla 's Thunderbird or GNOME 's Evolution to send and receive emails, try sylpheed, It is a lightweight mail manager with a graphical interface. Most software can find a lightweight alternative that can be found in Google search. You can even close all the graphical interfaces and do all the work with the terminal-you'll find a lot of software that runs on the terminal interface.


Five, Shorten the delay of the boot menu


If your computer has more than one system installed, theUbuntu GRUB boot menu will allow you to select a system with a delay of ten seconds. If you do not have a choice, it will automatically enter the default system afterten seconds. If you usually enter the default system, you can shorten the delay and save boot time.


Run the following command to open the /etc/default/grub file in a text editor to modify the startup delay:


sudo gedit/etc/default/grub


Change the value of grub_timeout to an integer less than ten . Can be set to a minimum of 1, and then if you need to select the boot menu, you can press the UP and DOWN ARROW keys or Esc key.




To save the modified file, run the following command to update the boot menu to complete the setup:


Sudoupdate-grub2




You can also use the software Grub-customizerTo modify the detailed settings of the boot menu.


Six, adjust the parameter values of the swap partition ( swappiness )


This approach is controversial. TheLinux kernel developer has a different view of how swappiness should be set to be the most appropriate.


swappiness affects the speed of the Linux kernel-that is, the larger the value of theswappiness , the more data is transferred from memory to the hard disk-switched partition, but the system performance is relatively low. The value of swappiness can be from 0 to.


    • 0 means that the system kernel maximizes the use of physical memory to run programs and does not use swap partitions as much as possible.

    • The system kernel maximizes the use of the swap partition to run the program, minimizing the memory burden.


The Ubuntu system sets the swappiness parameter to set by default. If you find that the Ubuntu system is using swap partitions too much, reducing system performance, you can lower the swappiness values, such as dropping to ten.




The following command can temporarily change the value of swappiness to ten:


Sudosysctl vm.swappiness=10


However, the next time you restart the system,swappiness will revert to the default value. If you do not want to restore the default, you can modify the /etc/sysctl.conf file:


sudo gedit/etc/sysctl.conf


Open the file, locate the vm.swappiness, and modify its value. If it is not found, you can add a line to the end of the file in the following format:


vm.swappiness=10




Finally save the changes.

Six strokes to speed up your Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.