From Noob to Ninja – Your Guide to Mastering Linux

Every Linux user has been new at some point, and unless you’ve got a history of UNIX administration, the transition was likely a bit daunting. Many people began learning Linux before sites like Google and StackExchange made it easy to find answers, and ended up having to figure everything out in their own. While inconvenient, this approach can force you to challenge yourself and learn things about the system that you might otherwise never find out.

Usually here at MakeTechEasier, we focus on specific topics for our tutorials. This time we’re taking a different approach, and providing a high-level overview of series of steps designed to hone the skills of a Linux beginner, and turn them into the kind of geek who compiles a new kernel for fun.

Step 1 – Install an “Easy” Linux in Real Partitions

There’s a good chance that if you’re reading this, you’ve likely already installed a Linux such as Ubuntu or Fedora. These “desktop” Linux systems are specifically designed to be as simple as possible to install. It’s important to do an actual partition-based install (as opposed to a “virtual” partition as done by Wubi) because this will ensure you understand the way the partitions are named and the importance of a swap partition.

linuxninja-lucidinstall

Step 2 – Learn the Filesystem

This is particularly important if you’re transitioning from Windows. Linux does not store programs the same way Windows does. On Windows, a program’s files are normally stored in (drumroll please) Program Files, and that usually includes just about everything the program needs. Linux, however, takes an approach that may seem a bit more complicated but has some advantages.

linuxninja-fs

A Linux package will normally place its executable files in a location like /usr/bin, its configuration files in /etc, and perhaps its log files in /var. Why the split? In short, because that allows a user or administrator to work with groups of related files. For example, if you wanted to reinstall your OS but a lot of your apps have custom configurations, you can just back up your /etc directory and all your configs are saved. You could put /var in its own partition so that log files have a hard limit on the space they can take up.

For detailed info on the Linux filesystem hierarchy, check out this great guide from the folks at The Linux Documentation Project.

Step 3 – Explore /proc

We’ve mentioned before how useful it can be to understand /proc, the special filesystem created by Linux to hold dynamic system information. Understanding proc is essential toward understanding Linux, because it gives you live feedback on the state of your hardware and software.

Step 4 – Compile a Kernel

This is where a lot of people step back, feeling as if they’re not ready. The honest truth is that compiling a custom kernel is not as complicated as it may sound. Most of the time, the process consists of a few shell commands and a few minutes of reading over checkboxes. Often, customizing a kernel build is literally as simple as browsing a long list of options and picking the ones that sound good. Many options come with a recommended setting to help guide choices you might not be familiar with.

linuxninja-xconfig

Ubuntu provides an excellent guide on this topic here.

Step 5 – Install Gentoo

There are a few source-based distributions out there, and Gentoo is probably the best known among them. Where your average Linux like Ubuntu and Fedora will fetch packages, Gentoo fetches only the source code, and compile that code into the actual program. There are a few advantages (and disadvantages) to this approach, namely speed and flexibility.

Gentoo users set certain flags for the system that specify, among other things, the CPU type of the machine. When a user requests a package, say for example Firefox, Gentoo’s package manager will search the Firefox source code pack and download the code. It will check the user’s flags to get information, and then build the package that’s specifically optimized for that CPU.

linuxninja-gentoo

The Gentoo install process is not easy. It’s done through the command line and almost everything is done manually, so Gentoo provides excellent install documentation to help get you through.

Step 6 – Learn a Scripting Language

While C is usually the language of choice for Linux system internals, many of the applications are tied together using higher level programming and scripting languages like Python and bash. Learning one or both of these can be IMMENSELY useful for managing and automating your system.

For example, just yesterday I spoke with a friend who was tasked with gathering the specs from hundreds of hard drives on a company network. Many people would let out a little sigh, grab a clipboard, and start opening machines. This friend, being a Linux geek, instead whipped up a 3-line bash script which scanned the hard drive data for the whole network and printed the results in seconds.

If you’re looking for a place to start learning, MTE has a Basic Introduction to Python 3.

Step 7 – Install Linux From Scratch

You may have noticed in the section above when I mentioned that a Gentoo install involves doing nearly everything manually. Take out the word “nearly”, and you’re beginning to envision a LFS install. LFS is not a distribution exactly. In fact, it’s not a distribution at all. It’s a series of instructions, a way to build every… single… piece… of your Linux install directly from source code tarballs. There is no package manager, no installer, no helpful utilities. You just follow the steps to put each and every piece in place to make a bootable system.

The first time I did LFS, it took me a solid week to get it bootable. With some practice and a fast machine, you may be able to trim that down to a few hours. LFS is not for those lacking in serenity and patience, but if you’re willing to put in the time and effort, it’s one of the most rewarding experiences you can have on a PC.

Image credit: DebianAdmin.com

23 comments

  1. Agh, step 5 fail…

    1. What do you mean? Don’t like Gentoo?

  2. Change Step 5 from Gentoo to Slackware.

    1. Yes Slack would make an excellent choice as well.

  3. Arch would be a much better choice than Gentoo. It’s more mainstream.

    1. chose Gentoo for two main reasons. First is that I just personally prefer it to Arch, and the second is that Arch’s installation routine is unique. While it would teach you a lot about Arch, not that much would transfer to other Linux installs.

      Gentoo’s install is a pain, but it’s a pretty standard routine and the skills learned there would (in my opinion) apply more readily to other systems, particularly the later LFS install.

  4. Gentoo is good for learning how to compile stuff or what options there are available when compiling.
    But I think there should be a step between ubuntu and gento filled with one of the following systems: debian unstable, arch, slackware

    1. Thank you for the detailed reply.

      I had considered adding a Debian or Slackware install section, but I thought that 3 distro installs was probably enough. I didn’t want 50% of the steps to be OS installs when there are plenty of other ways to learn.

      I chose Gentoo to represent source-based distros in general. Based on the comments, it seems many think Arch may have been a better choice, but to me the important part was for a user to get familiar with source-code based package management. The exact distro was, to me at least, less important than the package style. Be it Gentoo, Arch, Slack, etc. All have unique learning experiences to offer.

  5. I really don’t mean to offend anyone, but…

    This is a REALLY bad article! I am FAR from a newbie, but occasionally read these types of articles, out of curiosity at what is being aimed at newbies.

    Step 1 – Install an “Easy” Linux in Real Partitions [OK, but warn them before wiping out their Windows install on the same machine, by making the wrong option choice when installing!]
    Step 2 – Learn the Filesystem [OK]
    Step 3 – Explore /proc [OK, but maybe better later]
    Step 4 – Compile a Kernel [You CANNOT be serious!!!]
    Why not teach the user how to use a CLI (Command Line Interface) FIRST, and some of the basic commands, such as cd, ls, less/more, grep, etc…
    Step 5 – Install Gentoo [Let the poor Noob get used to ONE Distro first, and how use basic commands, use the GUI apps already installed, install new software, BACKUP, maintain the basic system FIRST!]
    Step 6 – Learn a Scripting Language [You haven’t showed them what a CLI is and how to use it! Teach them bash scripting, BEFORE Python!]
    Step 7 – Install Linux From Scratch [The Noob has a LOT to learn before you throw this at them, along with your “Step 4”]

    This is FAR from “MakeTechEasier”! This is “How to scare a NOOB away from Linux, as quickly as possible” !!!

    1. I was, in fact, serious about compiling a kernel. If it doesn’t work, boot your old kernel. Keep trying or don’t, you’ve likely learned quite a bit in the attempt.

      I do see your point about CLI though. My intent was the the command line be learned while working through the specified steps, but specifically focusing on the shell is certainly a good idea.

      I had assumed “general system usage” was implied between these steps. Once someone has installed, say, Ubuntu, I would expect them to use it before installing Gentoo. Perhaps I could have made that clearer.

      Regarding LFS – yes, a user does have a lot to learn before trying it. That’s why it’s the last step.

  6. Some good and not so good stuff in this article.
    You should have:
    Talked about learning how to use the command line as mentionned before while going through steps 1 to 3.
    You should have also talked about using VirtualBox and experimenting with various distros in a VM to learn and practice installation, configuration , troubleshooting etc…
    at least for the compiling the kernel and installing an advanced linux distro (Gentoo in your article).

    1. Yes a section on the command line and related tools (grep, etc) would have been useful. Had I thought of it at the time, it would have been included.

      The virtual machine is a good idea, and it would be nice to include a few other steps like a Debian install and maybe tack “Learn C” on to the end, but I did have to worry about article length so of course some things didn’t make final cut.

      Thanks for the comment.

  7. Could we see the three line Bash script?

    1. I’ll ask him for the exact file, but from what I recall in seeing it, it was just a FOR loop that would SSH to remote machines and grep output from smartctl

  8. This is a good list in my opinion, nothing that should be attempted in a week, or even a month, but it is a good overview of how to become a Linux master, (notice that the article title is not “How to begin using Linux”).

    1. Thank you for the feedback. Yes that is how I had intended this, as a broad, long term progression, not something you’d sit down and do in a weekend. I had hoped to make that clear in the introduction but it would appear I did not.

  9. The best thing about this article is that there are a lot of resources someone can go to in order to learn more about Linux and it’s inner workings. Thank you for those.

  10. /* Most of the time, the process {compile kernel] consists of a few shell commands and a few minutes of reading over checkboxes. */

    I would assume that a noob reading this section would google *shell commands* if he/she have never used them. I would assume they would learn shell/command line commands before proceeding with the kernel compile. I mastered Linux using google.

    But I guess it is just me.

  11. This is just fine; for the technical. This is just fine, for learning; if you have the time. It is by no means necessary. One does not have to be a geek, to use open software. That was like, so 1994. Do your realize 2010, is 16 year later? Open software, is not about proving the inner, ninja geek. We have nothing to prove. But you know, it’s your party.

    I was with you until about step 4. I’m just saying the obvious. This is for the developer geek; certainly NOT a Windows refugee. Nice and very useful files-system chart, however.

  12. It’s articles like this with the ensuing arguments afterwards that scare off Noobs. Nothing more… This is sad, really.

  13. Arch is very easy to install compared to Gentoo. Plus, it is not source based. I don’t think there is any software compiled during installation, it downloads updates and software as binary and it doesn’t give you the option of compiling your kernel. Getting a desktop is as easy as pacman -S xorg gnome. It will still teach you a lot and is my all time favourite, but anyone who is serious about learning Linux needs to bite the bullet and install Gentoo at least once.

  14. Thank you for the article. I’ve already started my journey!

  15. probably not the best guide ever but very usefull links! tnx

Comments are closed.

Sponsored Stories