Ubuntu package linux source

Содержание
  1. Ubuntu package linux source
  2. Точные совпадения
  3. Пакет linux-source
  4. Другие совпадения
  5. Пакет linux-source-4.15.0
  6. Пакет linux-source-4.18.0
  7. Пакет linux-source-5.0.0
  8. Пакет linux-source-5.11.0
  9. Пакет linux-source-5.13.0
  10. Пакет linux-source-5.3.0
  11. Пакет linux-source-5.4.0
  12. Пакет linux-source-5.7.0
  13. Пакет linux-source-5.8.0
  14. How to get source code of package using the apt command on Debian or Ubuntu
  15. How to get source code of package using the apt-get/apt command
  16. Step 1 – Enable source code repo
  17. Step 2 – Update index
  18. Step 3 – Download Ubuntu package’s source code
  19. Step 4 – Understanding downloaded source code files
  20. How to download Debian package’s source code
  21. Conclusion
  22. Ubuntu Documentation
  23. Introduction
  24. Packages and Package Management
  25. What is a package?
  26. Source or Binary?
  27. Package Dependencies
  28. Package Managers
  29. Software Channels/Repositories
  30. Installing a Package
  31. Via your web browser
  32. Via a basic graphical method
  33. for Ubuntu: «Sofware Centre «
  34. for Kubuntu : «Add/Remove Programs»
  35. Via an advanced graphical method
  36. for Ubuntu/Xubuntu/Edubuntu : Synaptic
  37. Via a Text Based Methods
  38. Aptitude — the text-based method
  39. apt-get — the technical method
  40. Installing downloaded packages
  41. Using GDebi to install packages
  42. Using dpkg to install packages
  43. Getting a list of recently installed packages
  44. Automatic updates: Update Manager
  45. Installing packages without an Internet connection
  46. Use Keryx
  47. Use the Synaptic package download script
  48. Use Offline apt-get update
  49. Use apt-offline

Ubuntu package linux source

Вы искали пакеты, в именах которых есть linux-source. Были просмотрены все комплекты, все секции и все архитектуры. Количество подходящих пакетов: 10.

Точные совпадения

Пакет linux-source

  • bionic (18.04LTS) (devel): Linux kernel source with Ubuntu patches
    4.15.0.159.148 [ security]: all
    также предоставляется: linux-source-4.15.0, linux-source-4.18.0, linux-source-5.0.0, linux-source-5.3.0
  • bionic-updates (devel): Linux kernel source with Ubuntu patches
    4.15.0.159.148: all
    также предоставляется: linux-source-4.15.0, linux-source-4.18.0, linux-source-5.0.0, linux-source-5.3.0
  • focal (20.04LTS) (devel): Linux kernel source with Ubuntu patches
    5.4.0.88.92 [ security]: all
    также предоставляется: linux-gkeop-source-5.4.0, linux-hwe-5.11-source-5.11.0, linux-hwe-5.8-source-5.8.0, linux-source-5.4.0
  • focal-updates (devel): Linux kernel source with Ubuntu patches
    5.4.0.88.92: all
    также предоставляется: linux-gkeop-source-5.4.0, linux-hwe-5.11-source-5.11.0, linux-hwe-5.8-source-5.8.0, linux-source-5.4.0
  • groovy (20.10) (devel): Linux kernel source with Ubuntu patches
    5.8.0.63.69 [ security]: all
    также предоставляется: linux-source-5.7.0, linux-source-5.8.0
  • groovy-updates (devel): Linux kernel source with Ubuntu patches
    5.8.0.63.69: all
    также предоставляется: linux-source-5.8.0
  • hirsute (21.04) (devel): Linux kernel source with Ubuntu patches
    5.11.0.37.39 [ security]: all
    также предоставляется: linux-source-5.11.0
  • hirsute-updates (devel): Linux kernel source with Ubuntu patches
    5.11.0.37.39: all
    также предоставляется: linux-source-5.11.0
  • impish (devel): Linux kernel source with Ubuntu patches
    5.13.0.16.27: all
    также предоставляется: linux-source-5.13.0

Другие совпадения

Пакет linux-source-4.15.0

  • bionic (18.04LTS) (devel): Linux kernel source for version 4.15.0 with Ubuntu patches
    4.15.0-159.167 [ security]: all
  • bionic-updates (devel): Linux kernel source for version 4.15.0 with Ubuntu patches
    4.15.0-159.167: all

Пакет linux-source-4.18.0

  • bionic (18.04LTS) (devel): Linux kernel source for version 4.18.0 with Ubuntu patches
    4.18.0-25.26

18.04.1 [ security]: all
bionic-updates (devel): Linux kernel source for version 4.18.0 with Ubuntu patches
4.18.0-25.26

Пакет linux-source-5.0.0

  • bionic (18.04LTS) (devel): Linux kernel source for version 5.0.0 with Ubuntu patches
    5.0.0-65.71 [ security]: all
  • bionic-updates (devel): Linux kernel source for version 5.0.0 with Ubuntu patches
    5.0.0-65.71: all

Пакет linux-source-5.11.0

  • hirsute (21.04) (devel): Linux kernel source for version 5.11.0 with Ubuntu patches
    5.11.0-37.41 [ security]: all
  • hirsute-updates (devel): Linux kernel source for version 5.11.0 with Ubuntu patches
    5.11.0-37.41: all

Пакет linux-source-5.13.0

  • impish (devel): Linux kernel source for version 5.13.0 with Ubuntu patches
    5.13.0-16.16: all

Пакет linux-source-5.3.0

  • bionic (18.04LTS) (devel): Linux kernel source for version 5.3.0 with Ubuntu patches
    5.3.0-76.72 [ security]: all
  • bionic-updates (devel): Linux kernel source for version 5.3.0 with Ubuntu patches
    5.3.0-76.72: all

Пакет linux-source-5.4.0

  • focal (20.04LTS) (devel): Linux kernel source for version 5.4.0 with Ubuntu patches
    5.4.0-88.99 [ security]: all
  • focal-updates (devel): Linux kernel source for version 5.4.0 with Ubuntu patches
    5.4.0-88.99: all

Пакет linux-source-5.7.0

  • groovy (20.10) (devel): Linux kernel source for version 5.7.0 with Ubuntu patches [ universe]
    5.7.0-15.16: all

Пакет linux-source-5.8.0

  • groovy (20.10) (devel): Linux kernel source for version 5.8.0 with Ubuntu patches
    5.8.0-63.71 [ security]: all
  • groovy-updates (devel): Linux kernel source for version 5.8.0 with Ubuntu patches
    5.8.0-63.71: all

This page is also available in the following languages:

Авторские права © 2021 Canonical Ltd.; См. условия лицензии. Ubuntu это торговый знак компании Canonical Ltd. Об этом сайте.

Источник

How to get source code of package using the apt command on Debian or Ubuntu

Table of contents

How to get source code of package using the apt-get/apt command

The procedure to download source code is as follows for Ubuntu Linux.

Please note that apt-get does support third-party closed-source applications. You can only download the source code of open-source software.

Step 1 – Enable source code repo

Sources are normally not installed. Hence, you can only install them if you know the package name and when you enable them. Therefore, edit the /etc/apt/sources.list file, run:
$ sudo vi /etc/apt/sources.list
Make sure the deb-src type references an Ubuntu distribution’s source code as follows:
# Sources specification for the Ubuntu 20.04 LTS distro #
deb-src http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse
Where,

  1. deb-src : Indicate that you need source code for .DEB files.
  2. http://archive.ubuntu.com/ubuntu : URL to fetch index and .deb files source code.
  3. focal : Ubuntu Linux 20.04 LTS code name
  4. main restricted universe multiverse : State component name for repo such as main, restricted, universe, and multiverse

Step 2 – Update index

Run the following command to resynchronize the package index files from their sources as defined by the deb-src keyword in /etc/apt/sources.list for Ubuntu Linux
$ sudo apt-get update
# OR #
$ sudo apt update

Step 3 – Download Ubuntu package’s source code

Let us download source code for bash shell, run:
$ sudo apt-get source $ sudo apt-get source bash

You may see the following error if you forgot to set up deb-src as explained in step # 1:

E: You must put some ‘source’ URIs in your sources.list

Step 4 – Understanding downloaded source code files

Let us run the ls command to see source code:
$ ls -l

By default, the source code is extracted into bash-5.0 directory:
$ cd bash-5.0
$ ls
The upstream bash source tarball with .tar.xz ending is stored in bash_5.0.orig.tar.xz file. A description file with .dsc ending contains the name of the package, both, in its filename as well as content (after the Source: keyword). A tarball, with any changes made to upstream source, plus all the files created for the Debian package stored in bash_5.0-6ubuntu1.1.debian.tar.xz file. If the —download-only option passed to the apt-get command, then the source package will not be unpacked:
$ sudo apt-get —download-only source source bash
When downloaded, we can extract the source files for bash as follows:
$ dpkg-source -x /path/to/pkg.dsc
$ dpkg-source -x bash_5.0-6ubuntu1.1.dsc
It is also possible to build packages:
$ sudo apt-get —build source $ sudo apt-get —build source bash
Another option is to make changes in debian/rules files
$ vi bash-5.0/debian/rules
Next we can build out custom bash package as follows:
$ export EDITOR=vim
$ dch -n
Make sure we satisfy the build dependencies for a source package and to avoid errors install those libs and tools:
$ sudo apt-get -y build-dep bash
Finally, build a Debian package:
$ debuild
Verify new packages:
$ cd ..
$ ls *.deb
Install them:
$ sudo dpkg -i bash_*.deb

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

How to download Debian package’s source code

The procedure is the same as Ubuntu distro but URL syntax changes as follows:
$ sudo vi /etc/apt/sources.list
Edit/update as follows:
# source repo for Debian 10 buster #
deb-src deb http://deb.debian.org/debian buster main
Save and close the file in vim, and then run the following command:
$ sudo apt-get update
Let us download source code for the Apache web server:
$ apt-get source apache2

Conclusion

We explained how to enable Ubuntu/Debian source repo and download source code for the package by name. The apt-get source command is useful when you want to study packaging or a specific Debian package. Also useful to know which compile-time options enabled for a particular package. And finally, we can rebuild packages to add or remove components. See Debian guide wiki page for more information and read the following man pages by typing the man command:
$ man apt
$ man apt-get
$ man 5 sources.list
$ man debuild
$ man dch

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Источник

Ubuntu Documentation

Introduction

Note: The Main page is available in multiple languages.

Installing software in Ubuntu is easy, and this guide will show you how to do it.

By default, many useful programs are already installed when you put Ubuntu onto your computer. However, you may need a particular piece of software that serves a purpose not served by the default applications. You might just want to try an alternative program to one which is already installed. In other words, you need new software.

If you’d like to get some background information on what’s happening when you install software (which can sometimes be technical), read Packages and Package Management. If you just want to get started installing new programs, you can skip straight to Installing a Package.

Packages and Package Management

This section covers the basic concepts of packages and package management. You will learn about what a package is, the differences between different types of package and also how package management works on Ubuntu.

What is a package?

Software is a very broad term, and is generally taken to mean a program which you can run on your computer. However, such programs often need other resources to work. When you install software, thousands of files may be required just to let the program start! When you think that they all have to be put in exactly the right location, and some of those files may need to be changed depending on what type of computer you have, it can all get very complicated. Luckily, Ubuntu can look after this complexity.

Ubuntu uses packages to store everything that a particular program needs to run. A ‘package’, then, is essentially a collection of files bundled into a single file, which can be handled much more easily. In addition to the files required for the program to run, there will be special files called installation scripts, which copy the files to where they are needed (amongst other things).

Source or Binary?

Normally, when someone makes a package for a program, they put all of the source code for the program into that package. Source code is written by programmers and is essentially a list of instructions to a computer which humans are able to read and write. Computers can only understand this code if it is interpreted for them into a form that they can use directly. One such way of interpreting source code for a computer is by translating or compiling it into binary, which computers can understand.

So why don’t the people who make the package (called packagers) just convert it into binary from the start? Well, different computers use different types of binary, so if you make a binary package for one type (like an Intel PC), it won’t work on another (like a PowerPC).

Source packages are simply packages which just include source code, and can generally be used on any type of machine if the code is compiled in the right way. (For information on how to compile and install source packages, see CompilingEasyHowTo).
Binary packages are ones which have been made specifically for one type of computer, or architecture. Ubuntu supports the x86 (i386 or i686), AMD64 and PPC architectures. The correct binary packages will be used automatically, so you don’t have to worry about picking the right ones. To find out which one you are using, open ApplicationsAccessoriesTerminal, type uname -m then hit the enter key.

Package Dependencies

Programs often use some of the same files as each other. Rather than putting these files into each package, a separate package can be installed to provide them for all of the programs that need them. So, to install a program which needs one of these files, the package containing those files must also be installed. When a package depends on another in this way, it is known as a package dependency. By specifying dependencies, packages can be made smaller and simpler, and duplicates of files and programs are mostly removed.

When you install a program, its dependencies must be installed at the same time. Usually, most of the required dependencies will already be installed, but a few extras may be needed, too. So, when you install a package, don’t be surprised if several other packages are installed too — these are just dependencies which are needed for your chosen package to function properly.


An example of dependencies

Package Managers

A package manager is an application which handles the downloading and installation of packages. Ubuntu includes a few package managers by default, and which one you use depends on how advanced the package management tasks are that you want to achieve. Most people will only need to use the most basic package manager, the Add/Remove tool, which is very easy to use.

Software Channels/Repositories

Where can you get packages from?

Ubuntu stores all of its packages in locations called software channels or repositories. A software channel is simply a location which holds packages of similar types, which can be downloaded and installed using a package manager. A package manager will store an index of all of the packages available from a software channel. Sometimes it will ‘re-build’ this index to make sure that it is up to date and knows which packages have been upgraded or added into the channel since it last checked.

There are four Ubuntu software channels for each architecture — Main, Restricted, Universe and Multiverse. Each has a different purpose. By default, only packages from Main and Restricted can be installed. If you would like to install packages from Universe or Multiverse, see the Repositories page for instructions on how to do this.

In addition to the official Ubuntu repositories, it is possible to use third party repositories. Be careful, though — some are not compatible with Ubuntu and using them may cause programs to stop working or may even cause serious damage to your installation. The page http://www.ubuntulinux.nl/source-o-matic (page removed — why) can help you to find extra repositories, and the Repositories page gives instructions on how to enable them.

Installing a Package

This section explains how to install packages using the various tools available in Ubuntu,Xubuntu,Edubuntu and Kubuntu.

Via your web browser

In the Ubuntu Documentation, you will sometimes find sentences like for example:

» To install this software in Ubuntu, install the following package: supertux. «

Click on the name of the package («supertux» in the example):

    if the apturl protocol is enabled on your computer, you will be proposed to install the package called «supertux».

if not, please follow instructions of the AptURL page to enable apturl protocol on your computer.

Via a basic graphical method

Note that some packages can’t be installed via this method, in this case please use another method.

for Ubuntu: «Sofware Centre «

In recent versions of Ubuntu, the «Add/Remove» option in the Applications menu has been replaced by the Ubuntu Software Center.

for Kubuntu : «Add/Remove Programs»

Kubuntu’s new and easy method of installing packages is to use the ‘Add/Remove Programs’ tool. Click K-MenuAdd/Remove Programs to start it.

Add/Remove Programs is a simple graphical way of installing and removing applications in Kubuntu. To launch Add/Remove Programs, choose K MenuAdd/Remove Programs from the desktop menu system.

To install new applications select the category on the left, then check the box of the application you want to install. When finished click Apply, then your chosen programs will be downloaded and installed automatically, as well as installing any additional applications that are required. The default selection is restricted to KDE suite, but GNOME applications can be installed simply by selecting from dropdown menu at the top. Alternatively, if you know the name of the program you want, use the Search tool at the top.

Software from additional repositories may be installed by enabling the Show: Unsupported and Show: proprietary software checkboxes if they are enabled in your repository list. For more information, see the Repositories page.

Once this has finished, click Close.Your new programs are installed, ready to use!

Via an advanced graphical method

for Ubuntu/Xubuntu/Edubuntu : Synaptic

The Synaptic Package Manager offers a more advanced way of installing packages. If you have problems finding a suitable package with the Add/Remove tool, try using the search in Synaptic. This searches all of the packages in the available repositories, even the ones which don’t contain programs.

For details on using Synaptic, see SynapticHowto.

Via a Text Based Methods

Text based methods can be used across Ubuntu, Kubuntu and Xubuntu, but require familiarity with the terminal. When helping users to install packages, you should consider using an AptURL instead of apt-get or aptitude.

Aptitude — the text-based method

Aptitude is a text-based package manager, which must be run from a Terminal. Read the AptitudeSurvivalGuide for more information on how to use Aptitude.

apt-get — the technical method

The apt-get program is a command-line package manager, which should be used if the Add/Remove tool and Synaptic ever run into problems. It provides an advanced interface to APT, the underlying package management system which Ubuntu uses, but is reasonably easy to operate. Power users may find that apt-get is quicker to use and more powerful than the graphical options above.

For details on how to use apt-get, read AptGet/Howto.

Installing downloaded packages

You may wish to install a package you have downloaded from a website, rather than from a software repository. These packages are called .deb files. Because they may have been created for a different Linux distribution, you might find that there’s dependency issues with Ubuntu, meaning that they may be uninstallable.

To find a package which you have previously downloaded using Synaptic, aptitude or apt-get, look in /var/cache/apt/archives

Using GDebi to install packages

GDebi is a simple tool to install .deb files. It has a graphical user interface but can also be used in your terminal. It lets you install local deb packages resolving and installing its dependencies.. It automatically checks packages for their dependencies and will try to download them from the Ubuntu software repositories if possible. You may first need to install GDebi — simply install the gdebi package using one of the package managers listed above, or open a Terminal and type sudo apt-get install gdebi.

Once you have installed GDebi, use the File Browser to find the package you wish to install. Package files will look similar to this:

Double-click the package to open it with GDebi. If all dependencies have been met for the selected package, simply click the ‘Install package’ button to install it. GDebi will warn you if there are unmet dependencies, which means that there’s dependencies that aren’t resolved in the repositories that you’re using.

Using dpkg to install packages

dpkg is a command-line tool used to install packages. To install a package with dpkg, open a Terminal and type the following:

Note: replace directory with the directory in which the package is stored and package_name with the filename of the package.

It is recommended that you read the dpkg manual page before using dpkg, as improper use may break the package management database. To view the manual page for dpkg, open a Terminal and type man dpkg.

Getting a list of recently installed packages

You can use the dpkg logs to discover recently installed packages; this is handy if you want to roll back some recent installations to a previous system state.

More detailed information on this can be found here.

Automatic updates: Update Manager

Ubuntu will automatically notify you when security updates and software upgrades are available. The Ubuntu Update Manager is a simple and easy to use application that helps users to keep their system software updated. Simply click the update icon (which will appear in the notification area), type in your super-user/administrator password and follow the instructions on-screen to download and install the updates.

Keeping up to date is important, as security fixes which protect your computer from harm are delivered in this way.

Installing packages without an Internet connection

Sometimes, an internet connection is unavailable to install programs.

It is possible to install programs without CDs or DVDs onto offline computers, using a simple USB key for example to transfer only the packages you need.

There are several methods to do this:

Use Keryx

Keryx is a portable, cross-platform package manager for APT-based (Ubuntu, Debian) systems. It provides a graphical interface for gathering updates, packages, and dependencies for offline computers. Keryx is free and open source. You can get Keryx here: https://launchpad.net/keryx

Use the Synaptic package download script

Short instructions:

  • Launch Synaptic on the offline computer
  • Mark the packages you wish to install

Select File->Generate package download script

  • Save the script to your USB key
  • Take the USB key to an online Linux computer and run the script there from the USB key. It will download only the packages required by the offline computer to the USB key.
  • Insert the USB key into the offline computer

    Launch Synaptic and click on File->Add downloaded packages

  • Select the directory on your USB key containing the downloaded *.deb files and press Open. The packages will be installed.
  • Note: If you don’t have access to a PC with GNU/Linux or emulating/virtualizing GNU/Linux (Cygwin, VMware, VirtualBox, Qemu, etc), just open the script with a text editor and enter all the URLs you see in your browser to download the corresponding packages.

    If you have all the necessary libraries and/or dependencies, the simplest way is of course to just download the .deb package you need, just as you would with a Windows installer, and double-click the package to install it with GDebi.

    Use Offline apt-get update

    If you can’t even select the packages on your offline PC because you can’t add the repository / update the package info, try this: AptGet/Offline/Repository

    Basically, it consists in creating your own local repository, except that it won’t contain the packages themselves, only the dependency information.

    The problem is that when you generate the package download list using this method, it will try to get the packages from your local repository and obviously fail.

    The solution is to post-process the script by replacing the URLs with the correct one.

    Assuming you created the local repository at «/home/username/repository» and got the different files from «http://archive.ubuntu.com/ubuntu/», this can easily be done with the following command:

    or directly without creating a second script:

    or simply with any text editor featuring search&replace.

    Use apt-offline

    apt-offline allows you to easily upgrade or install new packages on your offline PC, by using another online PC.

    Источник

    Читайте также:  Что такое internet explorer 10 для windows
    Оцените статью

    Ubuntu package linux source

    Содержание
    1. Ubuntu package linux source
    2. Точные совпадения
    3. Пакет linux-source
    4. Другие совпадения
    5. Пакет linux-source-4.15.0
    6. Пакет linux-source-4.18.0
    7. Пакет linux-source-5.0.0
    8. Пакет linux-source-5.11.0
    9. Пакет linux-source-5.13.0
    10. Пакет linux-source-5.3.0
    11. Пакет linux-source-5.4.0
    12. Пакет linux-source-5.7.0
    13. Пакет linux-source-5.8.0
    14. How to get source code of package using the apt command on Debian or Ubuntu
    15. How to get source code of package using the apt-get/apt command
    16. Step 1 – Enable source code repo
    17. Step 2 – Update index
    18. Step 3 – Download Ubuntu package’s source code
    19. Step 4 – Understanding downloaded source code files
    20. How to download Debian package’s source code
    21. Conclusion
    22. Ubuntu Documentation
    23. Introduction
    24. Packages and Package Management
    25. What is a package?
    26. Source or Binary?
    27. Package Dependencies
    28. Package Managers
    29. Software Channels/Repositories
    30. Installing a Package
    31. Via your web browser
    32. Via a basic graphical method
    33. for Ubuntu: «Sofware Centre «
    34. for Kubuntu : «Add/Remove Programs»
    35. Via an advanced graphical method
    36. for Ubuntu/Xubuntu/Edubuntu : Synaptic
    37. Via a Text Based Methods
    38. Aptitude — the text-based method
    39. apt-get — the technical method
    40. Installing downloaded packages
    41. Using GDebi to install packages
    42. Using dpkg to install packages
    43. Getting a list of recently installed packages
    44. Automatic updates: Update Manager
    45. Installing packages without an Internet connection
    46. Use Keryx
    47. Use the Synaptic package download script
    48. Use Offline apt-get update
    49. Use apt-offline

    Ubuntu package linux source

    Вы искали пакеты, в именах которых есть linux-source. Были просмотрены все комплекты, все секции и все архитектуры. Количество подходящих пакетов: 10.

    Точные совпадения

    Пакет linux-source

    • bionic (18.04LTS) (devel): Linux kernel source with Ubuntu patches
      4.15.0.159.148 [ security]: all
      также предоставляется: linux-source-4.15.0, linux-source-4.18.0, linux-source-5.0.0, linux-source-5.3.0
    • bionic-updates (devel): Linux kernel source with Ubuntu patches
      4.15.0.159.148: all
      также предоставляется: linux-source-4.15.0, linux-source-4.18.0, linux-source-5.0.0, linux-source-5.3.0
    • focal (20.04LTS) (devel): Linux kernel source with Ubuntu patches
      5.4.0.88.92 [ security]: all
      также предоставляется: linux-gkeop-source-5.4.0, linux-hwe-5.11-source-5.11.0, linux-hwe-5.8-source-5.8.0, linux-source-5.4.0
    • focal-updates (devel): Linux kernel source with Ubuntu patches
      5.4.0.88.92: all
      также предоставляется: linux-gkeop-source-5.4.0, linux-hwe-5.11-source-5.11.0, linux-hwe-5.8-source-5.8.0, linux-source-5.4.0
    • groovy (20.10) (devel): Linux kernel source with Ubuntu patches
      5.8.0.63.69 [ security]: all
      также предоставляется: linux-source-5.7.0, linux-source-5.8.0
    • groovy-updates (devel): Linux kernel source with Ubuntu patches
      5.8.0.63.69: all
      также предоставляется: linux-source-5.8.0
    • hirsute (21.04) (devel): Linux kernel source with Ubuntu patches
      5.11.0.37.39 [ security]: all
      также предоставляется: linux-source-5.11.0
    • hirsute-updates (devel): Linux kernel source with Ubuntu patches
      5.11.0.37.39: all
      также предоставляется: linux-source-5.11.0
    • impish (devel): Linux kernel source with Ubuntu patches
      5.13.0.16.27: all
      также предоставляется: linux-source-5.13.0

    Другие совпадения

    Пакет linux-source-4.15.0

    • bionic (18.04LTS) (devel): Linux kernel source for version 4.15.0 with Ubuntu patches
      4.15.0-159.167 [ security]: all
    • bionic-updates (devel): Linux kernel source for version 4.15.0 with Ubuntu patches
      4.15.0-159.167: all

    Пакет linux-source-4.18.0

    • bionic (18.04LTS) (devel): Linux kernel source for version 4.18.0 with Ubuntu patches
      4.18.0-25.26

    18.04.1 [ security]: all
    bionic-updates (devel): Linux kernel source for version 4.18.0 with Ubuntu patches
    4.18.0-25.26

    Пакет linux-source-5.0.0

    • bionic (18.04LTS) (devel): Linux kernel source for version 5.0.0 with Ubuntu patches
      5.0.0-65.71 [ security]: all
    • bionic-updates (devel): Linux kernel source for version 5.0.0 with Ubuntu patches
      5.0.0-65.71: all

    Пакет linux-source-5.11.0

    • hirsute (21.04) (devel): Linux kernel source for version 5.11.0 with Ubuntu patches
      5.11.0-37.41 [ security]: all
    • hirsute-updates (devel): Linux kernel source for version 5.11.0 with Ubuntu patches
      5.11.0-37.41: all

    Пакет linux-source-5.13.0

    • impish (devel): Linux kernel source for version 5.13.0 with Ubuntu patches
      5.13.0-16.16: all

    Пакет linux-source-5.3.0

    • bionic (18.04LTS) (devel): Linux kernel source for version 5.3.0 with Ubuntu patches
      5.3.0-76.72 [ security]: all
    • bionic-updates (devel): Linux kernel source for version 5.3.0 with Ubuntu patches
      5.3.0-76.72: all

    Пакет linux-source-5.4.0

    • focal (20.04LTS) (devel): Linux kernel source for version 5.4.0 with Ubuntu patches
      5.4.0-88.99 [ security]: all
    • focal-updates (devel): Linux kernel source for version 5.4.0 with Ubuntu patches
      5.4.0-88.99: all

    Пакет linux-source-5.7.0

    • groovy (20.10) (devel): Linux kernel source for version 5.7.0 with Ubuntu patches [ universe]
      5.7.0-15.16: all

    Пакет linux-source-5.8.0

    • groovy (20.10) (devel): Linux kernel source for version 5.8.0 with Ubuntu patches
      5.8.0-63.71 [ security]: all
    • groovy-updates (devel): Linux kernel source for version 5.8.0 with Ubuntu patches
      5.8.0-63.71: all

    This page is also available in the following languages:

    Авторские права © 2021 Canonical Ltd.; См. условия лицензии. Ubuntu это торговый знак компании Canonical Ltd. Об этом сайте.

    Источник

    How to get source code of package using the apt command on Debian or Ubuntu

    Tutorial requirements
    Requirements Ubuntu or Debian Linux
    Root privileges Yes
    Difficulty Easy
    Est. reading time 5m

    Table of contents

    How to get source code of package using the apt-get/apt command

    The procedure to download source code is as follows for Ubuntu Linux.

    Please note that apt-get does support third-party closed-source applications. You can only download the source code of open-source software.

    Step 1 – Enable source code repo

    Sources are normally not installed. Hence, you can only install them if you know the package name and when you enable them. Therefore, edit the /etc/apt/sources.list file, run:
    $ sudo vi /etc/apt/sources.list
    Make sure the deb-src type references an Ubuntu distribution’s source code as follows:
    # Sources specification for the Ubuntu 20.04 LTS distro #
    deb-src http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
    deb-src http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
    deb-src http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse
    Where,

    1. deb-src : Indicate that you need source code for .DEB files.
    2. http://archive.ubuntu.com/ubuntu : URL to fetch index and .deb files source code.
    3. focal : Ubuntu Linux 20.04 LTS code name
    4. main restricted universe multiverse : State component name for repo such as main, restricted, universe, and multiverse

    Step 2 – Update index

    Run the following command to resynchronize the package index files from their sources as defined by the deb-src keyword in /etc/apt/sources.list for Ubuntu Linux
    $ sudo apt-get update
    # OR #
    $ sudo apt update

    Step 3 – Download Ubuntu package’s source code

    Let us download source code for bash shell, run:
    $ sudo apt-get source $ sudo apt-get source bash

    You may see the following error if you forgot to set up deb-src as explained in step # 1:

    E: You must put some ‘source’ URIs in your sources.list

    Step 4 – Understanding downloaded source code files

    Let us run the ls command to see source code:
    $ ls -l

    By default, the source code is extracted into bash-5.0 directory:
    $ cd bash-5.0
    $ ls
    The upstream bash source tarball with .tar.xz ending is stored in bash_5.0.orig.tar.xz file. A description file with .dsc ending contains the name of the package, both, in its filename as well as content (after the Source: keyword). A tarball, with any changes made to upstream source, plus all the files created for the Debian package stored in bash_5.0-6ubuntu1.1.debian.tar.xz file. If the —download-only option passed to the apt-get command, then the source package will not be unpacked:
    $ sudo apt-get —download-only source source bash
    When downloaded, we can extract the source files for bash as follows:
    $ dpkg-source -x /path/to/pkg.dsc
    $ dpkg-source -x bash_5.0-6ubuntu1.1.dsc
    It is also possible to build packages:
    $ sudo apt-get —build source $ sudo apt-get —build source bash
    Another option is to make changes in debian/rules files
    $ vi bash-5.0/debian/rules
    Next we can build out custom bash package as follows:
    $ export EDITOR=vim
    $ dch -n
    Make sure we satisfy the build dependencies for a source package and to avoid errors install those libs and tools:
    $ sudo apt-get -y build-dep bash
    Finally, build a Debian package:
    $ debuild
    Verify new packages:
    $ cd ..
    $ ls *.deb
    Install them:
    $ sudo dpkg -i bash_*.deb

    • No ads and tracking
    • In-depth guides for developers and sysadmins at Opensourceflare✨
    • Join my Patreon to support independent content creators and start reading latest guides:
      • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
      • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
      • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
      • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
      • How to protect Linux against rogue USB devices using USBGuard

    Join Patreon

    How to download Debian package’s source code

    The procedure is the same as Ubuntu distro but URL syntax changes as follows:
    $ sudo vi /etc/apt/sources.list
    Edit/update as follows:
    # source repo for Debian 10 buster #
    deb-src deb http://deb.debian.org/debian buster main
    Save and close the file in vim, and then run the following command:
    $ sudo apt-get update
    Let us download source code for the Apache web server:
    $ apt-get source apache2

    Conclusion

    We explained how to enable Ubuntu/Debian source repo and download source code for the package by name. The apt-get source command is useful when you want to study packaging or a specific Debian package. Also useful to know which compile-time options enabled for a particular package. And finally, we can rebuild packages to add or remove components. See Debian guide wiki page for more information and read the following man pages by typing the man command:
    $ man apt
    $ man apt-get
    $ man 5 sources.list
    $ man debuild
    $ man dch

    🐧 Get the latest tutorials on Linux, Open Source & DevOps via

    Источник

    Ubuntu Documentation

    Introduction

    Note: The Main page is available in multiple languages.

    Installing software in Ubuntu is easy, and this guide will show you how to do it.

    By default, many useful programs are already installed when you put Ubuntu onto your computer. However, you may need a particular piece of software that serves a purpose not served by the default applications. You might just want to try an alternative program to one which is already installed. In other words, you need new software.

    If you’d like to get some background information on what’s happening when you install software (which can sometimes be technical), read Packages and Package Management. If you just want to get started installing new programs, you can skip straight to Installing a Package.

    Packages and Package Management

    This section covers the basic concepts of packages and package management. You will learn about what a package is, the differences between different types of package and also how package management works on Ubuntu.

    What is a package?

    Software is a very broad term, and is generally taken to mean a program which you can run on your computer. However, such programs often need other resources to work. When you install software, thousands of files may be required just to let the program start! When you think that they all have to be put in exactly the right location, and some of those files may need to be changed depending on what type of computer you have, it can all get very complicated. Luckily, Ubuntu can look after this complexity.

    Ubuntu uses packages to store everything that a particular program needs to run. A ‘package’, then, is essentially a collection of files bundled into a single file, which can be handled much more easily. In addition to the files required for the program to run, there will be special files called installation scripts, which copy the files to where they are needed (amongst other things).

    Source or Binary?

    Normally, when someone makes a package for a program, they put all of the source code for the program into that package. Source code is written by programmers and is essentially a list of instructions to a computer which humans are able to read and write. Computers can only understand this code if it is interpreted for them into a form that they can use directly. One such way of interpreting source code for a computer is by translating or compiling it into binary, which computers can understand.

    So why don’t the people who make the package (called packagers) just convert it into binary from the start? Well, different computers use different types of binary, so if you make a binary package for one type (like an Intel PC), it won’t work on another (like a PowerPC).

    Source packages are simply packages which just include source code, and can generally be used on any type of machine if the code is compiled in the right way. (For information on how to compile and install source packages, see CompilingEasyHowTo).
    Binary packages are ones which have been made specifically for one type of computer, or architecture. Ubuntu supports the x86 (i386 or i686), AMD64 and PPC architectures. The correct binary packages will be used automatically, so you don’t have to worry about picking the right ones. To find out which one you are using, open ApplicationsAccessoriesTerminal, type uname -m then hit the enter key.

    Package Dependencies

    Programs often use some of the same files as each other. Rather than putting these files into each package, a separate package can be installed to provide them for all of the programs that need them. So, to install a program which needs one of these files, the package containing those files must also be installed. When a package depends on another in this way, it is known as a package dependency. By specifying dependencies, packages can be made smaller and simpler, and duplicates of files and programs are mostly removed.

    When you install a program, its dependencies must be installed at the same time. Usually, most of the required dependencies will already be installed, but a few extras may be needed, too. So, when you install a package, don’t be surprised if several other packages are installed too — these are just dependencies which are needed for your chosen package to function properly.


    An example of dependencies

    Package Managers

    A package manager is an application which handles the downloading and installation of packages. Ubuntu includes a few package managers by default, and which one you use depends on how advanced the package management tasks are that you want to achieve. Most people will only need to use the most basic package manager, the Add/Remove tool, which is very easy to use.

    Software Channels/Repositories

    Where can you get packages from?

    Ubuntu stores all of its packages in locations called software channels or repositories. A software channel is simply a location which holds packages of similar types, which can be downloaded and installed using a package manager. A package manager will store an index of all of the packages available from a software channel. Sometimes it will ‘re-build’ this index to make sure that it is up to date and knows which packages have been upgraded or added into the channel since it last checked.

    There are four Ubuntu software channels for each architecture — Main, Restricted, Universe and Multiverse. Each has a different purpose. By default, only packages from Main and Restricted can be installed. If you would like to install packages from Universe or Multiverse, see the Repositories page for instructions on how to do this.

    In addition to the official Ubuntu repositories, it is possible to use third party repositories. Be careful, though — some are not compatible with Ubuntu and using them may cause programs to stop working or may even cause serious damage to your installation. The page http://www.ubuntulinux.nl/source-o-matic (page removed — why) can help you to find extra repositories, and the Repositories page gives instructions on how to enable them.

    Installing a Package

    This section explains how to install packages using the various tools available in Ubuntu,Xubuntu,Edubuntu and Kubuntu.

    Via your web browser

    In the Ubuntu Documentation, you will sometimes find sentences like for example:

    » To install this software in Ubuntu, install the following package: supertux. «

    Click on the name of the package («supertux» in the example):

      if the apturl protocol is enabled on your computer, you will be proposed to install the package called «supertux».

    if not, please follow instructions of the AptURL page to enable apturl protocol on your computer.

    Via a basic graphical method

    Note that some packages can’t be installed via this method, in this case please use another method.

    for Ubuntu: «Sofware Centre «

    In recent versions of Ubuntu, the «Add/Remove» option in the Applications menu has been replaced by the Ubuntu Software Center.

    for Kubuntu : «Add/Remove Programs»

    Kubuntu’s new and easy method of installing packages is to use the ‘Add/Remove Programs’ tool. Click K-MenuAdd/Remove Programs to start it.

    Add/Remove Programs is a simple graphical way of installing and removing applications in Kubuntu. To launch Add/Remove Programs, choose K MenuAdd/Remove Programs from the desktop menu system.

    To install new applications select the category on the left, then check the box of the application you want to install. When finished click Apply, then your chosen programs will be downloaded and installed automatically, as well as installing any additional applications that are required. The default selection is restricted to KDE suite, but GNOME applications can be installed simply by selecting from dropdown menu at the top. Alternatively, if you know the name of the program you want, use the Search tool at the top.

    Software from additional repositories may be installed by enabling the Show: Unsupported and Show: proprietary software checkboxes if they are enabled in your repository list. For more information, see the Repositories page.

    Once this has finished, click Close.Your new programs are installed, ready to use!

    Via an advanced graphical method

    for Ubuntu/Xubuntu/Edubuntu : Synaptic

    The Synaptic Package Manager offers a more advanced way of installing packages. If you have problems finding a suitable package with the Add/Remove tool, try using the search in Synaptic. This searches all of the packages in the available repositories, even the ones which don’t contain programs.

    For details on using Synaptic, see SynapticHowto.

    Via a Text Based Methods

    Text based methods can be used across Ubuntu, Kubuntu and Xubuntu, but require familiarity with the terminal. When helping users to install packages, you should consider using an AptURL instead of apt-get or aptitude.

    Aptitude — the text-based method

    Aptitude is a text-based package manager, which must be run from a Terminal. Read the AptitudeSurvivalGuide for more information on how to use Aptitude.

    apt-get — the technical method

    The apt-get program is a command-line package manager, which should be used if the Add/Remove tool and Synaptic ever run into problems. It provides an advanced interface to APT, the underlying package management system which Ubuntu uses, but is reasonably easy to operate. Power users may find that apt-get is quicker to use and more powerful than the graphical options above.

    For details on how to use apt-get, read AptGet/Howto.

    Installing downloaded packages

    You may wish to install a package you have downloaded from a website, rather than from a software repository. These packages are called .deb files. Because they may have been created for a different Linux distribution, you might find that there’s dependency issues with Ubuntu, meaning that they may be uninstallable.

    To find a package which you have previously downloaded using Synaptic, aptitude or apt-get, look in /var/cache/apt/archives

    Using GDebi to install packages

    GDebi is a simple tool to install .deb files. It has a graphical user interface but can also be used in your terminal. It lets you install local deb packages resolving and installing its dependencies.. It automatically checks packages for their dependencies and will try to download them from the Ubuntu software repositories if possible. You may first need to install GDebi — simply install the gdebi package using one of the package managers listed above, or open a Terminal and type sudo apt-get install gdebi.

    Once you have installed GDebi, use the File Browser to find the package you wish to install. Package files will look similar to this:

    Double-click the package to open it with GDebi. If all dependencies have been met for the selected package, simply click the ‘Install package’ button to install it. GDebi will warn you if there are unmet dependencies, which means that there’s dependencies that aren’t resolved in the repositories that you’re using.

    Using dpkg to install packages

    dpkg is a command-line tool used to install packages. To install a package with dpkg, open a Terminal and type the following:

    Note: replace directory with the directory in which the package is stored and package_name with the filename of the package.

    It is recommended that you read the dpkg manual page before using dpkg, as improper use may break the package management database. To view the manual page for dpkg, open a Terminal and type man dpkg.

    Getting a list of recently installed packages

    You can use the dpkg logs to discover recently installed packages; this is handy if you want to roll back some recent installations to a previous system state.

    More detailed information on this can be found here.

    Automatic updates: Update Manager

    Ubuntu will automatically notify you when security updates and software upgrades are available. The Ubuntu Update Manager is a simple and easy to use application that helps users to keep their system software updated. Simply click the update icon (which will appear in the notification area), type in your super-user/administrator password and follow the instructions on-screen to download and install the updates.

    Keeping up to date is important, as security fixes which protect your computer from harm are delivered in this way.

    Installing packages without an Internet connection

    Sometimes, an internet connection is unavailable to install programs.

    It is possible to install programs without CDs or DVDs onto offline computers, using a simple USB key for example to transfer only the packages you need.

    There are several methods to do this:

    Use Keryx

    Keryx is a portable, cross-platform package manager for APT-based (Ubuntu, Debian) systems. It provides a graphical interface for gathering updates, packages, and dependencies for offline computers. Keryx is free and open source. You can get Keryx here: https://launchpad.net/keryx

    Use the Synaptic package download script

    Short instructions:

    • Launch Synaptic on the offline computer
    • Mark the packages you wish to install

    Select File->Generate package download script

  • Save the script to your USB key
  • Take the USB key to an online Linux computer and run the script there from the USB key. It will download only the packages required by the offline computer to the USB key.
  • Insert the USB key into the offline computer

    Launch Synaptic and click on File->Add downloaded packages

  • Select the directory on your USB key containing the downloaded *.deb files and press Open. The packages will be installed.
  • Note: If you don’t have access to a PC with GNU/Linux or emulating/virtualizing GNU/Linux (Cygwin, VMware, VirtualBox, Qemu, etc), just open the script with a text editor and enter all the URLs you see in your browser to download the corresponding packages.

    If you have all the necessary libraries and/or dependencies, the simplest way is of course to just download the .deb package you need, just as you would with a Windows installer, and double-click the package to install it with GDebi.

    Use Offline apt-get update

    If you can’t even select the packages on your offline PC because you can’t add the repository / update the package info, try this: AptGet/Offline/Repository

    Basically, it consists in creating your own local repository, except that it won’t contain the packages themselves, only the dependency information.

    The problem is that when you generate the package download list using this method, it will try to get the packages from your local repository and obviously fail.

    The solution is to post-process the script by replacing the URLs with the correct one.

    Assuming you created the local repository at «/home/username/repository» and got the different files from «http://archive.ubuntu.com/ubuntu/», this can easily be done with the following command:

    or directly without creating a second script:

    or simply with any text editor featuring search&replace.

    Use apt-offline

    apt-offline allows you to easily upgrade or install new packages on your offline PC, by using another online PC.

    Источник

    Читайте также:  Windows 10 сменить пароль пользователя при входе
    Оцените статью
    Tutorial requirements
    Requirements Ubuntu or Debian Linux
    Root privileges Yes
    Difficulty Easy
    Est. reading time 5m