What is the best way to explore Linux source code?
-
Sometimes while I'm using a built-in Linux program I get curious about what the source code looks like. What is the best way to go about exploring it? I'm running Ubuntu 10.10.
-
Answer:
Once you've downloaded the source code, one way or another, I highly recommend using cscope or something like it instead of just a plain text editor. That will allow you to skip up and down call chains quickly, and understand how the pieces relate to one another. Start with something simple and reasonably self-contained, such as a software-only driver or higher-level networking, before you try to understand some of the more complex and interconnected bits (e.g. scheduler, mm, VFS). It also wouldn't hurt to read one of the books about the Linux kernel, such as Robert Love's _Linux Kernel Development_. Come to think of it, I've seen him hanging around here, so maybe he'll chime in.
Jeff Darcy at Quora Visit the source
Other answers
If you want to explore the source code of the Linux kernel, go to http://kernel.org, and download the latest stable version archive. Example : wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.1.4.tar.bz2 tar -xjf linux-3.1.4.tar.bz2 cd linux-3.1.4/
Baptiste Fontaine
$ cd <src-directory> $ cscope -bqR $ cscope -dp4
Doug Doan
If you have not tried http://lxr.linux.no/ try it. Entities are linked and easy to locate its definition, reference, etc. I found it really helpful to explore the code while still not get lost too fast...
Jim Xu
If your are looking for a kind of : "Linux kernel for newbies", this link is probably for you : http://kernelnewbies.org.
Christ Azika-Eros
apt-get source PACKAGENAME will give you the source of the package you are looking for.
Jonathan Jesse
I'd like suggest Robert Love's book -- Linux Kernel Development. It focus not only on code implementation but also some theoretical stuffs. I am currently reading it and I feel good.
Jianing Yang
Related Q & A:
- What is the best way to distribute an audio/video feed from a computer to TVs over existing indoor coax cable?Best solution by Audio-Video Production
- What is the best way to clean LEGO bricks?Best solution by bricks.stackexchange.com
- What is the best way to make UI for an Isometric game in Java?Best solution by Game Development
- What is the best way to calculate a date difference?Best solution by Stack Overflow
- What is the best way to count lines in file?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.