I am doing some changes on ubuntu linux source code. I used
find / -name user.c command to locate
user.c but failed. Where is it? My working environment is ubuntu14.04.
You didn't install the kernel source code, only kernel headers (usually ending in
.h), which declare kernel interfaces exposed to user space.
You can get the kernel source code files (including those ending in
by installing linux-source with
apt-get source linux-image-$(uname -r)
or by downloading the code repository (either through Git or with a click on the “snapshot“ link behind the newest revision in the shortlog).
If you choose to install the If you download them manually, they'll be wherever you chose to clone/extract them.
linux-source package, the source code files will reside below
For more information on how to compile your own kernel on Ubuntu refer too the Ubuntu Wiki. To make it very short, it basically comes down to
fakeroot debian/rules binary-headers binary-generic
though I prefer the more versatile
make-kpkg --rootcmd fakeroot --initrd --jobs $(getconf _NPROCESSORS_ONLN) kernel-image kernel-headers
Edit: The stroked out text passages work as intended but aren't as useful if you aim to modify the kernel source and build your own kernel.