Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can someone tell me how to locate the source code for the 'df' command. My operating system is Ocelot.


share|improve this question

First, find out what package the df command comes from. This will turn out to be coreutils.

Then run the command

apt-get source coreutils

to get the source code for the package containing the df command.

share|improve this answer
Props for teaching a man to fish. – Erigami Oct 20 '11 at 3:46
If you give a man a fish, that man now knows where to find fish. 0If you teach a man to fish, you just destroyed your market base. – user72421 Aug 17 '12 at 8:00

df is a part of coreutils package. You can get source either from GNU website or you can get the source package from launchpad

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.