Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-08-2008, 03:27 AM   #1
LQ Newbie
Registered: Dec 2007
Posts: 18

Rep: Reputation: 0
Question source code of linux kernel

Hello frnds

As I am searching for source code of my installed fedora 7

can anyone tell where in the directory structure of my filesystem the source code will be

located ( the .c and .h files)

or should I download the source code from google or provide any other links so that I

can get the source code

prethanks to helper
Old 02-08-2008, 07:13 AM   #2
Registered: Feb 2008
Distribution: Debian Testing, OSX
Posts: 164

Rep: Reputation: 32
I don't know about Fedora specifically, but the kernel source can always be found at
Old 02-08-2008, 01:37 PM   #3
Senior Member
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Fedora does not install the source by default. You can install kernel-devel and kernel-headers via yum. This will only install the most current versions and not necessarily the version of the kernel that you are running.

All of Fedora's source is available via yum (src.rpms). In order to get it you have to turn on the source repo. Edit /etc/yum.repos.d/fedora.repo
this section:

name=Fedora $releasever - Source
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

So that the enabled=0 reads enabled=1 (turn on), and resave. After that you can install(via yum) any of the Fedora source that you want.
Old 02-08-2008, 07:49 PM   #4
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,669
Blog Entries: 4

Rep: Reputation: 3019Reputation: 3019Reputation: 3019Reputation: 3019Reputation: 3019Reputation: 3019Reputation: 3019Reputation: 3019Reputation: 3019Reputation: 3019Reputation: 3019
Use caution when fiddling with source-code on a binary distribution. It's fine to use it for inspection, but be careful when you set out to compile and install your own kernel in such a distro.

The folks who put together those distro images really do work hard for you, "so you don't have to," and they make a lot of tightly-interrelated decisions along the way. If you do not exactly replicate the setup that they used when building your kernel, you could encounter all sorts of rather-baffling problems.

If you know well what you are doing (and I do not mean that insultingly...), you can overcome those problems, but if you encounter them and "you didn't sign-on for this kind of treatment" you can certainly feel ill-used.


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
Linux kernel source code 1.0.0 poster neojia General 1 12-23-2010 12:04 PM
need to download linux source code for 2.6 kernel bishalpoudyal Linux - Software 2 04-13-2006 02:17 PM
How do I install the Linux kernel source code?? thearchitect Linux - Newbie 3 08-13-2005 01:07 AM
source code for the latest linux kernel k1ll3r_x General 5 03-02-2005 11:49 PM
linux kernel source code legolas_t Programming 1 09-17-2004 07:13 AM > Forums > Linux Forums > Linux - Newbie

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

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