_______ ____ ____ __ __ ____ __ ______ ______ /_ __// __// __// /_/ // _ / / / / __ // ____/ / / / __// /_ / __ // _ < / /_ / /_/ // /_ / /_/ /___//___//_/ /_//____//___//_____//_____/ techblog.koponen.se [ / ] [ howto ] [ reviews ] [ webapps ] [ youtube ] [ links ] [ about ] -------------------------------------------------------------------------
THE BEST WAY TO LEARN LINUX
(Maybe you're just here to see the roadmap again?)
In this article I will describe what in my experience is the best way to learn Linux. I've been using Linux since 1996 and I've been working professionally with Linux since 1999. I've met thousands of Linux users throughout the years. (Yes, thousands.)
I've trained many friends and users in Linux and I've gotten a pretty good grasp on who's going to stick with Linux and who's not. Why I'm stating all this is not to brag, but to assure you that I know what I'm talking about, to assure you that you are not wasting your time reading this.
Also, this is my way of learning Linux. I'm sure there are other ways too.
While this article has chapters, it's not a step by step guide. This article will not delve into the actual installation process or which commands you should learn, there are already many great books and articles for that.
This article is more of a roadmap on how to go about it. A sort of self-help article on where to start, where to go and in which order you should learn all things. Completing all the tasks in this article will probably take years. I'm not saying that to scare you away, but to let you know how much time I've put into writing this.
Let's get started!
02. The beauty of learning Linux
03. Requirements, recommendations and warnings
05. Choosing which Linux to install
06. Using the Linux desktop
07. Building a Linux server
08. Alternative architectures
09. Raspberry Pi
10. Virtualization & cloud
11. What comes next (the roadmap)
12. Some tips for the road
In this article I will use some common words and abbreviations. I'm sure you already know most of them. But to be very clear on how I use these words, I will list the words, the abbreviations and their meanings in this context.
Machine = A computer on which you can install an operating system. This definition includes: laptops, desktop computers, server computers, single board computers and virtual machines.
Laptop = A portable computer complete with built-in display and keyboard.
Desktop Computer = A "non-portable" computer in a desktop chassis (case) or tower chassis. The display, keyboard and mouse need to be connected separately.
Server Hardware = A computer in a 19" rack mount chassis. It really just is a fancy "PC" in a different chassis. This is of course an oversimplification. But in many cases this is true.
Server = A server is a machine OR software that serves other clients (computers) with information, over a network. People who are new to computers, the Internet or networking in general, usually don't fully understand what a server is. Many picture big machines in data centers (and they're not wrong). But the more you learn, the more you realize that almost anything can be a server.
Client = A user (or consumer) of a server. The client is the counterpart to the server. I.e. a web browser is a client to a web server. A client can also refer to a user or a computer on a network. For example: In the context of using a network, you could call a computer: a client that connects to the network; or you could call the network software: a client that connects to the network; or you could call the user: a client that connects to the network. However, most often it refers to software and many clarify this by saying "client software".
Process = A program (software) that is running, in an operating system.
Daemon = A process that runs in an operating system, on a machine, for the purpose of serving clients. The word daemon is a more specific term compared to the word server or service, since a daemon always refers to a server process.
Service = A service is one or more servers that together deliver a function to clients (computers). In many cases a service can be held by a single server software on a single machine. In other cases, to get better resiliency, a service is made up of several software components (and maybe even hardware components) that together deliver a function. An example can be a webshop where the webshop is the service, but the underlying server software is a web server and a database server, and the underlying server hardware is one or several machines.
SBC = Single Board Computer. A very small computer (that fits in your hand) that is popular among hobbyists. They also have many other uses, as we will see later. The most common SBC is Raspberry Pi.
OS = Operating System. The software that you install directly on a machine. Examples of operatings systems are: Linux, macOS, Android and Microsoft Windows.
Bare Metal = A physical machine. This can be a laptop, a desktop computer, server hardware or an SBC. The term "bare metal", is used to clarify that there's no virtualization layer, the OS/software "runs straight on the bare metal", a physical machine. The expression "bare metal install" means to install something straight on physical hardware, which implies physical characteristics, like IO wait times, temperatures, vibrations, etc.
VM = Virtual Machine. This is the direct opposite of bare metal. It is a machine that was created and lives inside a Hypervisor (Virtualization Software). One benefit of having a VM is that you can run more than one VM, simultaneously, on the same hardware. An OS or software usually runs just as well on a VM as they do on bare metal, but there are exceptions.
CLI = Command Line Interface. This is also known as "text mode". In Unix and Unix-like systems, CLI is much more important when compared to MS Windows or macOS. You can either run the entire OS in text mode only (common on servers) or you can enter text commands via a terminal program, on a graphical desktop environment.
GUI = Graphical User Interface. This is the exact opposite of CLI. It means software that is graphical in nature, shows graphics and has a layout that is relevant and it's often controlled with a mouse.
WebUI = Web User Interface. This is also a GUI but the term specifies that this UI (User Interface) runs inside a Web Browser.
TUI = Text-based User Interface. This term is not so often used. It refers to a UI, completely in text mode, but with an actual layout, made with text, i.e. with ASCII graphics. You can encounter this in text-based software that does something that is normally only done in a GUI, i.e. a text mode E-mail program. (Actually, I mostly added this for completeness sake. It's not mentioned in the article, because TUIs are uncommon.)
Ambiguities (Which might be good to know)
(The irony is not lost on me, that often "server" and "desktop" are used in the same context, to be opposite each other.)
Ambiguity #1: Server
This word gets used a lot and it can either mean the machine that serves the network (with something) or the software on said machine. While a definition was written above and while one could always be more specific by saying "server machine" and "daemon"; in practice "server" is just almost always used anyway, even in this article.
An example where this ambiguity might arise would be the following conversation:
A: "Can you restart the server for me?"
B: "Do you mean the software or the entire machine?"
Ambiguity #2: Desktop
Only saying "desktop" usually means "Desktop environment", as in the graphical environment (software) that you use when you're working with the computer, the menus, icons, desktop programs and web browser. This desktop environment is most often run on a laptop (where there would be no ambiguity). However, when you run the same environment on a stationary computer (not a laptop), this kind of hardware machine is called a desktop computer (as mentioned above). When you read "desktop", think laptop with a graphical environment. I will try my best to write "desktop computer" when I'm talking about the hardware which isn't a laptop.
An example where this ambiguity might arise would be the following conversation:
A: My desktop is broken
B: Are you talking about your installation or your actual hardware?
This conversation is actually interesting, because fixing this computer is either done by a reinstallation of software or replacing a hardware part.
The Beauty of Learning Linux
The first language you spoke was given to you. You don't really remember learning it. A lot of the effort you put in is forgotten and what remains is your native tongue.
Some people like their language and they put in extra effort to get better at their native tongue. They read books, learn more words and rhetoric. Most enjoy this gained skill and write books or give talks and lectures.
Most people know a second language and many of them had to learn it in school. Homework and headaches. Many enjoy knowing a second language, others stop using it altogether when they finish school.
But the effort was not wasted. People who are multilingual have developed differently than people who are monolingual. (Checkout the article "Multilingualism" on Wikipedia.)
My point is that a person who is multilingual understands the concept of languages better.
The first computer you used was most likely a combination of being taught and by learning yourself; clicking on buttons, breaking things until you got better at it. Eventually you learned how to send an email or how to install computer games.
Some people like their computer and they put in extra effort to learn more. They might even rise to the level of being able to make a living working with computers.
It's quite common, when someone is about to learn Linux, that they don't fully understand what an OS (Operating System) is. They understand what a computer can do for them and they can be quite good at using the computer. But it's likely that they view the computer as a whole, meaning that the hardware and the software come together, not realizing what changing the OS will mean.
This means that almost anyone who is about to learn Linux also is about to get the "homework and headaches" they had learning their second language. Sure, you can learn Linux as only a user, learning where to click, etc. But learning Linux usually also means learning to install Linux. It is a hard sell telling someone that they will take a fully functional Windows computer and reinstall it with something else that will take them months to understand.
This is what I call the beauty of learning Linux. You will learn Linux, but you will also learn OS:es, hardware and networking at the same time. You will even get better at other OS:es as you understand Linux better. You will have many "Aha moments" when previous knowledge like "you have to enter 255.255.255.0 or it won't work" will become much, much clearer.
You will also understand the Internet much better.
You see, when ARPANET began, it was built on UNIX machines using TCP/IP. This later evolved into what we today call the Internet which is using IPv4 and IPv6.
This meant that using a UNIX computer was a great Internet experience, while personal computers like PC and Mac weren't as straightforward.
Linux was created as a free, open source and Unix-like OS, initially for the i386 PC. This meant that not only could you run it for free on your home computer, it was also Internet native. Linux uses IP (TCP/IP, IPv4, IPv6) as its main protocol.
What I'm trying to say is that Linux is a great Internet experience, far better than all alternatives. If you really want to learn the Internet well, then nothing beats using Linux as your main OS. This is why many web developers and most network engineers switch over to Linux. When you are using the same OS on your laptop as the server (or cloud) you're interfacing with, the tooling is just so much better.
This is the beauty of learning Linux.
Inherited beauty from the parents...
I also think it's important to understand that not everything that makes Linux awesome was invented by Linux.
Since Linux is a Unix-like system, it has inherited some really neat features of Unix. You might've heard of: "Everything is a file" or "Make each program do one thing well". I suggest you read up on Unix philosophy because it will help you understand why Linux works as it does.
Requirements, Recommendations and Warnings
The two most important skills when learning Linux is patience and the ability to do a lot of reading
I can't stress this enough.
It will take time to learn Linux well and Linux is not made to be an entertaining experience. There will be many things that seem hard or impossible before you know them, so you will need a lot of patience.
A lot of the knowledge will need to be gained through reading books, articles, guides and forums. If you're not comfortable with doing a lot of reading, then you will not get very far. Sure, there are a lot of great video tutorials on how to use Linux, but if you want to be able to use it as a tool and create things, you will have to do a lot of reading.
When friends ask me: "What will I need to learn Linux?".
I always tell them: "You're going to need a lot of patience and do a lot of reading".
Some of them reply: "I don't have any patience" or "I don't like reading".
Sadly, these are the ones that usually give up, quite soon actually.
I truly believe that anyone with enough motivation can learn anything, even if they have learning disabilities. But I still haven't found a way to learn Linux well (to the level that you can use it professionally) without patience and reading. I don't want to discourage people. I'm just saying that if you don't have patience or if you're not comfortable with reading, you're going to have to learn this on the way.
You need to make the Linux desktop your main system
If you are to learn Linux well, you have to use it as much as possible. This means that you really have to use it daily, all the time, for everything. It will be frustrating (or fun) at first when nothing is what you're used to and most of the programs you've used before don't even exist. You will have to learn new ways of doing things, alternative programs, some that are better some that are not.
You will bump into roadblocks and you will have to choose. Will you learn how to do whatever it is you're trying to do in Linux, or do you quit and go back to your old system? Only by forcing yourself to sit in Linux all day - no matter what - will you learn. Also, you need to stick with this for a long time. The longer the better. In my experience, this is by far the most effective method of learning Linux.
"But I only want to learn Linux Server, I don't need a Linux Desktop!"
I hear what you're saying, but the CLI is the same on Linux Desktop as on Linux Server. The knowledge transfers. Your scripts, code, containers, will work on a Linux server just as they work on a Linux laptop/desktop. The user who also runs Linux as their Desktop System will have it easier and learn Linux faster. A Linux Desktop/Laptop interfaces with a Linux Server so much better than any other OS.
Also, When you know how to install Linux on your machine, you also (whether you realize it or not) know how to install Linux Server.
You really should have a dedicated computer for learning Linux
(Or a "bare metal machine" if we are using the correct terminology.)
The main reason for this is because you're going to need a machine on the side where you do all your reading. You also need a bare metal machine on the side for creating different boot mechanisms for your Linux machine. And you will break your Linux machine many times, sometimes for days, and then it's very handy to have a fully working machine on the side. Then you will not be afraid to experiment (and break) your Linux machine.
Please, no dual booting
I can see the appeal of dual booting if you only have one machine. But I've never seen it work well. I mean, the dual booting part can work well, but you're effectively wasting resources.
The machine only has value when it's running and you can only run one OS at the time, so that other OS (and usually its files) is locked away. There's a reason why you keep the other OS. It has programs or games that you use and you're comfortable with. You use Linux for a while but it gets boring and you reboot to your previous OS and you remain there. You need to reboot again to reach Linux and there's some inertia to do that.
Then it's much better to have two machines. One with the system that you're learning and one on the side that you already know. You sit with Linux for an hour or two, then you get tired or have to switch to your old system. However switching back again to Linux is just a matter of pivoting your chair. If you have an important application that only works in macOS or Windows you can have it running on the side while you're learning Linux.
If you only have one computer and you really don't want to delete your Windows installation, I suggest that you take out the storage (SSD or HDD) holding the Windows installation and put it away. Then you fit another SSD on which you can install Linux. This way you're not dual booting and you can avoid all the problems that arise from when two different operating systems are trying to alter each other's boot procedures.
A warning about virtualization
I often see people trying to learn Linux in a VM or other kind of virtual environment (like WSL, WSL2, Cygwin etc). While I can understand the appeal for using these tools, none of them are an optimal environment for learning Linux. You will learn a variant of "virtual Linux", you will not learn common Linux hardware features/problems. Some ways you use the terminal (Linux CLI) is not transferable knowledge. Many common Linux/UNIX shortcuts won't work. Some of the scripts and programs that are written in these environments don't work elsewhere. It's very much like learning a dialect before learning a language. Also, you make your systems dependent on each other, meaning that you can only use your Linux machine when your host machine is in the correct state, etc.
Virtualization is a great tool, but not when you're about to learn Linux properly.
Learning Linux is easier with friends, peers or study buddies
Try to find a community, or a computer club. If you're a student, maybe there's a computer club at your school? In bigger cities you can find meetups, gatherings, hackathons and demoparties. Basically gatherings that are focused on computers but not focused on gaming. Conferences focused on open source or Linux can also be fun.
If you have friends or colleagues that are using Linux and are pushing you to learn Linux, these are usually the best resources. But be careful. If you ask them questions and they reply with a link, article or book that means that you should read it. If you're impatient and "just want the answer", you might wear them down after a while.
If you can't find friends (or if you don't want to) I'd recommend getting a book (The O'Reilly books are usually good and can from time to time be found at a great discount on Humble). Also, if you need help, the Ubuntu Forums are quite good. Alternatively you could start on Raspberry Pi instead of PC, because the documentation is very good, but more on that later in this article.
I recommend that you start with a desktop computer, because they are usually the easiest to get working with Linux. If there's a part (graphics card, network card, etc) that doesn't work well with Linux you can probably change that part.
Using a laptop is not bad either. The benefit is that you can carry it over to a friend, bring it to hackathons, really using Linux everywhere. The downside is that most laptops have custom drivers made only for MS Windows. It's quite common to have hardware problems and you kind of have to accept that some parts of your laptop won't work. As the laptop gets older, Linux will either support it better or the laptop will be forgotten.
Whatever hardware you chose, the good news is that Linux runs faster than most alternatives. Linux on an old machine can make it feel like new again!
When using repurposed hardware, make sure to install an SSD to install the system on. Linux doesn't need much space, a cheap 120GB SSD is plenty enough. Not only will it make your machine twice as fast, it will also save you a lot of time every time you need to do updates.
If you're getting a new machine just for running Linux, consider getting a machine that was custom-built for Linux. Not only will you have less problems, but the experience can be quite pleasant. Just like how macOS works perfectly on a Macbook Pro, no additional drivers are needed. However, finding such a machine can be tricky. System76 makes Linux hardware and software, but their main market is North America. There's Purism who sounds very nice on paper, but the reviews on their customer service are terrible. You will mostly see professionals use Dell or Lenovo and for good reason: these brands have models with official Linux support, they're quite common, so the user base is quite large, which in turn means that they're quite easy to find information on.
Optionally you could skip the PC architecture and get an RPi (Raspberry Pi). It was built for Linux and the hardware support is really good. While I think everyone should learn Raspberry Pi, almost everything is faster and more fun on PC Linux. Raspberry Pi has great support, but it lacks good encryption and virtualization, which are important things to learn. Also, using Raspberry Pi as a desktop is slow, you'll most likely get bored. (If you go this route do note that Raspberry Pi OS is by far the most important Linux distribution to learn on this platform.)
Whatever you do, don't get a "Netbook" (very cheap PC laptop, 300USD or less). They're slow, crippled and you will not have any fun. It will only be a matter of time until you realize that it can't do much, it's a dead end. All time spent on it is more or less wasted. There are PCs who will be pleasant to use with Linux, but a netbook is just too slow, it never had a chance to begin with. The lesson here is that only a computer that was fast at the time of purchase has a chance of being a pleasant Linux experience. If it was slow from day 1, it will most likely be the same if you install Linux on it. There's a saying when buying a computer - "Buy quality, cry once" - meaning that either you cry when you're opening your wallet, or you cry every time you have to use your too cheap computer.
With all this said, let me tell you about the common life cycle of a bare metal machine in the eyes of a Linux enthusiast:
The machine is new, it's supposed to do some serious work. It's likely a gaming computer, a work computer (that should never break down), or some kind of workstation, maybe for art & design. It might even have been bought for the reason of being a new Linux machine. It has a warranty. But after about 3-5 years (depending on how much you initially spent on it) the shine has faded, some tasks are becoming a pain for taking too long. You're looking for a replacement.
The machine is now about 4-6 years old and has been replaced by a newer machine better suited for the original task. This machine now becomes obsolete, or a hand-me-down for children, grandparents or friends. You know this machine still has some value but you realize that you won't use it, better to give it away while it still is worth something to someone. This is prime time for Linux! The machine has been out on the market for a while, so Linux has had time to get proper drivers and Linux will run much faster than Windows.
This means that the most likely (and probably best) candidate for your first Linux system is probably a machine you've just retired, or that you've received from a friend who's just retired it. This is recycling and sustainability at its best. You can learn, experiment and play on it, if/when it breaks you've gained knowledge and you haven't lost anything of value.
How long this machine will be usable depends on how old it was when you got it, how expensive it was when first bought and partly how well you will take care of it. It's usually a good idea to make sure it has proper SSD storage and to make sure it has a lot of ram. If it's a laptop you'll probably max out the ram capacity. If it's a laptop and the battery or PSU are giving out it's usually not worth fixing. If the GPU is wonky it's worthless. But this is all in theory...
In practice this machine has value as long as you can run a web browser on it without thinking or feeling that it's too slow.
When it's too slow to run a web browser you will feel more and more reluctant to use it. If it's a laptop it's time to recycle it. Save the parts that you're interested in, i.e. the storage, maybe the RAM, the PSU/charger might be compatible with other laptops. If it's a desktop/tower machine it can still serve a purpose...
The machine is now about 8-10 years old and is too slow to run graphics or web browsers. This is a perfect machine to use as a dedicated Linux server, sitting under your desk, or in the basement, or next to your home router. Reasons for not using this as a server can be noise or power consumption (but for the Linux enthusiast this is secondary). The machine probably has space and support for hard drives and would make a great file server for your home network. You would be surprised how many more years it can be used with text mode Linux. It would also be a great web server if you're interested in hosting homepages from your very home (more on this later).
When you've come to the point that you can't think of anything the machine has use for, get rid of it, asap, or else Marie Kondo or a pack of psychologists will come for you and label you as a hoarder.
This means that if you're asking a Linux enthusiast for an old machine and she (or he) says it's too slow to be used for anything, it really is worthless and you shouldn't waste time on it. Conversely is also true, some Linux enthusiasts have more hardware than they know what to do with and they are the ones giving away great hacking and learning equipment to their friends and family.
Installing Linux (Choosing a distribution)
(TLDR: Pick Ubuntu Desktop LTS)
As you might already know, Linux comes in a lot of "distributions". What this means is that there are many different offerings (or: servings, flavors, variants, dialects) of a Linux system. They're all Linux, meaning that they have a Linux kernel and the classical GNU programs.
This means that there are commands and ways of doing things that will work on all Linux systems, and there are other commands and ways of doing things that will be unique to the Linux distribution you are using.
The best way I can describe this is that there are different "flavors" of Android smartphones. You have Samsung Android smartphones but you also have other brands of Android Smartphones. They're quite similar, they can use the same apps, they almost work the same; but there are also some things unique to each brand, things that you can only do on a Samsung Android smartphone, etc. (The irony is that this variety of Android systems is because Android itself is a Linux-based OS for smartphones. As soon as something runs Linux, there can be and there will be other Linux distributions for it.)
The biggest difference between distributions is the way they handle packages. The two most common distribution "families" are either RPM-based (RedHat) or DEB-based (Debian) [*]. This refers to how most programs are installed, if they come as .rpm files or .deb files. There are other types of distributions, but these are the two big ones. You can install programs in other ways than using the distribution repository (a kind of text-based "App Store") but if you stick with the standard ways, updates and patches will be so much smoother.
([*] RPM-based and DEB-based are the two big ones, especially within the professional Linux world. Commercial closed source Linux programs are usually only given support for these two. However, there are other popular distribution "families", like the Arch-based ones using the pacman package manager, just as there are many others.)
When you are about to install and learn your first Linux system, you need to pick a distribution and which one you choose is quite important, especially in the beginning. My best recommendation is to pick something common, something popular, something you know you'll find a lot of information on. This will very likely be Ubuntu Desktop and in my opinion that is an excellent first distribution to learn. It's well spread, well known and the Ubuntu Forums are quite good and friendly. If you ever only learn one single Linux distribution, go with Ubuntu.
Some reasons to NOT to pick Ubuntu as your first distribution are:
ALL of your Linux friends are on another distribution, maybe it's Fedora. Then it could be wise to choose this distribution, because you've probably already seen it a little bit and you know you'll have some people around you that you can ask for help.
You're learning Linux on your work time and your workplace has another distribution which is more common, one that your boss prefers you to learn. This is not bad at all. You can still install Ubuntu on a machine at home and dabble with it in your spare time. You will learn both systems at the same time. Being in this situation is a luxury. My only advice here is to use another distribution at home, otherwise you risk feeling that you're working in your spare time too.
You need to run Linux on a specific machine, with a specific piece of hardware that has better support in another Linux distribution. For example:
Maybe you're just not interested in Ubuntu at all. Maybe you really want to try something else, like Arch Linux or Linux Mint. There's nothing wrong with this, but keep in mind that a "Ubuntu-based distribution" isn't 100% identical to Ubuntu and an "Arch-based distribution" isn't 100% identical to Arch Linux, some hints and tips just won't work. Therefore, this path might be much harder and you're pretty much on your own. Just make sure to pick a distribution that is still in development, so that you will get security patches and so that you won't learn anything obsolete.
If you want to learn more about all the different Linux distributions out there, I suggest you check out DistroWatch (A pointer though, that "top list" on the right does NOT reflect the distribution install base.)
The important thing is to pick the distribution that will give you the most joy. That way you'll learn quicker because you're having fun; you're more motivated.
Now for the harder part. You need to stick to this distribution for at least a year.
There's a phenomenon called distrohopping. People change their Linux distribution over and over again and they might be having fun, but in the long run they only have superficial knowledge of each distribution. If you've picked the wrong distribution, nothing works and you're not having fun, then I don't blame you, by all means, change! But when you've found something you kind of like, stay there for a while. And when a year has passed and you've gotten the hang of things - well done!
But you still only know one distribution. Many things you've learned are transferable knowledge into other distributions, some are not and it's hard to know which is which until you've seen other distributions.
Since Linux is a text-based system, most distributions build tooling for the low level Linux commands: graphical tools, scripts and programs. You might not know this, but there are now many ways of changing your IP-address in Linux, or controlling the IP-filter (firewall settings). Some think this is a blessing, not having to memorize CLI commands, others think this is a curse because these tools can be very different in other distributions. Some distributions even go as far to disable (or overwrite, or govern) these original Linux low level commands.
This means that after a year of using Ubuntu, you'll know Ubuntu but there's a risk you don't properly know Linux. This isn't wrong, maybe you're content with only knowing Ubuntu, but this would be like only knowing how to own and use a Volvo. Don't get me wrong, you can most absolutely learn all the low level Linux commands and use them in Ubuntu, but I'm not so sure if you can claim to know Linux well, if you don't even know how to install anything but Ubuntu.
Another tip to remember is to pick a version of the distribution that at least has 3 years support, preferably even more. Distribution versions with long support tend to be more stable and get more software right. On Ubuntu these are called LTS releases (LTS = Long Term Support). They are less experimental, less buggy and you don't need to reinstall or upgrade for a while.
When you install your Linux system you'll bump into the suggestion of encrypting your entire system. While in itself this is a good idea, it will incur more maintenance. You'll need to make sure you don't forget your key/passphrase and the machine won't be able to reboot without you typing in the key every time while it's booting. (On a server this is almost always a showstopper, since it introduces manual steps needed on a regular basis.)
Using the Linux desktop and understanding the graphical shell of Linux
So you've installed Linux, now what?
It can be pretty anticlimactic after Linux is installed. You can login, you can start the browser and surf the web. What you need now are goals. Like a bucket list of things to install, to learn, to try out, to play with.
Here's a small list of things you could try to install and use:
As you've figured out, this is basically just playing with the computer. If you want to get more productive you can:
When you've come this far, you're on the brink of making a server, or writing some code, or getting more into the CLI part of Linux. You might've noticed that browsing and coding worked just fine in Windows, so why stick with Linux? The real "power" comes when you get into all the thousands of CLI programs that control Linux, code and networking. You can do some of it on other systems, but when it comes to building things for the Internet, or using the "lower levels" of the Internet, Linux is so far beyond any other system.
So far you've been using the graphical part of Linux and this needs some clarification: Linux is a text-based system, what you're using is a graphical shell that sits on top of Linux. This is actually not unique for Linux, it works like this in almost every Unix/Unix-like system.
When you start your machine you see a lot of text fly by, this is Linux (or as some call it GNU/Linux). On a server you would not install graphics, so after the machine has booted you would be presented with text prompting you to type a username.
On a desktop system the machine goes further in the boot process and launches X[*], which is the software that lets you run graphics on top of Linux. X in itself enables graphics but after that it's more or less just a blank canvas. There are no windows, menus, icons or background.
(X stands for X Window System and there are variants of X, called X11, X.Org, and this rabbit hole goes deeper, but for simplicity I will just refer to this as X.)
On top of X runs the X window manager (Often just called Window Manager or abbreviated WM). It gives graphical functionality, like drawing windows and how they relate to each other. It can include menus, icons and themes. Often the WM is quite simple and might require some getting used to.
It's inside this WM you can launch graphical applications. So the graphical layer on top of Linux is actually two layers: X and the WM. This is important to understand because when you want to or need to make heavy alterations to a graphical desktop, you need to know these things.
.--------------------------. | 4. Graphical Application | <- Your application, i.e. "firefox" |--------------------------| | 3. Window Manager | <- Window Manager, i.e. "IceWM" or "i3" |--------------------------| | 2. X | <- Windowing system |--------------------------| | 1. Linux | <- The kernel / OS '--------------------------'
You've probably figured out by now that the WM can be changed to another one that looks and behaves differently. You can even have several of them installed on your machine and choose which one to use each time you login. If you really don't like a WM you can just change it.
Here the plot thickens. Instead of running "just" a WM, you can run a Desktop environment (and when you're new, this is most likely what you'll start with). The DE (Desktop Environment) includes a WM but then it expands this environment with helper applications. These extra applications can for instance be a panel or menubar with applets that lets you control audio, configure the network, change your keyboard, or a hundred other things you'd normally change via CLI.
.-----------------------------------------------. | 4. Graphical Application | <- Your application, |-----------------------------------------------| i.e. "firefox" | .--------------------------. | | | Helper Applications | | <- Desktop Environment, | 3. Desktop | ------------------------ | | i.e. "Gnome" or "Xfce" | Environment = | Additional functionality | | | | ------------------------ | | | | Window manager | | | '--------------------------' | |-----------------------------------------------| | 2. X | <- Windowing system |-----------------------------------------------| | 1. Linux | <- The kernel / OS '-----------------------------------------------'
There are DEs that are really beautiful, full of eye candy and look like they're from the future, but they can be taxing on your CPU, GPU and RAM. There are also DEs or WMs that are simple and resource friendly, letting you work on a really old machine that is too slow to run Microsoft Windows or Ubuntu with Gnome.
The most common DE is Gnome, it's the default DE in Ubuntu and it's beginner friendly and you'll get the hang of it probably within a day.
Gnome (or almost any other DE or WM) will be very similar between distributions, so this knowledge transfers well. Having experience from another DE like: MATE, Xfce, KDE Plasma is useful, you won't feel as alienated when you encounter other Linux systems. But it's OK to stick with one DE/WM, if you have a favorite then enjoy it wherever you go.
But what about running the text-based Linux, where all the cool commands are?
There are two ways of doing it:
You disable X and Gnome and login into your machine in text mode. The login process will launch a shell, which is a small program that lets you view files, create dirs, run commands and use text-based programs. The most common shell is Bash. This can be changed of course, but Bash is the most common and therefore the most important shell to learn. The big difference between different shell programs is how they can be scripted, meaning that maybe you want to create 1000 directories with just a one small line of shell code, the syntax for this is quite different in different shells. This is not important for a beginner, this is important for a professional, so you can dive into this later.
.---------------------------. | 3. Text-based Application | <- Your CLI application, i.e. "vi" |---------------------------| | 2. Shell | <- Your shell, i.e. "Bash" |---------------------------| | 1. Linux | <- The kernel / OS '---------------------------'
You stay in your WM and you open a terminal program (there are many, but in Gnome there's a good one called "Gnome Terminal"). This is like a view or window into the text-based part of your system and you can have as many as you like. You can have Firefox running right next to a small text box where you run the text-based commands. A very common reason for a Linux professional (like a coder or a sysadmin) to want to run a graphical environment is because she (or he) can then have a web browser, VLC and 25 terminal windows going, instead of "being stuck" in text mode, with one single shell.
"Option 1 sounds dumb if graphical mode let's you have many terminals. Why bother learning text mode Linux?" - Many reasons:
When you've come this far it only makes sense to learn more about Bash, especially how to build Bash scripts (getting a book on Bash is a good idea). But also learn to control graphical programs from the command line.
Soon you'll be a master of your machine and it's time to start to play with networking and servers...
Building a Linux server (your second Linux machine)
This is where the fun begins... It's time to build servers.
A server is just a machine - running a daemon - that is never turned off. There are so many homepages on the web, that are literally just a PC in someone's home. It's that simple.
At this point it makes sense to have another machine to be your server. It can be an even older PC, since you won't be running a graphical interface on it and it won't work as hard as your desktop that needs to serve you with all your web browser tabs. If you want to save money, it can also be an SBC, like a Raspberry Pi (more on this later in this article).
You can run your regular Linux machine as a server, but the real benefit of having a dedicated machine as your Linux server is:
On the server you'll install another Linux distribution more suited for server usage. This is most likely Ubuntu Server or Rocky Linux. Other popular choices are Debian or RHEL (Red Hat Enterprise Linux). There are of course many more. If you're at home and this is your first time, I suggest Ubuntu Server LTS release, it's easy to get started with, it's free, it has a large user base and the security is good. If you're at the workplace learning a Linux server distribution, you will probably not even have time to turn your head before you've heard which distribution you should learn. A server distribution is actually very similar to a desktop distribution. The differences usually are that the server is in text mode and that the installer is in text mode ANSI-style graphics. This means that you will have to install updates, packages, daemons and other software by using CLI commands instead.
So you install the server and it sits there. On the network. You can ping it and if you connect a display and keyboard you can login. What now?
SSH is like terminal but over network. It lets you control your text-based server as if you sat in front of it with a keyboard. But SSH lets you do this remotely and with encryption - it's awesome!
I can't stress this enough: The sooner you learn SSH properly, the better off you are. SSH is the swiss army knife of a Linux admin. It makes an encrypted connection between two Linux machines. Many think of SSH as "the program that lets you remotely control a Linux machine", but it can do so, so, so much more. Don't fall into the trap of only learning how to use SSH to login.
I suggest you start by learning how SSH tunnels work and how you can use that to safely encrypt a weak webservice. Either you read the SSH man page and learn what every single flag is used for or you get a proper thick book on SSH. Also really learn how SSH security works. If you ever are going to use more than one Linux machine, you are going to need SSH. And trust me, if you're looking for professional Linux work, knowing how to use SSH is basic. I often see people spend days or even months trying to invent a network function that is already in SSH.
You really need to learn SSH well sooner or later.
But you don't need to get stuck on this step. Learning SSH is something you'll do a little bit every week while also learning all the other stuff. Here's a suggestion of things you can learn to do with a Linux server:
A tip to remember for your server:
You can also configure your home router so that your server can be reachable from the Internet. This requires a whole lot of knowledge on networking and most likely cumbersome stuff like NAT and Port Forwarding (both are painful technologies of IPv4 that we will probably not see in IPv6). This partly depends on what kind of Internet connection or provider you have. If you do manage to make your server reachable from the Internet, you need to really look into Cyber Security and effectively you need to patch and maintain your server daily if you want to avoid trouble. (I'm not a fan of the naming "Cyber Security", but I stick to it, because it's a known label for Computer Security, Network Security, or basically any security field that involves devices that run on electricity.)
The lesson here is that an Internet server is just a Linux machine, with a somewhat permanent IP-address and the machine is never shutdown.
You might be tempted to buy dedicated server hardware. If you go this route remember that they are LOUD and consume a lot of power. It only makes sense if you own a house or have the possibility to place the server at a Colo[*] or a workplace with a server room that lets you have hobby servers. Many server machines support Linux, but Dell is usually the best. Check out the Dell Linux Engineering Site for more info. You also want to check out: MGMT cards, what KVM means, how to use "serial console". This is the server hardware rabbit hole and it's only needed if you aim to work with these things. If your goal is only to have a home network, regular PCs in tower cases are just as good.
([*] Colo is an abbreviation of Colocation, a place where you can rent space for your [loud] machine to run 24/7.)
This one is a little bit hard to explain to someone new.
I recommend that you do all this all over again - install a desktop, install a server - but on a different architecture. But what do I mean and why?
A different architecture means a completely different kind of processor than a 64-bit PC CPU. One that isn't binary compatible with PC. It could be an ARM processor (often found in an SBC, a smartphone or videogame) or it can be a very different kind of (older) UNIX computer. Before there were a lot of CPU architectures: PC 32-bit, PC 64-bit (with variants), Motorola 68000, PowerPC, Alpha and many more. We've had a long era of a PC-only monoculture and now we are again seeing variations with the older PC 32-bit going away in favor of PC 64-bit, but we also see ARM and now its varied architectures. You simply can't install Ubuntu Linux that is compiled for PC 64-bit and run it on something else than a 64-bit PC. But you can actually download other versions of Linux (or Ubuntu) compiled for these other architectures.
A lot of computers and devices were made to run only a single type of software or OS. When you take your device and install something else on it, you really unlock a lot of potential, both in the device but at the same time in yourself. This is in my opinion the very essence of hacking - you are taking something and you manipulate it to do something it surely wasn't made to do - like repurposing an MS Windows gaming PC into a Linux workstation.
Learning to install Linux on a different architecture will teach you a lot about hardware, hacking and Linux. You can of course gain this knowledge otherwise, but tinkering with alternative architectures really helps. There might be some headaches in the beginning, but later on you'll be glad you did this.
However, I have good news!
Learning Linux on a different architecture is now cheaper than ever, thanks to the Raspberry Pi. We've finally reached the chapter where we talk about what it is...
You really should get a Raspberry Pi
A Raspberry Pi is a Single Board Computer with a different CPU architecture than a PC. Like most SBCs it's cheap and it's made for running Linux, meaning that Linux works like charm.
You really should get at least one RPi (Raspberry Pi) and learn how to use it, because it will give you great insight into:
And the benefits of an SBC over your regular PC running Linux are:
Another benefit is that it's easy to find support, documentation and inspiration online:
You can get another SBC than RPi, like a Hardkernel ODROID or ASUS Tinker Board or Banana Pi or any of the other hundreds of SBCs. Almost all of them are ARM-based and are built for Linux first, but none of them have the support and amount of software that RPi has. Basically get the fastest RPi you can afford and only look at the other SBCs after you've already gained some experience with RPi.
You can start with RPi as your very first Linux computer, but it's easy to become bored with it as a desktop, because it's a bit too slow for heavy web browsing or YouTube. It's a great, cheap first computer for a kid.
You can have a RPi as your second Linux machine. It makes a great web server or router.
There are many distributions for RPi, but the default one - Raspberry Pi OS - is by far the best one. It's faster and it has the best hardware support. There's rarely a reason to run any other distribution, so you really should learn the default distribution before you venture off to the other ones.
There are some things that are MUCH better to learn on PC, things that are a little bit too limited or constricted on RPi:
When you've decided to get a RPi, make sure you get the official RPi PSU for it. A lot of retail stores will offer cheaper alternatives, but almost all PSUs are cheaper for a reason. It will affect the CPU and longevity or your RPi, sometimes you can even get weird hardware bugs that you wouldn't get with the official PSU. The reason for this is because the cheaper models have "uneven power delivery". It's worth the extra money not having to live with hardware problems.
All the RPi models can do throttling, meaning that if they get too warm, they will just throttle down and go slower. This means that cooling the RPi with a heatsink or a fan will let its CPU run faster for a longer period of time. This is especially true for the newer models. The RPi won't break for lack of cooling, but it will go faster with cooling.
Also, pickup reading The MagPi Magazine. You can buy it in stores or download the PDF version for free. Raspberry Pi Press also publishes other magazines and books, which can be bought or downloaded for free as PDF.
If you decide to get another RPi, consider a RPi Zero (with WiFi). They're cheap and there's a lot of IoT projects made for them that you can download for free.
If you get tired or bored of your RPi, or you simply don't use it as much as you thought, you should really convert it into a household item. The most popular use is to convert it into a Home Theater System (media player) that you connect to your TV and attach to your home file server. LibreELEC is a great and easy-to-use distribution of Kodi. Another popular use is to install it with RetroPie which converts it into an emulator gaming console.
It's said that 50% of all RPis bought are unused and in a drawer somewhere, and that 25% of all RPis bought are just running different distributions of Kodi. So you shouldn't feel bad if your RPi just sits there doing one single thing, it's better than not doing anything. There's nothing stopping you doing several things with the same RPi on a daily basis. You could always have multiple SD cards, one for experimenting, and one with software, i.e. Kodi, for when you just want to watch a movie.
Virtualization & Cloud (& Docker)
Virtualization is one of those things that is not really hardware or Linux, but you kind of sooner or later will stumble upon it; and if your goal is to work professionally with Linux (or computers at all) you will have to learn it.
I always recommend people to first learn Linux on bare metal before they dive into virtualization, because there can be weird bugs or features that are inherited from the virtual environment and not particular to Linux. Another reason to first learn Linux is because virtualization works much better on Linux than on any other system. (There are exceptions to this, but if you stumble upon them, you are so far into this field that you wouldn't even need to read this article.)
I also recommend people to learn virtualization before they learn cloud or docker, because everything is just simpler in that order.
The best way to describe virtualization is by comparing it to an emulator, i.e. a gaming console emulator. Just as you can emulate a gaming console on your PC, you can also "emulate" a hardware PC on your PC. Instead of entering a "virtual game cartridge" or configuring a game controller, you would configure your "emulated" virtual PC with a virtual CPU, some virtual RAM, some virtual storage and a virtual network card. And then you can enter a virtual USB-stick or virtual DVD and boot and then install your virtual PC with Linux or Microsoft Windows.
Why would anyone do this?
There are many benefits.
When you emulate something exotic compared to your PC CPU (like a game console CPU) you pay a hefty "emulation tax", meaning that your CPU can be 2-3 GHz and can barely emulate a game console of a few MHz. But when you virtualize a PC to run on top of another PC (same architecture) this tax comes down a lot, sometimes to only 1-2%. This means that you can have a bare metal PC running Linux, with a graphical environment upon which you run a web browser and at the same time you have your virtualization software with your little virtual PC. This small little virtual machine can also run Linux, but it can also run a completely different OS, as long as this guest OS inside the virtual machine is compatible with the PC architecture. This means that you can run Microsoft Windows inside your virtual machine and at the same time run Linux on the bare metal. A small virtual machine like this is often called/abbreviated a VM.
Instead of being limited of having one system, like this:
.----------------------------------------------------. | Web browser | Terminal program | Other Application | |-------------+------------------+-------------------| | Window Manager | |----------------------------------------------------| | X | |----------------------------------------------------| | OS: Linux | |----------------------------------------------------| | Bare metal PC hardware | '----------------------------------------------------'
You would instead have something like this:
.-------------------------. Linux on bare metal running | Windows Application | virtualization software |-------------------------| hosting a VM with MS Windows | Guest OS: MS Windows | as its guest OS |-------------------------| | Virtual Machine | .--------------------------------+-------------------------| | Linux Application: Web browser | Virtualization Software | |--------------------------------+-------------------------| | Window Manager | |----------------------------------------------------------| | X | |----------------------------------------------------------| | Host OS: Linux | |----------------------------------------------------------| | Bare metal PC hardware | '----------------------------------------------------------'
There are more benefits.
Just as many emulators have save states (snapshots), so does virtualization. You can install an OS on a VM, make sure it's fine and take a snapshot. After that you can experiment and destroy your virtual system, to see what happens and when you're done you can just revert to the last snapshot, as if nothing happened. You can even clone your VM and let the copies do different things. You can run several VMs at the same time, given that your host OS (the one that is running on the bare metal) has enough resources (hardware) to do this. On a desktop system you often only run 1-2 VMs at the time, because your machine can't handle more.
Another benefit is trying out different systems and servers. Since a VM is not physical in nature, it is not really bound by physical limitations. A bare metal PC can take minutes during startup or reboot, while a VM can do all of this in seconds. You don't need a physical USB-stick when you install your VM, you can just enter the ISO-file as if it was a virtual USB-stick, this saves minutes during the install process.
Just one warning.
Not everything is better being virtualized. While VMs are faster and more convenient to use, not all workloads do well being virtualized. Sometimes there can be weird and unusual bugs in software that are only seen when virtualized. When this is the case it will probably say so on the software homepage. The most known examples are real-time applications like gaming or almost anything involving audio and video. Also, forwarding GPU operations into a VM still has a long way to go. One good thing to think of is: If you're trying to do something that is hard on bare metal, it will be slower in a VM. You can of course game and use videoconferencing in a VM, but the "virtualization tax" is much much more than 1-2%.
So which virtualization software should you choose?
Short answer: VMware
Medium answer: Try all of them
Long answer: VMware
VMware Workstation is famous for a reason, it's been around for a long, long time and it has always had better guest OS support than everything else. If you want to be lazy and have as little problems as possible you should use VMware Workstation. However, the free version only lets you run one VM at the time.
While VMware Workstation uses Linux kernel modules that you have to add to the system, there are other, open source free alternatives like: KVM, Xen, VirtualBox, Qemu, etc. They're OK, well known, used by many and you can do a lot of good things with them. Huge cloud vendors like Amazon and Google have huge clusters running KVM and/or Xen, so it's as serious as it gets.
If you run VMs a lot, to the point of having like 20-50 of them and you might need them for work, you kind of come back to VMware, because of the better guest OS support. You realize that you don't have time to hunt down all these virtualization specific bugs, some of them only existing in VirtualBox and so on.
20-50 of them?
Yeah, let's go deeper down the rabbit hole... (because you don't run 20-50 VMs on your laptop)
In the field of virtualization, the virtualization software is referred to as a Hypervisor, it's the controller of the VMs. The machine that hosts the Hypervisor is usually referred to as a virtualization host. When the Hypervisor runs on top of an OS, it's called a "Type 2 Hypervisor".
There's also a "Type 1 Hypervisor", but it has very little to do with Linux. But it's waaay easier to learn "Type 1 Hypervisors" after you've learned Type 2 Hypervisors. And Type 2 Hypervisors are best learned when using Linux as the Host OS.
.--------------------------------. Type 2 Hypervisor | Guest OS | Guest OS | Guest OS | |----------|----------|----------| | VM | VM | VM | .---------------------------+--------------------------------| | Application | Application | Virtualization Software | |------------------------------------------------------------| | Graphical Environment | |------------------------------------------------------------| | Host OS: Linux or MS Windows or something else | |------------------------------------------------------------| | Bare metal PC hardware | '------------------------------------------------------------'
Type 1 Hypervisor .-------------------------------------------. | Guest OS | Guest OS | Guest OS | Guest OS | |----------|----------|----------|----------| | VM | VM | VM | VM | |-------------------------------------------| | Hypervisor: VMware or KVM or Xen or.. | |-------------------------------------------| | Bare metal PC hardware | '-------------------------------------------'
This may seem confusing at first, but in the case of the Type 1 Hypervisor, the Virtualization software runs straight on the bare metal. There's no other OS, there's no graphical environment and there are no other applications running.[*] The Hypervisor is controlled over the network, often via some WebUI served by the Hypervisor.
[*] Actually this is an oversimplification. There are some Type 1 Hypervisors that have a GUI available via display and keyboard, and the Hypervisor is running several apps to maintain its environment. But for the sake of architecture and a simple first explanation, I'm taking some liberties.
But why would you need a Type 1 Hypervisor?
Here's the cool part. Instead of having Linux installed on a bare metal server in a rack cabinet in a server room or data center, you can have many Linux VMs (with different versions of Linux if you wish) on a hypervisor on a bare metal server. It's quite common for a bare metal server to be under utilized, maybe it only serves a small webpage that almost no one visits. In these cases it makes sense to share the hardware with other uses.
Years ago, before the Type 1 Hypervisors (on PC), it was common for each big company to have a server room with servers. If you wanted your own entire server to configure as you liked, you'd have to rent a rack cabinet at a colo or rent a bare metal server at a colo/server rental provider. It wasn't cheap. But nowadays you can rent a VPS (Virtual Private Server), which is a product from the ISP and colo:s. Basically you're renting a VM prepared with Linux (or MS Windows, but it costs more) that sits on their servers, out there, on the Internet. You can control it via SSH like you would any other physical or virtual Linux machine. A VPS can be as cheap as a few dollars a month.
This is what the cloud is - someone else's server - already residing on the open Internet and you rent a VM or some space from them by the press of a button.
When you've reached the point that you've learned everything I've mentioned so far you will be able to:
You're now also primed for learning Docker.
Many try to learn docker earlier, but if you learn docker after you've mastered Linux, servers and virtualization, you will be able to understand docker better and where it fits into all of this.
Also, this is all I'm going to say about docker (in this article). Like many other topics mentioned, you have to search for the information yourself. The best place to start is the official documentation at docker docs, it's excellent.
What comes next?
"I want to learn everything about Linux and I want to learn everything I can do with it."
There are many things not yet mentioned that you'd do well to learn:
The best way to get better at Linux is to always use it when you're trying to reach a new goal. And that is what you will always need to get further, you need goals. It can be a small goal, something that you might learn within days or it can be a big goal, like getting a Linux job.
In my spare time I often sit in front of the computer. I've noticed that if I don't have a purpose I just end up on Reddit or YouTube. But when I have a purpose (like writing on this blog, or learning something new) there's a different feeling of contentment, the energy of that creative experience.
If you get stuck, don't give up!
Most likely you just need a new goal. To get good at Linux basically means that you're always trying to learn something, you're trying to do/create something you haven't done before. While Linux can be a good system for consumption, it's much more fun to use Linux as a creative tool. This is especially true if you're into understanding the Internet better.
I'm enclosing a small bucket list of sorts. It's like an ASCII mindmap of this article, explaining in which order it makes sense to learn things. It's of course not complete, but I think it's a good start.
The Learning Linux Roadmap (v1.0.0 20220107) ----.---------------------------------------------- | | |-- 1. Install Linux Desktop on a PC Laptop | | | | * Benefits of having a PC is that Full Disk Encryption | | is easy to set up. | | * Benefits of having a Laptop is that it is easy to carry | | home to friends or Hackathons. | | | |-- 1.1. Learn Linux CLI & X Windows | | | | | |-- 1.1.1. Learn how to install programs via GUI | | |-- 1.1.2. Learn how to install programs via CLI | | |-- 1.1.3. Install a program you need and use it daily | | |-- 1.1.4. Use your system for your daily tasks, surfing, etc | | '-- 1.1.5. Learn basic vi commands | | | |-- 1.2. Install games | | | | | | * The benefit of this is that you will have more fun | | | learning Linux. | | | * Also, learning how to get the GPU working in Linux is an | | | important skill to know. (Used in heavy computations.) | | | | | |-- 1.2.1. Install a game from the distribution's repository | | |-- 1.2.2. Manually download a game and get it working | | | (i.e. Minecraft Java Edition) | | '-- 1.2.3. Install Steam with full GPU acceleration | | | '-- 1.3. Install a Type 2 Hypervisor (VirtualBox or VMware Workstation) | | | |-- 1.3.1. Create a "Virtual Machine" (aka "VM") | |-- 1.3.2. Install Linux on the VM | '-- 1.3.3. Learn VM Snapshotting | | | |-- 2. Install Linux Server on a PC | | | | * Benefits of setting up a server on bare metal is to later | | appreciate having a Hypervisor. | | * Some things can only run on bare metal, i.e. a Type 1 Hypervisor. | | | |-- 2.1. Learn SSH | | | | | |-- 2.1.1. Learn how to verify SSH hostkeys | | |-- 2.1.2. Connect to your server with SSH | | |-- 2.1.3. Learn how to install (and use) your SSH key pair | | |-- 2.1.4. Learn ssh-config | | |-- 2.1.5. Learn scp / sftp | | '-- 2.1.6. Learn rsync | | | |-- 2.2. Learn Linux CLI | | | | | |-- 2.1.1 Learn how to install software via CLI | | '-- 2.1.2 Learn how to update the server with security patches | | | |-- 2.3. Setup a Web Server | | | | | |-- 2.3.1. Install the Web Server | | |-- 2.3.2. Create your own homepage | | |-- 2.3.3. Verify ports listening | | |-- 2.3.4. Learn how to set up https with manual keys | | | (Or maybe even how to do your own CA.) | | '-- 2.3.5. Learn how to set up https with "Let's Encrypt" | | | |-- 2.4. Setup a File Server | | | | | |-- 2.4.1. Install NFS | | '-- 2.4.2. Install Samba | | | |-- 2.5. Learn how to control the server via Ansible | | | | | |-- 2.5.1. Learn basic CLI commands and "oneliners" | | |-- 2.5.2. Learn how to make a basic playbook and run it | | |-- 2.5.3. Learn how to update and reboot the machine | | '-- 2.5.4. Learn how to install a specific service | | | '-- 2.6. Build a Router/Firewall | | | |-- 2.6.1. Learn Iptables / nftables / firewalld | |-- 2.6.2. Learn DHCP | '-- 2.6.3. Learn how to set up a DNS resolver | | | |-- 3. Install a Raspberry Pi | | | | * Benefits of this step is that you'll learn a new | | CPU Architecture. | | * Most Raspberry Pi builds are completely silent. | | * You'll also step into Embedded / IoT | | | |-- 3.1. Install and learn Raspberry Pi OS | | | | | |-- 3.1.1. Learn how to install programs via GUI | | |-- 3.1.2. Learn how to install programs via CLI | | |-- 3.1.3. Start learning Python | | '-- 3.1.4. Get a "breadboard" and some components: | | | diodes, resistors, buttons, jumper wires | | | | | '--184.108.40.206. Tinker with "physical computing" in Python | | | '-- 3.2. Install LibreELEC (you can use another SD card if you like) | | * The benefit of this step is to learn how Linux based | appliances are made. | | | |-- 4. Install a Type 1 Hypervisor on a PC | | | | * The benefit of this is to learn important datacenter skills. | | * You will also understand how the cloud is built. | | | |-- 4.1. Install VMware vSphere Hypervisor (aka VMware ESXi) | | | |-- 4.2. Create a "Virtual Machine" (aka "VM") | | | | | |-- 4.2.1. Install Linux on the VM | | '-- 4.2.2. Learn VM Snapshotting | | | '-- 4.3. Connect to your VM with SSH | | | |-- 4.3.1. Setup a Web Server on your VM | '-- 4.3.2. Make the VM reachable from the Internet | | | |-- 5. Get an account with a cloud provider (Vultr, AWS or similar) | | | |-- 5.1. Deploy a VM with Linux on it via WebUI | | | | | |-- 5.1.1. Learn how to verify SSH hostkeys at the cloud provider | | |-- 5.1.2. Connect to your VM with SSH | | |-- 5.1.3. Setup a (globally reachable) Web Server on the VM | | |-- 5.1.4. Now do the same but with proper HTTPS support | | '-- 5.1.5. Learn how you can get snapshotting and backup | | to work at the cloud provider | | | |-- 5.2. Deploy a VM with Linux on it via API/CLI | | | |-- 5.3. Deploy a Load Balancer in front of a Web Server on a VM | | | | | |-- 5.3.1. Setup a second VM, identical to the first | | |-- 5.3.2. Configure the Load Balancer to also send traffic | | | to your second VM | | '-- 5.3.3. Learn how Load Balancers and HTTPS interact | | | |-- 5.4. Learn DNS | | | | | |-- 5.4.1. Learn how DynDNS services work. (no-ip, DynDNS, | | | Amazon Route 53, Cloudflare) | | |-- 5.4.2. Buy a domain and set up a CNAME record pointing to a | | | server you own | | |-- 5.4.3. Install bind9 on two machines, with public IP-addresses | | | and change your domain to be hosted on these two new | | | nameservers. Learn how to use zone files | | |-- 5.4.4. Setup bind9 in your homelab and learn PTR records | | '-- 5.4.5. Learn the IPv6 side of DNS. Get it working completely | | without IPv4 | | | '-- 5.5. Learn Email | | | |-- 5.5.1. Learn how to set up your own SMTP server (postfix) | '-- 5.5.2. Learn how to set up your own IMAP server (dovecot) | | | |-- 6. Get acquainted with Docker... | | * If you know all the things in the roadmap above, then | understanding Docker will be much easier. | | | ----'----------------------------------------------------- Here's where the roadmap ends and the future begins...
download the roadmap as ascii
Some tips for the road
Seriously, learn programming in at least one language, Python is a good pick. It's modern, it's popular, it can be used for scripting and programming and if you want to work in this field it will get you far.
Don't use old deprecated commands and programs. Now and then you will encounter a different command that seemingly does what you're trying to do. When this happens try to find out if this new command is:
A: Just a wrapper program that your Linux distribution has.
B: A new program that replaces a well-known but now deprecated program.
If B, it's important that you learn the new way, because the old way has no future. The weird thing is that these old commands have a tendency of not going away. You will even encounter "experts" that stick to these old ways, eager to argue that there's no need to learn the "latest fad". The good news is that it's not hard to find out if a program has been deprecated. All you need to do is to google:
Important! Some programs that have been deprecated in the "Linux world" are still being used in other Unix systems. If they haven't been replaced there, then they're being maintained and extended to keep with modern requirements. Hence, their syntax can differ.
When you're new to something, you will get ideas of different ways of doing the things you're learning, that's only natural. Before you venture off trying your new ideas, at least once try to learn the current and common way of doing whatever task it is you're trying to learn. There are caveats and gotchas you need to learn, so you don't fail massively later on when you try your own way.
Don't be afraid to reinstall Linux. A lot of bugs and problems that occur after heavy experimentation with the configuration files can be cleared away with a new installation. When you're learning you will very likely reinstall many times. Just embrace this and get used to it. This will give you experience on what kind of configurations can be reversed and what kind of configurations risk destroying the installation.
I recommend you get some books, not many, but at least a few. I've mentioned above the O'Reilly books (specifically the Bash book and the SSH book). These can often be found discounted in their digital form at Humble. Basically get a book on what you're learning, i.e. Python. But only get a book if you're aiming to really learn a topic, deep diving into it, for weeks or months. Don't fool yourself that you need many books (or that you will read them all). What I mean is, don't get into this trap of: "I need to learn Python but first I need to buy all the books, which I can't afford until...". If you have friends around you who know Linux, they might be able to lend you books. If you're already working with computers, you might be able to get books from your workplace.
Get into the habit of making notes. Have pen and paper handy by your Linux machine, and/or always make sure you have a text editor open into a file of notes. You think you'll remember that rare command next week, but how can you be sure? The weird thing is that the longer people work in this field the more likely they are to take notes, that's if they want to become better at their expertise.
Even if you don't like vi (or vim) at least learn some basics on how to use it. You don't have to use vi, but vi exists in all Linux and Unix systems and sometimes it's the only editor available. If you know how to use vi you won't be backed up to a wall if you get into trouble in a text-only system.
Avoid sudo/root sloppiness. You should only be logged in as root if you really need to be root, which should be for a few minutes only. You can be "root for one single command" by using sudo, but you'll probably see others giving out a big sigh or a curse and then type sudo followed by something that lets them stay in sudo mode (effectively meaning, they logged in as root). This is a really bad habit and it's a sure path on how to make everything you touch insecure. You're not supposed to be logged in as admin for a reason, so whatever tells you that ignoring this reason and staying as admin will lead to anything good? I can preach for hours on this topic and everyone can tell stories on how they were root, typed a command wrong and deleted a database, wiped the only backup or took down the network. By avoiding this bad habit, you'll be a better technician.
If you work with IT, maybe as a coder, or sysadmin, or support technician, make sure to separate work projects and hobby projects. Don't do exactly the same thing at home, it will drain you. Do things with Linux in your spare time that you know wouldn't be allowed to do at work. I'm not talking about forbidden vs. allowed here, I'm talking about things you'd get paid for and things no one would pay for. I can learn a very specific server system at work and then at home I'm building a Linux gaming system. Two very different things but the knowledge gained will benefit other projects.
I once was able to save my workplace a lot of time because I realized I could rewire a fire alarm system, based on knowledge I had gained while tinkering with arcade machines. It's a tricky thing having the same interest as your vocation and hobby, so be careful so you don't "work" in your spare time.
Have fun and choose to do things that are fun, or at least something interesting and with a sense of achievement. Creating things with Linux and putting them online is a rewarding feeling. Also remember, it's ok to not be good at things. Enjoy the slower pace of learning at your own speed, without requirements, just for the sake of winding down.
I suggest you seriously ask yourself: Do you want to work professionally with Linux or do you want to keep it as a hobby? I'm not asking this to push you, but Linux is a sought after skill and the more you get into this field, the more often you will be asked this question. You might be better off knowing the answer to this question beforehand.
And remember, having Linux as a hobby (and nothing more) is perfectly fine, I'd argue that it might even be more fun that way. Whether you want to keep this as a hobby or if you want to be a serious professional, remember that it's OK to not be an expert. The reason why I (and many others) chose to also work with Linux is because we get to "play" with much bigger systems and create much bigger things.
Be generous with your knowledge. The Linux community was built on people teaching each other everything. You have more to gain by sharing what you've learned, even if it's something rare. It can be counterintuitive in a society where we are being drilled into competition, but consider this: If you share your knowledge, you will also learn what everyone else has learned. If you truly are the one in your group that knows the most, you will understand your own knowledge better when you're trying to explain it to others. When you're known in your community for sharing knowledge, others will seek you out "to trade" knowledge; not in a business manner but in a "How are you doing and what did you learn? I'm fine, I was doing this and then this happened..." and so on. A thriving community enriches everyone.
Avoid toxic people. A long time ago, when Linux knowledge was scarce and before books were printed, only hackers knew how to install Linux. Many of them "got high" on being condescending to others and did everything they could to scare new ones away. It was like hazing and if you could withstand their rituals then maybe they would help you install Slackware Linux. I'm so glad that there are alternatives today. You will of course still bump into toxic people like this today, but please ignore them. You will find other people who are friendly and will teach you (or point you in the right direction). But if you are wasting time with toxic people, how are you ever going to have time to find the nice people? Just say "pass" and move on, don't engage and don't worry about it. Toxic people are actually quite used to others saying "pass" and walking away, you wont hurt them.
Don't get into "the holy wars": Vim vs. Emacs, Windows vs. Linux, Debian vs. Proprietary, Linux vs. GNU/Linux and so on. It's a strange hobby spending time hating strangers who have different opinions. Enjoy that Linux can come in many forms and looks. Learning more about different ways of doing things and the different people who are in this community is fulfilling; spending time trying to change others is empty. I've spent many years hating Microsoft Windows but all that time spent hasn't taught me anything. Time spent on hating things is time wasted you could've spent learning other things you like better.
I understand if this article says "Linux is a lifestyle". It can be, but I want to just state that it doesn't have to be. While you can learn Linux well by "being into it" you can also gain a lot of this knowledge by simply viewing learning Linux like you would learn how to use a washing machine. This is not how I view learning Linux, but I'm just saying that you don't have to become someone else.
There are many books about many things, and everyone is always so keen on recommending books to others, and I sure haven't read most of them. What I'm trying to say is that I'm going to recommend some reading... My own reading tips are two books on computer history:
First I'd recommend Accidental Empires by Robert X. Cringely - [Amazon][Read for free]. It's about how Silicon Valley boomed in the 80ies, the history of Apple, Microsoft and many others. It was later made into a movie called Pirates of Silicon Valley and the movie is based on about 2% of the book. (I'd also like to point out that if you read this book, then the series Halt and Catch Fire will be electric magic for you, since the series is an alternate fiction timeline of true events of Silicon Valley.)
The second book is Just for Fun by Linus Torvalds, David Diamond - [Amazon]. It's about Linus' upbringing and how he created Linux. It's a good way for getting into the mindset of open source and how we went from expensive UNIX workstations to much cheaper (and more capable) Linux PCs. You'll understand that the open source community really is the friendly hippie part of the hacker world.
"Everything is hard in the beginning"
This was told to me by Mikko, a Finnish hacker I met on IRC in the 90's. He wrote me a long email, a step by step guide on how to install Slackware 3.1 on my Pentium 166 with 8MB ram. He happened to be in Stockholm for a day, so we met and I said that learning Linux was hard. He smiled and said "Everything is hard in the beginning" and meant that before you know something you feel that it is hard. These words have been with me since then, because it taught me that if you don't back down, no matter how hard something feels, eventually you will learn it. You will get past the beginning, you will get past feeling that it is hard.
I truly believe that anyone can learn anything. The only thing that differs is how we learn things (reading, hearing, viewing, doing) and how fast we learn (previous overlapping fields or completely different from everything we know). The only thing you need is motivation, that I really can't give you, you'll have to find that yourself. But if you are motivated, then sooner or later you'll gain the knowledge you seek.
Persistence beats talent every day.