Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-18-2005, 10:31 AM
|
#1
|
|
Member
Registered: Mar 2005
Distribution: Slackware 10.1
Posts: 123
Rep:
|
I want to learn the code!
Iv'e been a linux user for about two years now and ive learned a little bit about programing...........but I want to learn more.
Specificaly how the linux source code works. But I cant figure out where to get the sources from! Iv'e visited various repositoriesand looked around but I havnt seen any files ending in .src. Is there another extension used for downloading the sources of various distros?
Any information would be helpful. Point me the way of knowledge, please guys.
thanks
|
|
|
|
03-18-2005, 10:35 AM
|
#2
|
|
Senior Member
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246
Rep:
|
Look for files that end in .c or .cpp. Those are C/C++ source code files. There isn't really a "Linux" source code. The Linux kernel is written in C, but there's hundreds of different languages and each have their own source code.
|
|
|
|
03-18-2005, 10:39 AM
|
#3
|
|
Member
Registered: Jan 2004
Distribution: Fedora & Debian
Posts: 43
Rep:
|
if you are searching for the linux kernel source then you should have a look at http://www.kernel.org
|
|
|
|
03-18-2005, 11:12 AM
|
#4
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Many users download and install software from 'tarballs'. These files are archived directories of source code. The extension is usually tar.gz or .tgz. Any project in the sourceforge website will also have source code available. Also, you could install a source package. These are rpm packages that contain the sourcecode. Look for files the end in .src.rpm. This is the standard suffix for source RPM packages.
If you visit the ftp site where you can download your linux distribution, there will be a directory that has nothing but source code. Because the GPL license requires one to release the source code, this is what open source is all about, you won't have any problem locating source code for linux.
One source package you might want to look at is the core-utils package. This contains many ubiquitous programs such as 'echo' and 'cat'. The Unix V7 echo program is only 23 lines long, including the blank lines.
You didn't ask for this, but I would highly recommend the book 'Linux Programming by Example: The Fundamentals' by Arnold Robbins
|
|
|
|
03-18-2005, 12:29 PM
|
#5
|
|
Member
Registered: Mar 2005
Distribution: Slackware 10.1
Posts: 123
Original Poster
Rep:
|
Wow!............Thanks guys........Ill head out to my journey now.
jschiwal, I wanna thank you for such a detailed post. It has helped more than you can imagine.
Ok...........i found some src.rpm files and downloaded then. Now how do I open them to have a look at the code?
Last edited by matthewa; 03-18-2005 at 02:43 PM.
|
|
|
|
03-20-2005, 12:27 PM
|
#6
|
|
Member
Registered: Sep 2003
Location: South Carolina
Distribution: Ubuntu, CentOS, BT4, Debian
Posts: 132
Rep:
|
just uncompress the files, if needed, fire up your favorite text editor and go for it.
|
|
|
|
03-20-2005, 12:35 PM
|
#7
|
|
Member
Registered: Mar 2005
Location: singapore
Distribution: puppy and Ubuntu and ... erh ... redhat(sort of) :( ... + the venerable bsd and solaris ^_^
Posts: 658
Rep:
|
how to uncompress those rpms 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:38 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|