How to increase your linux system loading speed

Linux can be run on various run level, for run level 0 is shutdown, and run level 6 is restart and usually run level 1 is single user linux.

By default, fedora and red hat will running run level 5 and Ubuntu is running 2. By knowing what run level of your linux distro init, you can further tweak your system by stopping wanted services. The easiest way is to manipulate the symlinks in /etc/rcX.d, where ‘X’ is your default run level. For the case of Ubuntu, it is /etc/rc2.d.

Thats why to shutdown my system, I can do

sudo init 0

In /etc/rcX.d, it contains symlinks looks as bellow:

K19hplip            S11klogd          S20powernowd                 S91apache2 K20festival
S13gdm              S20rsync          S98noip2 K20nvidia-kernel    S19cupsys
S20samba            S98usplash        K20wifi-radar                S19mysql
S20ssh              S99acpi-support 

They are all symlinks, the real scripts contain in /etc/init.d. S indicate the service will be loaded during initialization of your system, and K indicate Kill, means stop service. So, the simple hack is changing the file name from S to K

Let say I would like to turn off apache from loaded during startup, I do

sudo mv {S,K}91apache2

Turn it on back,

sudo mv {K,S}91apache2

Okay, we cannot assume we are running on run level 2 or 5. It must be a way to know what run level we are running. Check out /etc/inittab

You will find a line show as bellow, which indicate that your default run level is 2.

id:2:initdefault:

But, Eh! WTF, why Ubuntu Edgy do not have inittab?!! How am I suppose to know what run level am I running now?

Ubuntu Edgy abandon the convention way of manipulate run level but replace with upstart.

To know what is your previous and current run level if your system uses upstart, type

runlevel

The output:

N 2

First column indicate the previous run level, N means None. Follow by current run level, which is 2.

(linux.byexamples.com)



Thank you for reading this post. You can now Leave A Comment (0) or Leave A Trackback.

Post Info

This entry was posted on Wednesday, February 28th, 2007 and is filed under Uncategorized.

You can follow any responses to this entry through the Comments Feed. You can Leave A Comment, or A Trackback.



Previous Post: RISC OS 5.13 Available for Download »
Next Post: Killing misbehaving programs and processes »

Read More

Related Reading:



Leave a Reply

Note: Any comments are permitted only because the site owner is letting you post, and any comments will be removed for any reason at the absolute discretion of the site owner.