3

Where can I find the source code for Linux utilities and daemons. Basically I want to know the repository of source codes other than the Linux kernel.

6 Answers 6

8

You can find that on GNU's Savannah. For example here's coreutils.

1

I suspect it's not going to do you much good if you don't understand the difference between utilities, daemons and the kernel.

The answer is the internet.

There is no single repository containing all of the source code for every distribution of Linux.

The official releases of the kernel are available from http://www.kernel.org/

Al linux distributions are required by the terms of licencing terms of most of their software to publish the source code (including any modifications) - this functionality is usually available from the package manager - but you didn't say which distribution you are using.

0

Each distribution likely has "source" packages which include any changes they've mde to the various utilities -- you can download and install these on your system to read through the source and/or change & recompile it to your heart's content.

You may also want to consider looking at the source trees for the BSD operating systems (these can be downloaded from each project, as well as various web interfaces for perusing the code & history of changes, for example The FreeBSD project's CVSWeb).

0

I would suggest freebsd's source code and ports tree, but you have asked about linux.

Last time I have use it, a while ago, I could recompile anytime any of the userland applications like: ps, df, ls, netstat, sockstat, sendmail, etc. In freebsd I could donwload from portstree the source code, modify it, build and install. Also, it was easy for me to include custom patches.

This is one feature I miss in linux. It was so easy and fast to recompile the kernel, or just the whole OS, any application or service. Of course, this feature exists in linux also, but is not that automated as in freebsd.

This is just how i feel it and I might be wrong. I don;t want to start a linux/bsd war here.

HTH

3
  • -1 The question is about how to do something for a Linux system, not comparing how to do it with FreeBSD. This answer is not applicable.
    – daveadams
    Feb 18, 2011 at 14:05
  • But then the correct answer should be: it's not linux source code, it's GNU source code. Linux is only a kernel :-)
    – DutchUncle
    Feb 18, 2011 at 19:04
  • Look, it was so easy to me to modify things in the source code. I thought it will help mentioning my experience.
    – Paul
    Feb 19, 2011 at 5:25
0

In addition to Savannah as pointed out by @Dennis, each distribution typically has its own method of providing source code for various binary packages. For example, in Debian or Ubuntu, you can use apt-get source packagename, which will download the source code for the package you specify to the working directory.

0

To add to @dennis-williamson's answer, when looking for the source code to the Linux login daemon, Google sent me here:

https://github.com/util-linux/util-linux

Wikipedia gives a little more info: https://en.wikipedia.org/wiki/Util-linux

The coreutils project on GNU Savannah is the regular GNU command line utilities. Both are important parts of the Linux OS.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .