Linux ubuntu source code

Where is Ubuntu source code? [duplicate]

How do I get the source code of the Ubuntu operating system? How do I run the modified code? What programming languages ​​can be used to modify the code?

2 Answers 2

The source code for ubuntu is divided up by package — from a running ubuntu system you can easily retreive the source for any package by doing:

apt-get source (package name) 

Otherwise, go to launchpad, and search up the package in question. For example, here’s the download page for the source code for a specific version of curl:

https://launchpad.net/ubuntu/+source/curl/7.21.2-4ubuntu1

That said, it’s a lot easier if you’re on a Linux system already — the package sources are divided into an original source tarball plus ubuntu patches, so if you don’t use apt-get source , you’ll need to manually apply the patch to the source code. And new-style packages are even divided into multiple packages.

What’s more, the packages are generally not designed to be cross-compiled from a non-Linux system. Even if you download them and open them in VS, you won’t be able to build them from a Windows system.

Finally, note that not everything is in C and C++ — there are packages in just about any language you can imagine. But I suppose most of them could be opened in VS as text files 🙂

Note: If you really, really want all of it, and I can’t stress enough how silly it would be to download everything just to start learning about the system, you can use the debmirror tool, available in ubuntu, to do this:

debmirror -a none \ --source \ -s main \ -d lucid,lucid-security,lucid-updates \ -r /ubuntu \ --progress \ -e http \ -h archive.ubuntu.com \ ## or other ubuntu archive mirror destpath 

This will be an absolutely huge download. Have several tens of GBs of space available. Note that this downloads only core packages — replace -s main with -s main,universe,multiverse,restricted to get everything.

Once you have the package files, you can extract the source by running dpkg-source -x on a .dsc file of interest.

Источник

Linux ubuntu source code

Ubuntu

Other repositories

Name Last Modified
lp:~lxle/ubuntu/+source/seamonkey/+git/trunk 34 minutes ago
lp:~libreoffice/ubuntu/+source/libreoffice 2 hours ago
lp:ubuntu/+source/magics++ 2 hours ago
lp:ubuntu/+source/wine 3 hours ago
lp:ubuntu/+source/ferret-vis 3 hours ago
lp:ubuntu/+source/toil 3 hours ago
lp:ubuntu/+source/python-biopython 3 hours ago
lp:ubuntu/+source/pcre-ocaml 3 hours ago
lp:ubuntu/+source/ocaml-shine 3 hours ago
lp:ubuntu/+source/wacomtablet 3 hours ago
lp:ubuntu/+source/ocaml-speex 3 hours ago
lp:ubuntu/+source/ocaml-samplerate 3 hours ago
lp:ubuntu/+source/ocaml-mad 3 hours ago
lp:ubuntu/+source/indi 3 hours ago
lp:ubuntu/+source/ocaml-domain-name 3 hours ago
lp:ubuntu/+source/ocaml-config-file 3 hours ago
lp:ubuntu/+source/ocaml-lame 3 hours ago
lp:ubuntu/+source/instaloader 3 hours ago
lp:ubuntu/+source/ocaml-mew-vi 3 hours ago
lp:ubuntu/+source/ocaml-graphics 3 hours ago
lp:ubuntu/+source/ocaml-gen 3 hours ago
lp:ubuntu/+source/libwfa2 3 hours ago
lp:ubuntu/+source/ocaml-result 3 hours ago
lp:ubuntu/+source/ocaml-ladspa 3 hours ago
lp:ubuntu/+source/ocaml-parany 3 hours ago
lp:ubuntu/+source/ocaml-bigarray-compat 3 hours ago
lp:ubuntu/+source/js-of-ocaml-ocamlbuild 3 hours ago
lp:ubuntu/+source/systemd 3 hours ago
lp:ubuntu/+source/donfig 3 hours ago
lp:ubuntu/+source/dose3 3 hours ago
lp:ubuntu/+source/biniou 3 hours ago
lp:ubuntu/+source/onetbb 4 hours ago
lp:ubuntu/+source/falkon 5 hours ago
lp:~demmmo/ubuntu/+source/openssl 6 hours ago
lp:~canonical-kernel/ubuntu/+source/linux-signed-uc22-intel-iotg/+git/jammy 7 hours ago
lp:~canonical-kernel/ubuntu/+source/linux-uc22-intel-iotg/+git/jammy 7 hours ago
lp:ubuntu/+source/libraw 7 hours ago
lp:ubuntu/+source/wireshark 8 hours ago
lp:ubuntu/+source/git-annex 8 hours ago
lp:ubuntu/+source/hcloud-python 8 hours ago
lp:ubuntu/+source/golang-github-census-instrumentation-opencensus-proto 8 hours ago
lp:ubuntu/+source/rust-defmt-parser 8 hours ago
lp:ubuntu/+source/cryptominisat 8 hours ago
lp:ubuntu/+source/golang-1.20 9 hours ago
lp:ubuntu/+source/sbcl 9 hours ago
lp:ubuntu/+source/golang-github-opencontainers-specs 9 hours ago
lp:ubuntu/+source/golang-github-containers-storage 9 hours ago
lp:~ubuntu-kernel-test/ubuntu/+source/linux/+git/linus—linux 10 hours ago
lp:ubuntu/+source/linux-gcp-5.19 10 hours ago
lp:ubuntu/+source/linux-signed-gcp-5.19 10 hours ago
lp:ubuntu/+source/linux-restricted-signatures-gcp-5.19 10 hours ago
lp:ubuntu/+source/linux-restricted-modules-gcp-5.19 10 hours ago
lp:ubuntu/+source/linux-meta-gcp-5.19 10 hours ago
lp:~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack 11 hours ago
lp:ubuntu/+source/drbl 12 hours ago
lp:ubuntu/+source/clonezilla 12 hours ago
lp:ubuntu/+source/gap-autodoc 12 hours ago
lp:ubuntu/+source/apache2 12 hours ago
lp:ubuntu/+source/marco 12 hours ago
lp:ubuntu/+source/linux-restricted-modules-media-fixup 13 hours ago
lp:ubuntu/+source/calibre 13 hours ago
lp:ubuntu/+source/cdo 13 hours ago
lp:ubuntu/+source/binutils-avr 13 hours ago
lp:ubuntu/+source/tifffile 13 hours ago
lp:ubuntu/+source/zenity 13 hours ago
lp:ubuntu/+source/openldap 13 hours ago
lp:ubuntu/+source/xkbset 13 hours ago
lp:ubuntu/+source/starpu-contrib 13 hours ago
lp:ubuntu/+source/starpu 13 hours ago
lp:ubuntu/+source/systemtap 13 hours ago
lp:ubuntu/+source/woof-doom 13 hours ago
lp:ubuntu/+source/draco 13 hours ago
lp:ubuntu/+source/tinygltf 13 hours ago
lp:ubuntu/+source/ruby-gitlab-fog-azure-rm 13 hours ago
lp:ubuntu/+source/rust-coreutils 13 hours ago
lp:ubuntu/+source/wasmedge 13 hours ago
lp:ubuntu/+source/prometheus-alertmanager 13 hours ago
lp:ubuntu/+source/ruby-saml 13 hours ago
lp:ubuntu/+source/freeipmi 13 hours ago
lp:ubuntu/+source/opm-common 13 hours ago
lp:ubuntu/+source/rust-netlink-packet-core 13 hours ago
lp:ubuntu/+source/rust-pyo3-log 13 hours ago
lp:ubuntu/+source/bomstrip 13 hours ago
lp:ubuntu/+source/prometheus 13 hours ago
lp:ubuntu/+source/crowdsec 13 hours ago
lp:ubuntu/+source/monty 13 hours ago
lp:ubuntu/+source/groff 13 hours ago
lp:ubuntu/+source/checker-framework-java 13 hours ago
lp:ubuntu/+source/chemeq 13 hours ago
lp:ubuntu/+source/golang-github-digitalocean-go-qemu 13 hours ago
lp:ubuntu/+source/gla11y 13 hours ago
lp:ubuntu/+source/grimripper 13 hours ago
lp:ubuntu/+source/aerc 13 hours ago
lp:ubuntu/+source/vte2.91 14 hours ago
lp:ubuntu/+source/golang-github-hhatto-gorst 15 hours ago
lp:ubuntu/+source/resource-agents 15 hours ago
lp:ubuntu/+source/dwarves 15 hours ago
lp:ubuntu/+source/cmake 15 hours ago
lp:ubuntu/+source/openafs 15 hours ago
lp:ubuntu/+source/binutils 15 hours ago
Читайте также:  Linux work with terminal
1100 of 49750 results First • Previous • Next • Last

Источник

Ubuntu Wiki

The kernel source for the Ubuntu kernel is based very closely on the upstream mainline kernel tree maintained by Linus. The Ubuntu-ness of this kernel is maintained as a git branch against the Linus tree.

Obtaining the source for an Ubuntu release

There are a number of different ways of getting the kernel sources. The two main ways will be documented here.

If you have installed a version of Ubuntu and you want to make changes to the kernel that is installed on your system, use the apt-get method (described below) to obtain the sources.

However, if you wish to get the most up to date sources for the Ubuntu release you are running and make changes to that, use the git method (described below) to obtain the sources.

Obtaining the kernel sources for an Ubuntu release using apt-get

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

Obtaining the kernel sources for an Ubuntu release using git

The source for each release is maintained in its own git repository on Launchpad.

git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source//+git/

git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/cosmic
groovy git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/groovy
focal git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/focal
bionic git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/bionic

Replace your intended OS series in the above, and pull the source for the kernels you need.

The distro kernel is always on the master branch in these repositories. Each release also has a master-next branch containing the commits that will go onto the master branch and become the next release for that release.

A number of releases also have other source packages which represent other related but divergent kernels for other purposes. For example, there is a specialized AWS kernel available in the linux-aws source package. (Previously these sorts of things were done in Topic Branches and some older kernels and projects still use them.)

Читайте также:  Как удалить файл кали линукс

Obtaining a copy

To obtain a local copy you can simply git clone the repository for the release you are interested. The git command is part of the git package.

git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/bionic
git clone git://kernel.ubuntu.com/ubuntu/linux.git git clone --reference linux git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/groovy

In each case you will end up with a new directory ubuntu- containing the source and the full history which can be manipulated using the git command from within each directory.

$ git tag -l Ubuntu-* Ubuntu-5.4.0-47.51 Ubuntu-5.4.0-48.52 Ubuntu-5.4.0-49.53 Ubuntu-5.4.0-51.56 Ubuntu-5.4.0-52.57 $
git checkout -b temp Ubuntu-5.4.0-52.57

You may then manipulate the release - for example, by adding new commits.

Kernel/SourceCode (последним исправлял пользователь 85-210-146-14 2010-06-21 08:20:10)

The material on this wiki is available under a free license, see Copyright / License for details.

Источник

How do I get the Ubuntu source code? [closed]

Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Where can I find the source code for the latest Ubuntu release? Also, how would I view the code? Would it just be lots of .cpp and .h files I could view in Visual Studio?

Thanks, was i right going for the dists subfolder? At this point i was presented with a massive number of sub-folders? Are each of these part of the OS?

3 Answers 3

The source code for ubuntu is divided up by package - from a running ubuntu system you can easily retreive the source for any package by doing:

apt-get source (package name) 

Otherwise, go to launchpad, and search up the package in question. For example, here's the download page for the source code for a specific version of curl: https://launchpad.net/ubuntu/+source/curl/7.21.2-4ubuntu1

Читайте также:  Ubuntu iso to usb on linux

That said, it's a lot easier if you're on a Linux system already - the package sources are divided into an original source tarball plus ubuntu patches, so if you don't use apt-get source , you'll need to manually apply the patch to the source code. And new-style packages are even divided into multiple packages.

What's more, the packages are generally not designed to be cross-compiled from a non-Linux system. Even if you download them and open them in VS, you won't be able to build them from a Windows system.

Finally, note that not everything is in C and C++ - there are packages in just about any language you can imagine. But I suppose most of them could be opened in VS as text files 🙂

Note: If you really, really want all of it, and I can't stress enough how silly it would be to download everything just to start learning about the system, you can use the debmirror tool, available in ubuntu, to do this:

debmirror -a none \ --source \ -s main \ -d lucid,lucid-security,lucid-updates \ -r /ubuntu \ --progress \ -e http \ -h archive.ubuntu.com \ ## or other ubuntu archive mirror destpath 

This will be an absolutely huge download. Have several tens of GBs of space available. Note that this downloads only core packages - replace -s main with -s main,universe,multiverse,restricted to get everything.

Once you have the package files, you can extract the source by running dpkg-source -x on a .dsc file of interest.

Источник

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