Linux - NewbieThis 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!
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is the kernel itself an executable file? I mean, you can compile it with gcc, so whats the diffrence between a kernel file and a normal C compiled program?
The kernel is, technically, an executable file. Notably, though, it contains no external links (to libc or otherwise) and uses no system calls (since it provides it itself). User-mode-linux is a good example of how it is just an executable.
kernel is compressed file containing compiled code .
this code is the kernel souce file and we can set the options to compile the kernel accordnig to our needs
I understand that, but I dont get how you can use gcc to create an operating system file. can every C compiler create a file that can operate a computer directly? I always thought that compilers create excutable files that can be used BY an operating system and not AS an operating system...
the kernel is not the whole operating the operating systen
the operating systen has proper structure to work with
now the work that it does like(it requires all the libraries and the config files to work)
read.write and the support of hardware etc is there in the kernel
thanks, I think I'm starting to get it now... I looked in all the source around but couldn't find where it all starts. Is there a main() function that is the first to run? I couldn't find anything like that in init/main.c (which I understand is the first file to be compiled). I want my computer, just for fun, to print a welcome messege when linux starts, I was thinking about these lines:
printk("Welcome to my Linux\n");
for (i=0; i<10000000; i++) ;
whats is a good function to put these line in so I would see this messege as the first thing printed out?
AFAIK, usual executable file has sections: .data , .code and so on. These sections are read by OS. But what format should OS kernel be? (There is no OS to boot it :-\)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.