Pin Me

Overview of Linux Kernel Parameters

written by: S. R. Obbayi•edited by: Eric Stallsworth•updated: 5/26/2011

Are your Linux software installations messing with your system? It might be of great interest to know that your installations might just be tampering with the Linux Kernel Parameters. This guide will show you how to get access to those same parameters and revert any changes that were made.

  • slide 1 of 4

    What are Linux Kernel Parameters

    Tux Linux Mascot To understand it better, every piece of computer hardware be it a server, desktop, mobile or embedded device has their own configurations which can vary heavily. This does not include the different kinds of software that are expected to make use of the hardware components in the most efficient way possible.

    The hardware components referred to here can be devices such as network interface cards, sound cards, Graphic processing units or GPUs, Game controllers, their drivers and so on.

    Kernel parameters are a list of configurations primitives or presets that seek to normalize this scenario and provide a stable functioning ecosystem by providing a way to manage the workings of the Kernel.

    Before you read on it is important to know that making changes to these parameters without proper knowledge can cause you system to become unstable.

  • slide 2 of 4

    Modifying Kernel Parameters

    You may find yourself in situation where you might need to make changes to the Linux parameters although with most modern configurations and Linux distros that would be highly unlikely in a Desktop, Mobile or embedded device environment.

    When using server environments the situation may be different. With server installations, it may be necessary to tune your system by modifying these parameters. One such example is IMBs DB2 Universal Database which raises the Inter-process communication limits during installation.

    With this and any other Kernel Parameters, for you to modify any of them, Linux provides a command-line tool to do exactly this. This command-line tool is called sysctl. It is used in this manner:

    sysctl -p /etc/sysctl.conf

    Where -p is a flag that reads the sysctl.conf file that is read on system start-up. You can view the raw contents of the config file then add or edit the entries or enable the preexisting parameters by typing this command:

    emacs /etc/sysctl.conf

    Usage parameters for the sysctl tool can be found by typing the following at the command prompt:

    sysctl -h

    You may be careful to note that this is in no way actual Linux Kernel development, this is just modifying how it behaves on the particular hardware and software configurations.

  • slide 3 of 4

    List of Kernel Parameters

    All Linux distros keep a copy of a list of the configurations that were used when the distro was built. You might want to have this information for future use. An example would be if you were to install an application that modifies one or two of these the parameters and ends up not working as expected. You can refer to these configurations to restore previous settings.

    In some Linux distros (especially those built native), you can find a copy of these configurations is a file name .config located in /usr/src/linux. Now, if you installed from a binary distribution (which is most likely the case), then the .config file will not be found there.

    In my Ubuntu distro, like most others, the file is found here:

    /boot/config-2.6.24-16-server

    where the last part corresponds to the kernel version of your installation. You can see the contents in my case by entering:

    less /boot/config-2.6.24-16-server

    You can find a full parameter list by going to this location on your installation if you have included the source. Otherwise in the references at the bottom, you can find a full link to an online resource with the same information spanning about 2700 lines of code.

    /lib/modules/<kernel-version>/source/Documentation/kernel-parameters.txt

    Where <kernel-version> should be the appropriate version.

  • slide 4 of 4

    References

    Linux documentation, http://www.kernel.org/doc/Documentation/

    Linux Kernel Parameters list, http://www.kernel.org/doc/Documentation/kernel-parameters.txt

    Image Credit: Larry Ewing, primates.ximian.com/~lewing, The GIMP, www.gimp.org