LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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



Reply
 
Search this Thread
Old 03-18-2005, 11:31 AM   #1
matthewa
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1
Posts: 123

Rep: Reputation: 15
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
 
Old 03-18-2005, 11:35 AM   #2
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 58
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.
 
Old 03-18-2005, 11:39 AM   #3
Baltasar
Member
 
Registered: Jan 2004
Distribution: Fedora & Debian
Posts: 43

Rep: Reputation: 15
if you are searching for the linux kernel source then you should have a look at http://www.kernel.org
 
Old 03-18-2005, 12:12 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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
 
Old 03-18-2005, 01:29 PM   #5
matthewa
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1
Posts: 123

Original Poster
Rep: Reputation: 15
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 03:43 PM.
 
Old 03-20-2005, 01:27 PM   #6
bru
Member
 
Registered: Sep 2003
Location: South Carolina
Distribution: Ubuntu, CentOS, BT4, Debian
Posts: 132

Rep: Reputation: 15
just uncompress the files, if needed, fire up your favorite text editor and go for it.
 
Old 03-20-2005, 01:35 PM   #7
alred
Member
 
Registered: Mar 2005
Location: singapore
Distribution: puppy and Ubuntu and ... erh ... redhat(sort of) :( ... + the venerable bsd and solaris ^_^
Posts: 658
Blog Entries: 8

Rep: Reputation: 31
how to uncompress those rpms
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
small syntax problem with C code (implemented in Code Composer Studio) illiniguy3043 Programming 6 01-07-2008 03:14 AM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 02:37 AM
Editing buttons (quote, code etc.) add the code to the end vharishankar LQ Suggestions & Feedback 2 09-13-2004 10:32 AM
Diffrerence between position independent code and Relocatable code? eshwar_ind Programming 7 05-11-2004 02:40 AM
Open Firmware code for booting OS from SATA : sample code available somewhere ? drsparikh Linux - Hardware 0 03-12-2004 12:16 PM


All times are GMT -5. The time now is 11:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration