LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-29-2013, 09:26 PM   #1
songlian
LQ Newbie
 
Registered: Apr 2013
Posts: 5

Rep: Reputation: Disabled
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.

Where do I begin?
 
Old 04-29-2013, 11:08 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
then take a look at the following distros:

http://fedoraproject.org/

http://www.slackware.com/

http://www.debian.org/

avoid Ubuntu if you want to learn Linux. If you want to get nuts then look at the following:

http://www.gentoo.org/

or check out a fork of gentoo called sabyon:

http://www.sabayon.org/

Sabyon is a fork of Gentoo that is semi pre-packaged and faster to install and update then raw gentoo.
 
Old 04-29-2013, 11:15 PM   #3
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,003
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
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.
 
Old 04-29-2013, 11:35 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
1 members found this post helpful.
Old 04-30-2013, 12:42 AM   #5
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by songlian View Post
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.

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.
  • Executives and task context switching
  • Interrupts and interrupt handlers
  • Scheduling
  • Deferred procedure calls
  • Synchronization, mutual exclusion semaphores, spin locks, queues
  • Memory management
  • File systems
  • Plug and Play
  • PCI and PCIe busses
  • Advanced Configuration and Power Management
  • Chipsets
  • Direct memory access
  • Time calculation and time synchronization
  • Exception handling
  • Signals
  • Pipes
  • Communication protocols, IPv4, TCP, IPv6

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.
 
2 members found this post helpful.
Old 04-30-2013, 02:04 AM   #6
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
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/
 
Old 04-30-2013, 03:05 AM   #7
kooru
Senior Member
 
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 275Reputation: 275Reputation: 275
Hi and welcome to LQ!
My 2 cents: start with slackware
Use it, explore it, learn it.
 
Old 04-30-2013, 06:38 AM   #8
JWJones
Senior Member
 
Registered: Jun 2009
Posts: 1,444

Rep: Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709
Slackware
 
Old 04-30-2013, 09:35 AM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by songlian View Post
...I'm looking for a distro that won't do everything for me.
There very definition of Slackware.
 
Old 04-30-2013, 09:54 AM   #10
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

--- rod.
 
1 members found this post helpful.
Old 04-30-2013, 10:44 AM   #11
normanlinux
Member
 
Registered: Apr 2013
Location: S.E. England
Distribution: Arch
Posts: 161

Rep: Reputation: Disabled
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? */
 
Old 04-30-2013, 11:06 AM   #12
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,137

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
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.
 
1 members found this post helpful.
Old 04-30-2013, 01:08 PM   #13
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by DavidMcCann View Post
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.

Last edited by Erik_FL; 04-30-2013 at 01:09 PM.
 
1 members found this post helpful.
Old 04-30-2013, 01:12 PM   #14
junior-s
Member
 
Registered: Apr 2013
Location: Brazil
Distribution: Arch Linux
Posts: 137

Rep: Reputation: Disabled
Quote:
Originally Posted by songlian View Post
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.

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.
 
  


Reply



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
Good distro to learn with? amantonas Linux - Distributions 27 12-30-2011 08:34 PM
[SOLVED] Good books to learn linux Wmtelsr1 Linux - Newbie 17 10-04-2010 03:56 PM
Good Tutorial on Linux Internals linuxunix Linux - Newbie 5 03-06-2010 10:24 AM
looking for a good distro to learn Linux and play multimedia with up to date repos admas Linux - Distributions 13 07-09-2009 05:49 AM
What is a really good way to Learn Linux? What about a Really Good Linux magazine? Howerton Linux - Newbie 9 09-02-2004 04:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:47 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
Open Source Consulting | Domain Registration