How to compile custom kernel in Ubutntu ?

Today we will initiate first step to create our own kernel. So carefully following steps to build kernel inside ubuntu.I am using 64-bit ubuntu 13.10.

First of go to and download any kernel version (recommended latest stable version)

After downloading Right-click and extract here.

then open terminal (CTRL+ALT+T)

STEP 1: Enter into root user



enter your root password.

If it gives any error even if you are typing your password then reset it by  typing sudo root passwd.

then enter new unix password that’s it.

Now enter into root user.When you enter into root user $ will become # in terminal.

step 2:

type cd Downloads/ to change your directory

and create directory named kernel by typing mkdir kernel

Screenshot from 2015-03-09 21:20:10

step 3:

For a while open your Download folder into ubuntu .

copy linux-x.x.x to kernel directory.

step 4:

Now we need to install some necessary packages inside system so

open new terminal (CTRL+ALT+T) and type

sudo apt-get install gcc libncurses5-dev dpkg-dev

Screenshot from 2015-03-09 21:14:27


step 5 :

After completion of installation Open new terminal (CTRL +ALT +T )

again enter into root user and type your password

change directory type

cd Downlods/kernel/



cd linux-3.10.71

choose as per your version instead using linux-3.10.71

step 6 :


make menuconfig



after some time new GUI will appear inside terminal


select general setup

then local version- append to kernel release


now give any name there .I have given punit-custom


then ok


save the customization. and click on exit until you come to default terminal window.

step 7:

make -j 3 KDEB PKGVERSION=1.punit-custom deb-pkg


you have to type your custom name instead of punit-custom

It will take around 30 minutes …

Final step : sudo dpkg -i ../linux*.deb

now reboot your will final custom kernel in your advance option


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s