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 LibreOffice after 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:
Sudo apt-get Install preload
So it's loaded. 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 (Startup Applications 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:
sudo sed-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", so that the service is displayed 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 Ubuntu one 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 the function is less, but faster.
If you're using Mozilla's Thunderbird or Gnome's evolution to send and receive emails, try Sylpheed, a lightweight email 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 multiple systems installed, the Ubuntu Grub boot menu will allow you to choose a system for 10 seconds. If you do not have a choice, the default system will be automatically entered after 10 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 10. 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:
sudo update-grub2
You can also use the software Grub-customizer to modify the detailed settings of the boot menu.
Six, adjust the parameter values of the swap partition ( swappiness )
This approach is controversial. The Linux 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 the swappiness, 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 100.
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.
100 means 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 60 by default. If you find that the Ubuntu system is using swap partitions too much, reducing system performance, you can lower swappiness values, such as dropping to 10.
The following command can temporarily change the value of Swappiness to 10:
sudo sysctl 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.