How to install and compile Linux Kernel 5.6.16 from source code ?

by Ismail.EL
0 comment

1- Introduction

Compiling a custom kernel has its advantages and disadvantages. knowing that new users and Linux administrators have trouble compiling the Linux kernel. to install and compile a new linux kernel version it requires little understanding and some commands.

In this tutorials I will explain step by step the procedure for the compilation of version 5.2.19 of the Linux kernel on Linux Ubuntu or Debian

2- Prerequisites

For this tutorial, you will require:

And then push your chnges to uour remote github repository using the command below :

3. Get the latest Linux kernel source code

You can visit the official project site and download the latest source code. Click on the big yellow button that read as “Latest Stable Kernel“:

You can use the wget command to download Linux kernel source code:

4. Extract tar.xz file

After downloading the tar file in your curruent directory you can extract it using the following unzx command or xz command


Verify Linux kernel tartball with pgp

First grab the PGP signature for linux-5.6.9.tar:

Try to verify it:

Sample outputs:

Grab the public key from the PGP keyserver in order to verify the signature i.e. RSA key ID xxxxxxxxxxxxxxxxxxx (from the above outputs):

Sample outputs:

gpg: key xxxxxxxxxxxxxxxxxxx: 7 duplicate signatures removed
gpg: key xxxxxxxxxxxxxxxxxxx: 172 signatures not checked due to missing keys
gpg: /home/vivek/.gnupg/trustdb.gpg: trustdb created
gpg: key xxxxxxxxxxxxxxxxxxx: public key “Linus Torvalds <>” imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1

Now verify gpg key again with the gpg command:

Sample outputs:

gpg: assuming signed data in ‘linux-5.6.16.tar’
gpg: Signature made Sun 12 Aug 2019 04:00:28 PM CDT
gpg: using RSA key xxxxxxxxxxxxxxxxxxx
gpg: Good signature from “Linus Torvalds <>” [unknown]
gpg: aka “Linus Torvalds <>” [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: ABAF 11C6 5A29 70B1 30AB E3C4 79BE 3E43 0041 1886

Step 3. Configure the Linux kernel features and modules

Before start building the kernel, one must configure Linux kernel features. You must also specify which kernel modules (drivers) needed for your system. The task can be overwhelming for a new user. I suggest that you copy existing config file using the cp command:

Sample outputs:

6160cookie-checkHow to install and compile Linux Kernel 5.6.16 from source code ?

Related Posts

Leave a Comment