Installing linux source ubuntu

How To Install linux-source on Ubuntu 20.04

In this tutorial we learn how to install linux-source on Ubuntu 20.04. linux-source is Linux kernel source with Ubuntu patches 1cac084d2ae18dfd06b96585b4be564d Linux kernel source with Ubuntu patches 1cac084d2ae18dfd06b96585b4be564d

Introduction

In this tutorial we learn how to install linux-source on Ubuntu 20.04.

What is linux-source

This package will always depend on the latest Linux kernel source code available. The Ubuntu patches have been applied. Description-md5: 1cac084d2ae18dfd06b96585b4be564d

Package: linux-source Architecture: all Version: 5.4.0.26.32 Priority: optional Section: devel Source: linux-meta Origin: Ubuntu Maintainer: Ubuntu Kernel Team [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 17 Depends: linux-source-5.4.0 Filename: pool/main/l/linux-meta/linux-source_5.4.0.26.32_all.deb Size: 2688 MD5sum: 91cdd3ac7950db6e2254b96efe0f74d7 SHA1: e445a5db08040a520e7c37b0e7f6fb7208d3d183 SHA256: d338cd4bc4df92be99055e55a6d856e843f37b2bcc75778e3c7ab0fcfeb5f0f1 Description-en: Linux kernel source with Ubuntu patches This package will always depend on the latest Linux kernel source code available. The Ubuntu patches have been applied. Description-md5: 1cac084d2ae18dfd06b96585b4be564d

There are three ways to install linux-source on Ubuntu 20.04. We can use apt-get , apt and aptitude . In the following sections we will describe each method. You can choose one of them.

Install linux-source Using apt-get

Update apt database with apt-get using the following command.

After updating apt database, We can install linux-source using apt-get by running the following command:

sudo apt-get -y install linux-source 

Install linux-source Using apt

Update apt database with apt using the following command.

After updating apt database, We can install linux-source using apt by running the following command:

sudo apt -y install linux-source 

Install linux-source Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

Читайте также:  Центр управления системой alt linux

After updating apt database, We can install linux-source using aptitude by running the following command:

sudo aptitude -y install linux-source 

How To Uninstall linux-source on Ubuntu 20.04

To uninstall only the linux-source package we can use the following command:

sudo apt-get remove linux-source 

Uninstall linux-source And Its Dependencies

To uninstall linux-source and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove linux-source 

Remove linux-source Configurations and Data

To remove linux-source configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge linux-source 

Remove linux-source configuration, data, and all of its dependencies

We can use the following command to remove linux-source configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge linux-source 

References

Summary

In this tutorial we learn how to install linux-source package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.

Источник

How to install full kernel source on Debian or Ubuntu

Question: I need to download and install a full kernel source tree to compile a custom kernel for my Debian or Ubuntu system. What is a proper way to download full kernel source on Debian or Ubuntu?

Before installing full kernel source on your Linux system, ask yourself whether you really need the full kernel source. If you are trying to compile a kernel module or a custom driver for your kernel, you do not need the full kernel source. You only need to install matching kernel header files, and that’s it.

You need the full kernel source tree only if you want to build a custom kernel after modifying the kernel code in any way and/or tweaking default kernel options.

Here is how to download and install full kernel source tree from Debian or Ubuntu repositories. While you can download the official kernel source code from https://www.kernel.org/pub/linux/kernel/, using distro’s repositories allows you to download a kernel source with the maintainer’s patches applied to it.

Читайте также:  Nfs как настроить linux

Install Full Kernel Source on Debian

Before downloading kernel source, install dpkg-dev , which contains a suite of development tools needed to build Debian source packages. Among other things, dpkg-dev contains dpgk-source tool which can extract a Debian source package and automatically apply patches.

$ sudo apt-get install dpkg-dev

Next, run the following command to download full kernel source.

$ apt-get source linux-image-$(uname -r)

Along with the full kernel source ( linux_X.X.XX.orig.tar.xz ), any available kernel patches ( linux_X.X.X+XXX.debian.tar.xz ) and source control file ( linux_XXXX.dsc ) will also be downloaded and stored in the current directory. The .dsc file instructs how the patches are applied to the kernel sources.

Upon the completion of download, the above command will automatically invoke dpkg-source tool, which will unpack the downloaded kernel source in the current directory, and apply downloaded patches according to .dsc file.

The final full kernel source tree will be available in the current directory as linux-X.X.XX .

Install Full Kernel Source on Ubuntu

If you want to install full kernel source, the Debian way described above should work on Ubuntu as well.

There is another way to download full kernel source on Ubuntu. You can actually check out the kernel source tree maintained by Canonical for different Ubuntu releases.

$ sudo apt-get install git $ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-$(lsb_release --codename | cut -f2).git

For example, if you are using Ubuntu 14.04, the above command will check out code from » ubuntu-trusty » Git repository.

Once you check out the Git repository, use the following command to install necessary development packages to meet the build dependencies for the kernel source tree.

$ sudo apt-get build-dep linux-image-$(uname -r)

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Читайте также:  Arch linux grub restore

Источник

How To Install linux-source on Ubuntu 22.04

In this tutorial we learn how to install linux-source on Ubuntu 22.04.

What is linux-source

This package will always depend on the latest Linux kernel source code available. The Ubuntu patches have been applied.

There are three ways to install linux-source on Ubuntu 22.04. We can use apt-get , apt and aptitude . In the following sections we will describe each method. You can choose one of them.

Install linux-source Using apt-get

Update apt database with apt-get using the following command.

After updating apt database, We can install linux-source using apt-get by running the following command:

sudo apt-get -y install linux-source 

Install linux-source Using apt

Update apt database with apt using the following command.

After updating apt database, We can install linux-source using apt by running the following command:

sudo apt -y install linux-source 

Install linux-source Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

After updating apt database, We can install linux-source using aptitude by running the following command:

sudo aptitude -y install linux-source 

How To Uninstall linux-source on Ubuntu 22.04

To uninstall only the linux-source package we can use the following command:

sudo apt-get remove linux-source 

Uninstall linux-source And Its Dependencies

To uninstall linux-source and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove linux-source 

Remove linux-source Configurations and Data

To remove linux-source configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge linux-source 

Remove linux-source configuration, data, and all of its dependencies

We can use the following command to remove linux-source configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge linux-source 

References

Summary

In this tutorial we learn how to install linux-source package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.

Источник

Оцените статью
Adblock
detector