An Introduction to Linux
Marcelo Barreto
Posted on July 20, 2020
From smartphones to cars, supercomputers and home appliances, home desktops to enterprise servers, the Linux operating system is everywhere.
This phrase can be intimidating or challenging, but don't let it make you afraid of learning more about this amazing operating system.
What is Linux
Linux is an Operating System like Windows, Mac OS, even Android which is powered by a Linux based image OS.
The OS is responsible to manage the hardware and software on a computer. It is composed by many pieces of software which I'll try to explain here.
It all starts at the Bootloader...
Bootloader
The Bootloader layer is responsible to manage the boot process of your computer, the process of turning your computer on, load the peripheral drivers. For us, it appears only to be a simple splash screen blinking with an image at the corner.
It starts to work after the computer's startup or boot process began with the BIOS (Basic Input / Output System) software on the motherboard. After the hardware initialization and checks were once done, the BIOS starts up the bootloader.
Just to make you familiar with some new names, the most famous bootloader is called GRUB.
Then it goes through the OS Kernel, but first, let me make some comparisons here:
Think on an OS like an engine, it is the part of a machine that makes the things running properly. If the engine is not working, the machine does not work well or even work.
The OS can be also compared to our brain, the device hardware is our members, but what makes our hands move is our brain. Ok, not exactly our brain but our nervous system. We can make another comparison here and our nervous system can be compared with the OS Kernel.
Kernel
The Kernel is the part responsible to deal with every hardware component and make the communication between hardware and software.
The Kernel is responsible for memory, process, and file management.
Dealing with I/O (input/output) devices, the Kernel needs to understand if you are using a wired or wireless network connection, or if you are using a USB mouse or a touchpad device.
And how Kernel deals with RAM (Random-Access Memory)?
The RAM is used to store program instructions and data, like variables for example. Often multiple programs will try to access the memory, most of the time always demanding more memory than the device has available. The Kernel is responsible for deciding which piece of this memory those processes can use, and choosing what to do when no memory was left.
Init System
The Init System layer assumes the job of finishing the start of the computer after the hands-over with the Bootloader occurs.
It is the init system that manages the boot process, once the initial booting is handed over from the bootloader. A curious fact for those with are familiar with Linux, is that if you run a command at your terminal to see all processes running with ps aux
, you'll notice that the first process running is the init system
with a PID (process id) of 1.
Daemons
The Daemons are background services, they can start right after the boot process, or even when you log your user in at your laptop. It's on this layer that you can choose what applications you want to be loaded with your computer or not. You can simply run a command to enable/unable a daemon to be started.
They manage many parts of the system on things like when you insert or remove a device, managing user login, or managing your internet connection with a system window where you can connect to a real wi-fi router filling the password for example.
Graphical Server
But this example of open a window pop-up asking for connects with my home's wifi network wouldn't be possible without the Graphical Server Layer.
The Graphical Server is known as X Server or simply X.
This layer is responsible for drawing and moving windows on our device and interact with our mouse and keyboard.
Desktop Environment
Very attached to the Graphical Server Layer comes the Desktop Environment Layer which you will be interacting with. Is here where you choose the system UI on options like XFCE, KDE, Gnome, Cinnamon, and others. Every Desktop Environment has its owns built-in applications like a default browser, file manager, tools, and UI.
Applications
Finally the last layer, the Applications Layer!
This layer is easy to understand, is where our applications are! Yes, it is but has more than just some apps like Google Chrome or your favorite code editor. All of our development libs are here too, things like git
, curl
, bash
, any of your programming languages interpreters or compilers.
Nowadays many Linux Distros already count with a Software Center where you can simply open the application, search for some term you want, and install an application with a single click on the download button. Linux is being easier and more friendly to new users through time.
Why use Linux
Why bother me on learning to use a new OS from scratch when we have some most friendly OS to use like Windows and macOS? I'll try to convince you talking about some experiences that I had in my career.
To start, Linux is free, you don't have to pay for it. You don't have to put your privacy and security on the side trying to use an unlocked Windows version. Now imagine that you have a company and each of your employees needs to be a paid version of Windows? How much this will be leaving from the company account?
The thing that always me like Linux most...
Linux is like ice cream! You can choose whatever flavor you like most. There is a flavor for every taste.
You can choose to use the most famous Linux distro in the world, you better choose Ubuntu. But if you like a more friendly and beautiful UI's yet, you can choose distros like Deepin or ElementaryOS. Or if you just want a stable system you probably will choose Debian. You can want to feel like a hacker using Kali Linux, but don't fool yourself, a distro does not make you a hacker. You maybe want to try something new and give it a chance to MX Linux which is on the most downloaded Linux distros lately. You can check the list here on DistroWatch
My favorite flavor always was Mint, in that case, Linux Mint called my attention and became my favorite Linux distribution.
The second point: Are you really satisfied with your operating system? Can you trust on it without any anti-virus paid software? Is it starting to be slowing down with the time you use? Is your OS crashing without any reason?
Since I've started to use Linux as my preferred OS, I'd never had a headache with this kind of problem anymore. Linux was evolved to be the most secure OS on the planet and you don't have to pay for using that.
And when you want to become a programmer, it makes your life easier. All the extensions and libs you need already been compiled into an apt package and you just need to run a simple command to run your application without having to create some workaround.
Advice for beginners
I see many of my friends fearing Linux and I don't know if they are afraid of putting fire on their computer or if like Linux will destroy their entire network. Calm down, Linux is not your enemy. If you are not confident with adopting any of the thousands of Linux distributions as your primary operating system, you can try it as Virtual Machine. Any change on this VM will be scoped to its hard drive, which is a single file on your computer. It means you don't have to be afraid to do whatever you want with it. Try to have fun, customize the panels, run some commands directly from the Terminal, even like mkdir
, ls
, cd
. Just try to enjoy the ride
Last thoughts
Linux always will be a good OS choice thinking of security, productivity, and learning more about programming.
My idea here was to share some personal insights and had to admit that was trying to learn more about Linux in the detail, and start to write this down made all the things present here to stay more clear at my head. I hope that all things here were clear to you too.
References
Credits
Thanks to Kevin Horvat for sharing his work on Unsplash and Wolfgang Kaehler/LightRocket on Getty Images.
Posted on July 20, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.