Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change version string of the kernel?

I'm very new to Linux and very new to building/compiling my own kernel. For starters, I'm just trying to figure out how to change the version string of my kernel. For instance, when I do uname -a, it prints out "Linux localhost.localdomain 3.11.10-100.fc18.i686". I'd like to customize that, but I'm not sure what file to edit. I know it must be some file in my kernel directory, but I've been going through them with no luck. Any help would be great!

like image 524
pfinferno Avatar asked Feb 23 '15 22:02

pfinferno


People also ask

Can you modify the Linux kernel?

changing linux kernel involves two things: Downloading the source code, compiling the kernel. Here when you compile the kernel for first time it will take time. I have attached link to start compiling kernel and install it. Now-a-days its quiet easy.


1 Answers

At the top of the top-level Makefile, there are four lines

VERSION = 3
PATCHLEVEL = 18
SUBLEVEL = 7
EXTRAVERSION =

The values are different for different kernel versions, of course. These are used to construct the version string, so changing them before building the kernel changes the version string of the kernel you build.

Additionally, there's a configuration option CONFIG_LOCALVERSION, to be found under General Setup -> Local version - append to kernel release in make menuconfig that is appended to this.

like image 63
Wintermute Avatar answered Oct 28 '22 22:10

Wintermute