Article Title: Practical Tips: UbuntuLinux8.04 settings and optimization. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. Change the kernel
The default kernel 2.6.24-16-generic of the system. This kernel is a general kernel that has not been optimized for specific users. My desktop also has a better kernel to choose from, 2.6.24-16-rt (realtime) this kernel features a task preemptible mode, which can greatly accelerate the startup time and switching time between programs. Installation Method:
Sudo apt-get install linux-rt
2. Disable IPv6
Method:
Edit/etc/modprobe. d/aliases
Modify
Alias net-pf-10 ipv6
Is
Alias net-pf-10 off
Comment out all IPV6-related content in the/etc/hosts file.
# The following lines are desirable for IPv6 capable hosts
: 1 ip6-localhost ip6-loopback
# Fe00: 0 ip6-localnet
# Ff00: 0 ip6-mcastprefix
# Ff02: 1 ip6-allnodes
# Ff02: 2 ip6-allrouters
# Ff02: 3 ip6-allhosts
This will disable all network interfaces that use IPV6.
Create a new/etc/modprobe. d/bad_list file with the following content:
Alias net-pf-10 off
3. Optimize apt Source
$ Cd/etc/apt
$ Sudo su
# Mv sources. list sources. list-bak
# Sed-e '/^ #/d'-e's/deb-src/# deb-src/'Sources. list-bak> sources. list
The result of the preceding command is to back up sources. list as sources. list-bak, remove the comment statement in sources. list, and comment out the deb-src directory.
I am dazzled by too many annotation statements, and I do not need the source code of the software.
4. Optimized session startup items
Menu System -- preferences -- sessions, remove services you don't need.
5. Program startup Optimization
Run the Startup Program in parallel to accelerate the startup process.
Edit/etc/init. d/rc
Modify
CONCURRENCY = none
Is:
CONCURRENCY = shell
Be careful not to write an error. If it is wrong, the system cannot be started.
6. Add DNS cache
Dns cache dnsmasq is also a good choice, but pdnsd is smaller. It is enough for a single machine, and not everyone needs to make their own cache, I am using the dns server of Hangzhou Netcom, which is too slow to speed up dns resolution.
Sudo apt-get instll pdnsd installation pdnsd
Edit/etc/pdnsd. conf and add it below the global segment.
Server {ip = "x. x";/* enter the IP address of your first dns server */
Timeout = 30;
Interval = 900;
Uptest = none;
Ping_timeout = 500;
Purge_cache = off;
Caching = on;
} Server {
Ip = "x. x";/* enter the IP address of your second dns server */
Timeout = 30;
Interval = 900;
Uptest = none;
Ping_timeout = 500;
Purge_cache = off;
Caching = on;
} Edit the/etc/resolv. conf file
Change the first line to "nameserver 127.0.0.1"
7. Install the RAR compression/decompression program
Sudo apt-get install rar unrar
Make a soft link
Sudo ln-fs/usr/bin/rar/usr/bin/unrar
In this way, you only need to enter unrar in the command line to decompress Or compress the file. After the installation is complete, the archive Manager also integrates the rar component.
8. Clear system garbage
Sudo apt-get autoclean clear old software Cache
Sudo apt-get clean all software caches
Sudo apt-get autoremove deletes isolated software that is no longer used by the System