ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I got the impression a while back that using "/usr/src/linux" causes problem and you shouldn't use it as a link. I am only seeing everyone using links to "/usr/src/linux". Has someone changed their mind?
There's nothing actually wrong with having /usr/src/linux be a link to the source tree it just isn't the canonical location anymore (that's /lib/modules/`uname -r`/build). I generally build kernels in /usr/src/linux-`uname -r` with /usr/src/linux being a symlink to the current kernel. It's quicker to type and I know what it means however scripts shouldn't use it as there's no guarantee that it exists or is correct (the /lib/modules path is created by kernel makefiles (make modules_install I think) and so is (almost) guaranteed to be correct).
I generally go by what the README in my source files says. Like for making the kernel:
When compiling the kernel all output files will per default be
stored together with the kernel source code.
Using the option "make O=output/dir" allow you to specify an alternate
place for the output files (including .config).
kernel source code: /usr/src/linux-2.6.N
build directory: /home/name/build/kernel
To configure and build the kernel use:
make O=/home/name/build/kernel menuconfig
sudo make O=/home/name/build/kernel modules_install install
Please note: If the 'O=output/dir' option is used then it must be
used for all invocations of make.
the prohabition against using /usr/src/linux is something old
once a glibc developer practice of having some of the user space includes as symlinks to i think /usr/src/linux/asm or something got mistakenly bled into some distributions..
this caused the kernel developers to freak out and declare /usr/src/linux as a wrong thing
since /usr/src/linux is something left over from the very begining of building linux systems people sometimes associate these old wrongs with /usr/src/linux itself
there are still to this day especially solaris style builds and third paty junk like nvidia drivers that look for currently running linux kernel headers in /usr/src/linux so it can be a big help to have it there
just make sure if you use it you keep it current with what kernel you are running
on modern systems /usr/src/linux is not a problem
often people say scripts from outside Linux circles shouldn't use it but they do and it causes no harm so i don't see the problem.
a box without /usr/src/linux well just feels like some preconfigured appliance used to deliver adds to it's user ala M$