Luigi Tiburzi Luigi Tiburzi - 6 months ago 22
Linux Question

Where can I find source code for Linux core commands?

I'd like to read the actual code which the linux commands are written with. I've gained some experience using them and now I think it's time to interact with my machine at a deeper level. I've found some commands here

Unfortunately I wasn't able to find basic commands such as 'ls' which seems to me easy enough to begin.

Do you happen to know some web page, book or any other stuff to begin?

I'm running on Ubuntu 12.04


All these basic commands are part of the coreutils package.

You can find all information you need here:

If you want to download the latest source, you should use git:

git clone git://

To install git on your Ubuntu machine, you should use apt-get (git is not included in the standard Ubuntu installation):

sudo apt-get install git

Truth to be told, here you can find specific source for the ls command:

Only 4984 code lines for a command 'easy enough' as ls... are you still interested in reading it?? Good luck! :D