Looking for good distro to learn internals of Linux
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.
Looking for good distro to learn internals of Linux
Hello,
I'm an absolute beginner looking for a distro to learn programming and the internals of Linux, from the ground up. Linux From Scratch is my first choice, but I can't decide whether this is the best distro to start with. Larger more user-friendly distros like Ubuntu and Linux Mint are easy to use, but I'm looking for a distro that won't do everything for me.
LFS will definitely accomplish what you want, although it's not exactly quick to get running, nor is it easy to get running since it's 100% made by you.
If you really want to learn the system but don't want to take a million years just to get it RUNNING, I'd suggest Slackware.
I rather like Arch Linux or Slackware. Both of them require you to set up the system pretty much from nothing, but without the need to spend quite a lot of time watching stuff compile. That being said, if you're interested in development, building the toolchain (linker, compiler, assembler etc.) and kernel from source can be a very enlightening experience in terms of seeing how the system is put together at a very low level. This is only really super useful if you're interested in low-level system programming, though.
I've personally built LFS twice, and while it's an interesting experience I don't feel like it's at all necessary to become a low level system guru. Even Ubuntu can teach you what you need to know if you're willing to look away from the pretty GUI and start poking around with some of the low level system tools.
I'm an absolute beginner looking for a distro to learn programming and the internals of Linux, from the ground up. Linux From Scratch is my first choice, but I can't decide whether this is the best distro to start with. Larger more user-friendly distros like Ubuntu and Linux Mint are easy to use, but I'm looking for a distro that won't do everything for me.
Where do I begin?
You've covered a lot of ground with your question. There are many different kinds of Linux programming.
Linux kernel modules and drivers
Linux shell applications
Shell scripts
GNOME graphical applications
KDE graphical applications
Web applications
Database applications
Since you mentioned Linux internals, I'm assuming that you want to learn about writing kernel modules and drivers.
I don't think that the distro will matter very much for learning about the Linux kernel. The distro will affect how much effort is involved in getting a programming environment set up and running. Slackware is a good choice because it comes with a lot of software and programming utilities already installed. If you are interested in writing applications for GNOME, you will have to install that on Slackware or use a different distro.
If you are interested in Linux internals, you will have to do some reading. There are many online articles about the internal design of Linux. Keep in mind that it changes with each version of Linux. Some concepts are easier to understand if you learn to use Linux before exploring the internals.
You might want to write some applications before you try to write kernel modules or drivers. Applications use system calls, and those are part of the kernel. Depending on the programming language, some or all of the system calls may be hidden in the library for the programming language.
To write Linux kernel modules and drivers you will need to understand programming in C. To write Linux applications you will need to know C++ and possibly some other programming languages. There are also some programming utilities like "make" that you will need to understand.
Depending on your background, I recommend learning about C programming first. Then learn at least a little bit about assembly language programming for the Intel X86 CPUs. You can find some documentation on the Intel web site that covers the instructions and system programming. To understand some parts of the kernel you will need those documents. If you already have a good background in C programming and assembly language then you can dive right into the Linux kernel.
It may help to study some operating system design concepts first.
Understanding the internals of the Linux kernel is not a trivial job. What I suggest is that you set some short term goals for yourself, such as learning C programming, or learning about writing shell applications. Don't set goals that are too ambitions, like writing a driver, until you have done some simpler programming projects.
There are a lot of great programming sites with examples and specific articles on programming techniques. Take advantage of the programming community. As you learn, consider writing a few of your own articles.
Here is a test you can appear for. Based on your choices and recommendations given by this test, you can choose a distro. Meanwhile, in my opinion you should go with debian, which will be more suitable for you. http://www.debian.org/ http://www.debian.org/distrib/
Several distros. Install one such as Ubuntu, as a virtual host OS, and then install some of the likely candidates listed above as guest OS's. Do it in parallel, so you can use each as an example of the numerous ways to do things, and chose the way that suits your preference. Comparing and contrasting different methods is a great way to learn not only the 'what must be done', but the different methods, reasons, and emphases used to accomplish the goals. Seeing contrasting methods early on helps you avoid the syndrome of viewing your first-learned system as the One True Linux, and all others being pretenders.
Slackwarre would be good, but Arch is enjoyable.
As for prgramming, while I agree thaat many modern languages owe their syntax to Denis Ritchie's great work in C I am not sure that this is necessarily the best starting place. I love C and its derivatives but, as has already been said, it depends on what you wish to program. Unless yo wish to learn to tinker with kernel code I would uggest an enjoyable start would be one of the modern scripting languages such as python or - my favourite - ruby.
/* controversy mode on */
I don't recommed starting to program for gnome. why would wnybody want to use C macros all over th place instead od using c++?
/* controversy mode off - and I admit that I haven't looked at gnome programming since encountering the aforementioned horrors many years ago. Perhaps gnome DOES use c++ now? */
As ever, most people suggest their own distro: it must be perfect, or they wouldn't be using it!
You can learn the details of Linux, and programming, with any distro. Linus himself has always used 'easy' ones, saying that he wants to spend his time developing, not fiddling with the distro. As for Linux From Scratch, you need to know about Linux first: otherwise, you'll either be following the instructions blindly, or spending ages on working out what each stage does. I'd suggest picking a good reliable distro like Mint or PCLinuxOS and getting really familiar with it: you'll learn more that way than if you install more than one or go distro-hopping.
For programming, Python is a good choice to start. Many distros use it for their installers and housekeeping tools, so there are lots of example programs to examine.
Last edited by DavidMcCann; 05-01-2013 at 10:26 AM.
You can learn the details of Linux, and programming, with any distro. Linus himself has always used 'easy' ones, saying that he wants to spend his time developing, not fiddling with the distro.
I agree with DavidMcCann. You probably do want to avoid distros like GENTOO and Linux From Scratch that require a lot of complicated steps to install. That still leaves a lot of distros.
Take a look at the "Wiki" and documentation for the distro you are considering. That will also make a big difference in how easily you can install the distro and get it configured.
You may want to start by running Linux in a virtual machine program such as VirtualBox. Then you can easily install different distros in separate virtual disks and experiment until you find the one that you like. If you make a mistake partitioning the disk or installing Linux in a virtual machine you won't hurt your real (host) operating system.
I'm an absolute beginner looking for a distro to learn programming and the internals of Linux, from the ground up. Linux From Scratch is my first choice, but I can't decide whether this is the best distro to start with. Larger more user-friendly distros like Ubuntu and Linux Mint are easy to use, but I'm looking for a distro that won't do everything for me.
Where do I begin?
Well I guess you know something about computers. If Ubuntu is easy (and it really is), try openSUSE, or if you're more confident you can try ArchLinux following this guide, the learning curve is HUGE on Arch.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.