I am in /boot as "root". I edit config-2.6.32-431.el6.x86_46 and added my name to CONFIG_LOCALVERSION="John"

But when I type uname -r is just shows the version, but not my name at the end. Am I editing the wrong config file?

  • Change your title for better response.
    – TPS
    Sep 9, 2014 at 9:03

2 Answers 2


The file you are editing is merely a record of the config of the kernel when it was compiled. The only way a change here would work is if you were to prepare your system to compile a new kernel and copy the file from /boot to the kernel source tree in order to use it as the kernel options during the compilation process.

The config file is simply used to decide how to build the kernel and to pass a few options (such as CONFIG_LOCALVERSION). For example, the first line on my current config is:


which told the kernel build process to compile for a 64 bit computer. If you look through the file you'll see many options that enable (y) or disable (n) an option and for drivers allow you to build as a loadable module (m).

The file thererfore doesn't reside in the kernel - it defines the kernel at build time. Nothing more, nothing less. Once the kernel is compiled, the file is effectively redunant. They are stored in /boot so that a similar kernel can be rebuilt later without going through each individual option and deciding on their values from scratch. There are 4448 lines that begin with CONFIG in my current config file - deciding on each one would be rather laborious and error prone. Instead, I could copy this file into the kernel build tree and change the few settings I need to change then rebuild the kernel.

As CONFIG_LOCALVERSION is hard coded in at compile time, it cannot be changed. It can only be read by the uname command, or as g4ur4v said, from the proc filesystem at /proc/sys/kernel.

  • Ok thank you. Is there a way to find where the config file is in the current kernel?
    – Caladrius
    Sep 9, 2014 at 13:29

uname -r takes data from /proc/sys/kernel/osrelease .

You cannot modify this file.

/boot is used when you want to compile a new kernel, so changing file there has no effect on the running kernel.

  • Ok, but can I still view the current kernel's config file? Where is it located?
    – Caladrius
    Sep 9, 2014 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .