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).
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.
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.
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.
You can find that on GNU's Savannah. For example here's coreutils.
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).
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
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.
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.