DEV Community

Cover image for An Introduction to Linux
Marcelo Barreto
Marcelo Barreto

Posted on • Edited on

An Introduction to Linux

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.

Thanks to Kevin Horvat for sharing their work on Unsplash.

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.

Top comments (21)

Collapse
 
makampos profile image
Matheus de Campos

Great article dear Marcelo. I am newbie with Linux, but I really like to try to use Linux for a month maybe.
On the DistroWatch I see the ElementaryOS in the seven positon on the last month.

Let me ask you something. What the distro needs to be on the top of the rank ?
I see a lot of distro, why ?

Collapse
 
marcelobarreto profile image
Marcelo Barreto

Hi Matheus, the DistroWatch counts each HPD (hit per day) what means that it counts the time that someone tried to downloaded that distro.

But don't let this make you choose a distro for you, I do recommend that you choose the one who fits best for you. I'm currently using ElementaryOS.

Thanks for reading!

Collapse
 
makampos profile image
Matheus de Campos

Well, ElementyOS have a such a nice design, clean and simple.
Your recommend Linux for building software? Actually I am migration from Dotnet framework to Dotnet Core, and I think is the moment to try other OS, like a Linux.

Thread Thread
 
marcelobarreto profile image
Marcelo Barreto

Yes, I do recommend Linux for building software. But if you are very familiar with Windows, you can install Windows Subsystem for Linux (WSL) and give it a try. You'll be learning Linux anyway (besides I recommend Linux for most people, you are the person who knows your reality and can choose better than me).

Thread Thread
 
makampos profile image
Matheus de Campos

Ok, done. Thank you for your service sr.

Thread Thread
 
marcelobarreto profile image
Marcelo Barreto

o>

Collapse
 
nitinreddy3 profile image
Nitin Reddy

Ubuntu, a first choice

Collapse
 
richytong profile image
Richard Tong

Fantastic intro to Linux. Just checked, my process with pid 1 is indeed the init system.

Linux is like ice cream! You can choose whatever flavor you like most. There is a flavor for every taste.

This is my biggest reason for choosing Linux. I have to have everything exactly the way I like it, so I went with Arch. So far so good, even when I spend a day debugging wifi. Basically all I wanted to say is I use Arch btw.

Collapse
 
marcelobarreto profile image
Marcelo Barreto

Arch Linux rocks :D

Collapse
 
mccurcio profile image
Matt Curcio

Thanks for the tour!
I used Linux Mint for a long time than recently switched to XUbuntu. (Although I am not sure why I switched.) I have been using Linux for some 10 yrs now. Can't live without it! ;))

Collapse
 
marcelobarreto profile image
Marcelo Barreto

Yeah, when you learn to use Linux, you have some difficult to switch back to another OS. I've tried to use Windows with WSL and I can hold for one complete day hahaha

Collapse
 
manishfoodtechs profile image
manish srivastava

I am not newbie to Linux but this article is very nice

Collapse
 
marcelobarreto profile image
Marcelo Barreto

Hey, thanks for your comment, it made my day :D

Collapse
 
amgauna profile image
Ana Mercedes Gauna

I've been using MX Linux for a few days, but I'm really enjoying it, in the MX Linux terminal I used the commands: sudo apt update and then I said yes to his installation question, then I used the command sudo apt upgrade and then I said yes to the installation question, it took almost 4 hours to finish installing all the updates, then I restarted the notebook, and it is up to date and working perfect.

Collapse
 
marcelobarreto profile image
Marcelo Barreto

Hey, it can depends of the image you have downloaded and your connection with the packages mirror, maybe you can try to change to a fastest/closest one, generally I change for the ones that are in Brazil (the country that I live) so the connection is faster and the upgrades takes less time to complete.

Collapse
 
bobbyiliev profile image
Bobby Iliev

Great post! Well done!

Collapse
 
marcelobarreto profile image
Marcelo Barreto

Hey Bobby, thanks! Happy that you liked it.

Collapse
 
emtes profile image
Enmanuel de la Nuez

Well said!

Collapse
 
marcelobarreto profile image
Marcelo Barreto

Thanks!

Collapse
 
nitinreddy3 profile image
Nitin Reddy

In this age of buggy windows updates, devs should move to linux / Unix OS.

Collapse
 
hafu_ilustra profile image
✨ Hafu ✨

👏👏👏