What is Linux ? 🤔
Tags: linux, bash, ubuntu, codenewbie
Published: 2021-06-26 15:37:14

I have recently started learning Linux and so I decided to document my journey along the way, so I would be writing a Blog series where I will cover everything that I have learned.

The entire content credits goes to my instructor **[Brian Holt](https://twitter.com/holtbt)**.

So without further ado, let's get on with todays blog.

## Let’s get started with a little bit of backstory about Linux 👨‍🏫

![backstory](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d70qfbzl5niz7v5kj6s4.jpg)

To learn about how Linux came to be, let’s go back to the beginning to 1969 where Ken Thompson and Dennis Ritchie of Bell Laboratories developed the UNIX operating system. It was later rewritten in C to make it more portable and eventually became a widely used operating system.

A decade or so later, Richard Stallman started working on the GNU (GNU is Not UNIX) project, the GNU kernel called Hurd, which unfortunately never came to completion. The GNU General Public License (GPL), a free software license, was also created as a result of this.

The kernel is the most important piece in the operating system. It allows the hardware to talk to the software. It also does a whole lot of other cool things. For now, just know that the kernel controls pretty much everything that happens on your system.

During this time other efforts such as BSD, MINIX, etc. were developed to be UNIX like-systems. However, one thing that all these UNIX like-systems had in common was the lack of a unified kernel.

Then in 1991, a young fellow named Linus Torvalds started developing what we now know today as the Linux kernel.

**If at this you are wondering why I am giving you a history lesson, its because, I think it's useful to know why something was created to understand what problems it can solve for you.**

Let's talk a bit more about UNIX so that we can understand UNIX like-systems better.

## UNIX

![unix](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8l814vtlzw3qzfwvlvv0.png)

Linux is considered a Unix-like operating system which basically means that Linux derives heavy inspiration from Unix without actually conforming to be a full Unix operating system. macOS and FreeBSD would be two more examples of a Unix-like operating system.

Unix was created in the 70s and has pretty much inspired every operating system created since then. Nearly everything you're going to learn today was originated in Unix itself. A big part of Unix software is the idea of the **[Unix philosophy](https://en.wikipedia.org/wiki/Unix_philosophy)** which is a sort of digital minimalism when it comes to coding. The idea is instead of having a few very specialized tools (or programs) we should have many small, composable tools that we can use to compose to solve larger problems. The influence of this is still felt and talked about today.

### Here's what they originally wrote:

* Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new "features".

* Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don't insist on interactive input.

* Design and build software, even operating systems, to be tried early, ideally within weeks. Don't hesitate to throw away the clumsy parts and rebuild them.

* Use tools in preference to unskilled help to lighten a programming task, even if you have to detour to build the tools and expect to throw some of them out after you've finished using them.

## Linux

![penguin](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5cfn8xueofhpz4s5wivz.jpeg)

Linux isn't directly Unix, just directly inspired by it, and incorporates many of its ideas and interfaces into it. It was created in 1991 by Linus Torvalds who is still an influential figure today and still runs the Linux project. He created Linux because at the time there was no single free, open-source reimplementation of the Unix operating system (the BSD kernel wasn't yet available yet) so he wrote his own kernel which became known as the Linux kernel.

From here the project took off and was adopted far and wide. (As of writing) all of the top 500 super computers run on Linux, much of the mobile phone market share (thanks to Android being based on Linux), and many of the servers running your favorite websites. Suffice to say, Linux is incredibly important to the modern computing world.

**TIME has come to answer the most important Question**

## Why Linux 🤔

So why Linux over other operating systems?

First, it's free. Anyone can use Linux to do anything without paying anyone a dime. This is useful for college students who don't have any money but it's also critical for large businesses running thousands or tens-of-thousands of servers. It can save them millions of dollars to not have to pay for an operating system.

It's very well maintained. Because Linux is such a popular operating system, it has a lot of eyes on it. Engineers from all over the world and all over the industry are constantly contributing fixes and new features to Linux, both on their own free time and during the course of their jobs.

It runs just about anywhere. Linux not only runs on x86 (the Intel / AMD processor architecture your computer is likely using) but it runs on Internet-of-Things devices, phones, fridges, cars, etc. If it has a processor in it, chances are you can get Linux running on it already.

Most of the the things you need already exist for it. Linux already has many of the tools one would need to run servers, devices, media, etc. all on it already, meaning you wouldn't need to create it. Linux has a rich ecosystem of programs available that are also likely free.

The knowledgebase for Linux is enormous. Having a problem? Chances are someone else already had the same problem and you can find the solution on StackOverflow or someone's blog. Because the knowledgebase is so large, it's really easy to hire someone with deep knowledge of Linux and for you it's profitable to learn Linux because so many jobs demand the skillset.

At its core, Linux is the kernel. Anything based on this Linux kernel is a considered a Linux distribution, or distro for short.

## Choosing a Linux Distribution 🤯

We learned about the Linux kernel which powers millions of devices a day.

One thing before we move forward, the term Linux is actually quite a misnomer, since it actually refers to the Linux kernel. However, many distributions use the Linux kernel so therefore are commonly known as Linux operating systems.

### A Linux system is divided into three main parts:

* Hardware - This includes all the hardware that your system runs on as well as memory, CPU, disks, etc.

* Linux Kernel - As we discussed above, the kernel is the core of the operating system. It manages the hardware and tells it how to interact with the system.

* User Space - This is where users like yourself will be directly interacting with the system.

So the first step we’ll need to take is to install Linux on your machine.

### There are many Linux distributions to choose from, we’ll just go over the most popular options.

* [Debian](https://www.debian.org/)

![debian](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fmy03aykdh0avk7b0fp1.jpeg)

Debian is an overall great operating system for any platform.

* [Ubuntu](https://ubuntu.com/)

![ubuntu](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/55q4nm1g0dwx8v0u59au.png)

Great for any platform, desktop, laptop and server.

* [Linux Mint](https://linuxmint.com/)

![mint](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9bmgiy52mw53ig1qidzq.jpg)

Great for desktop and laptop

* [Red Hat Enterprise Linux](https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux)

![redhat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/994340da4exxm3dxyrnc.png)

As described by the name it's mostly used in enterprise, so if you need a solid server OS this would be a good one.

* [Arch Linux](https://archlinux.org/)

![arch](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eny55xgn0hnfij3mmp6k.png)

Great for desktop and laptop. If you also have a small device such as a Raspberry Pi and need to stick a lightweight OS on it, you can’t go wrong with Arch.

#### Few more popular ones:

* [Kali](https://www.kali.org/)

* [Alpine](https://www.alpinelinux.org/)

* [CentOS](https://www.centos.org/)

* [Gentoo](https://www.gentoo.org/)

* [Fedora](https://getfedora.org/)

* [openSUSE](https://software.opensuse.org/)

## Let's Run Linux 😎

So, enough chit-chat, let's run Linux!!

Which operating system are you using right now?

If you're using a desktop running Linux of some variety, you're already set.

For Windows and MacOS users we have some options:

### Virtualization

We're going to running our Linux through a process call virtualization. We'll be running a virtual machine which is frequently abbreviated as VMs. VMs are an operating system running within another operating system, called the host machine. The host machine will create a virtual environment with virtual access to its hardware to the VM. The VM will have no idea that it's not actually running on real hardware; all it can see is the resources that the host is providing it.

I'll give you several options so you can do what's best fit for you.

### For either macOS or Windows: [Multipass](https://multipass.run/)

Multipass is a great new tool from the folks at Canonical (who make Ubuntu). It's a super easy way to spin up and spin down little VMs to try things out. You can even spin up multiple and play with them together. I'd recommend this for most users of macOS and Windows since it just sort of works without a lot of effort and you don't have to install everything yourself.

**If you are on Windows 10 Home** you need to install [VirtualBox](https://www.virtualbox.org/) too in addition to Multipass.

Multipass will use VirtualBox if it can't use **Microsoft Hyper-V** (a feature only available in Windows 10 Pro.) If you are on MacOS or Windows 10 Pro, you do not need VirtualBox.

* [Here are the Windows 10 instructions](https://multipass.run/docs/installing-on-windows)

* [Here are the MacOS instructions](https://multipass.run/docs/installing-on-macos)

Once you have Multipass installed, you should be able to run it and open a new shell.

You should be here. It has you logged in as the user "ubuntu" who has password less root privileges.

![multipass](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4zgdgbdaboz9peg4w2a9.png)

### For either macOS or Windows: [VirtualBox](https://www.virtualbox.org/)

Oracle makes a product called VirtualBox. VirtualBox is a hosted hypervisor which is another way of saying that this is a program that allows you to run VMs. It can run Windows, Linux, macOS, and many other VMs.

You'll need to download VirtualBox and you'll need to download the [Ubuntu Server Installer](https://ubuntu.com/download/server) as well and go through the whole process.

It bears mentioning that VirtualBox isn't the only option. [VMWare Fusion](https://www.vmware.com/products/fusion.html) and [Parallels](https://www.parallels.com/) (macOS only) are two great options too. They just aren't **FREE**.

Here is a [YouTube Video](https://www.youtube.com/watch?v=x5MhydijWmc&t=758s) I found useful while installing Ubuntu on my Windows 10 VirtualBox. 

{% youtube x5MhydijWmc %}

### For Windows Users: [WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10#update-to-wsl-2)

If you're a Windows 10 user, you can install and use WSL. I'd strongly recommend installing WSL2. It allows you to run Linux natively inside of Windows.

#### At this point, you should have a shell prompt ready to go so we can start learning Linux.

## Bonus

Many people (me included) worship 🙏 [Linus Torvalds](https://en.wikipedia.org/wiki/Linus_Torvalds) and I encourage you to find out more about him and how Linux came to be and how that led to Git being developed. **Yes!** you read it right, this man was the mind behind Git as well, and now you know why I worship him.

Here is a great [Ted Talk](https://www.youtube.com/watch?v=o8NPllzkFhE&t=15s) that you should listen to.

{% youtube o8NPllzkFhE %}

## What’s my favorite Linux Distro ?

Glad you asked.

I LOVE Ubuntu. It’s the first Linux distro I ever downloaded and I have no regrets.

It's a very good choice for many different use cases. In my opinion, it's the best general purpose distro overall.

Ubuntu is a very polished (when I say polished I mean it has a nice interface) distro of Linux which I think it is the easiest to use. It's backed a company called Canonical who puts a lot of love into the distro and they're definitely one of my favorite companies.

Ubuntu is a great choice for running Linux on as your main OS (I don't), for servers in the cloud, for IoT, or for any other of myriad things. It's a really great, flexible distribution.

## What do you think are the best Linux Distros? 

Let me know in the comments!

### If you liked my content consider following me on [Twitter](https://twitter.com/cenacr007_harsh)

I hope you found this article valuable. If yes do let me know in the comments 😊

Also if you got any question feel free to ping me on Twitter.

## Thank You!