📌A Beginner's Guide to Linux

📌A Beginner's Guide to Linux

As moving ahead to our jouney to become a great DevOps engineer, Now in this article will learn about the LINUX. so let's start🧑‍💻

🎯Operating System

Every Computer System consists of hardware, system programs, Application programs, users and operating system. Hardware consists of CPU, ALU, I/O devices, Disks, Memory. The System Programs consists of Shells, Editors, Compilers, etc. An Application Programs consists of Compilers, Databases, Games, Video player, Browsers, etc, and the users are those which are using the computer.

An Operating System(OS) is used to coordinates between users of computers and computer hardware. We as a user interacts with system, it recognises the input and accordingly outputs the requests. The purpose of an OS to provide an environment in which user can make it feasible for performing the tasks, error fixing , coding, tracking modifications etc. Examples Windows, GNU/LINUX, macOS. etc

OS can be accessed through 2 phase:- 1. Command Line Interface(CLI) 2. Graphical User Interface(GUI)

🎯Characteristics of Operating System

  • Virtualization

  • security

  • Process Management

  • Memory Management any many more.

🎯A Breif History

Linux was created in the early 1991s by Linus Torvalds, a student from the University of Helsinki. when he desired to learn LINUX, that time it was costed him very high. So he started getting idea of code by seeing the code of UNIX. And finally developed an OS Linux with a base as a system similar to MINIX, a UNIX-like operating system(developed by professor Andrew Tanenbaum).

🎯Architecture of Linux

As an user we used to think Linux is an Operating System but technically it's a Kernel. It is not an UNIX derivative, written from scratch.

Linux distributions is the linux kernel + collections of software that together creates an Operating System.

To understand the architecture of Linux, lets look the model below👇

In Linux Architecture, the user interacts with shell which act as an interface to get commands from the user. And kernel sits on top of the hardware and gives the user the ability to communicate and use the hardware.

What is Kernel?

A Kernel is the heart of an operating system and it manages everything in the system. It manages memory of computer, decides priorities of processes, Cpu time and other task.

Linux Kernel helps the user to communicate with the hardware.

what is shell?

Shell is an interface between user and kernel. When we enter the commands through the keyboard , it collects input from the user and executes programs based on that commands.

Shell is categorized into two:-

  1. Command Line Interface

  2. Graphical Shell

Types of Shell

  1. Bourne Shell(sh) - The Bourne shell is the default shell in the terminal.

  2. The C Shell(csh)

  3. The Korn Shell(ksh)

  4. GNU Bourne-again Shell also known as bash.

  5. The Z Shell (zsh) . etc...

🎯What is LINUX?🤔

Linux is an open source software as signifies it can be downloaded at its entirety from the internet completely for free.

🎯Which distribution should I install?🤔

Generally When you asked, every Linux user will say that the best distribution is the specific version he/she is using. There are hundreds or maybe thousands of distributions out there like Ubuntu, CentOS, Fedora, Kali Linux, Linux Mint, Linux Lite, Elementary OS . etc.

So which one should you choose? Don't worry too much about that:🤔🤔🤔🤔

As Linux is an open source software with freely available source code, allowing many developers to work and create their own versions known as flavours based on Linux. Each distribution contain more or less same set of basic packages like tool, file manager, software, utilities and many more. For example,

  1. Ubuntu:- Simple, customized, Debian based with a GNOME/KDE desktop environment.

  2. Fedora:- Based on Redhat, this distribution is more focused on providing more frequent updates. Debian is awesome, but fedora is stable + also gives faster updates compared to Debian.

  3. Linux Mint:- easy, comfortable, beginner's friendly based on Ubuntu. Its default desktop environment is Cinnamon which is a fork of GNOME.

  4. Arch Linux:- Arch Linux is a lightweight and very flexible Linux distribution that is designed for experienced users. And even the updates are constantly being made available.

    ..............................................many more...............................................................

Prior to installation, the most important factor to keep in you mind is your hardware. Since every Linux distribution contains the basic packages,tools, utilities, so you only need to consider if the distribution will run on your hardware.

🎯Reasons to use Linux

  1. Open Source :- An operating system with No registration fees, no costs per user, free simplified updates for all installed softwares and freely available source code in order to modify and use according to the user's wish.

  2. Security :- Linux is secure and versatile as it is less prone to viruses than other operating system. if let'say a virus is attack on a folder in Linux then that virus will be limited to that folder only and will not spread all over the system. But on the other side in case of windows once you got virus then it spread all over the system.

  3. Stability :- Linux is by far the most stable operating system ever created. It keeps on running without rebooting and crashing, resulting in higher availability during busier periods and the ability to run for long periods of time without issues.

  4. Customizable :- Linux is far ahead of windows in respect of customizability. It allows developers to customize their operating system according to their needs. With a wide range of desktop environments, packages, tools and software options available, developers have more control over their computing environment.

🎯The Role of Linux in DevOps

DevOps is more than just a technical approach or a set of best cultural practises and constant evaluation to create an effective development environment. Its just a way of thinking – it doesn’t mandate any specific technologies.

Devops engineer are people who perform linux tasks such as

  • Creating and editing files

  • how to automate deployment of applications,

  • how to install and configure the servers, network connections and firewalls.

  • Managing users, groups and permissions

  • Monitoring programs and processes.

🎯Create an AWS account

  • Go to https://signin.aws.amazon.com/ in a web browser. Sign-in as "root user" and provide the email address..

    • Root User is an Admin user who has all the permissions to perform the operations inside aws.

    • Click on "Next" and create a strong password and click on "Sign -in".

    • To verify your account, you need to pass through the security check by entering the characters. And even they verify through your phne number. Once done click on "Submit". you're almost done.

    • At the end they will ask you to provide credit/debit card details and charged you 2 rupees(refunded later in your account) for further confirmations of your account .

    • Congratulations! You have successfully created your free AWS account.🥳🥳

🎯Setting up an EC2 instance

As AWS is a cloud provider which provide the services and in order to perform the various Linux operations we need one instance which is provided by EC2 services.

Think🤔 EC2 is just like your computer terminal where you can perform operations.

  1. Click on "EC2" services, a page will open up then click on "instances(running)"

  2. Click on "Launch instance" at the top right corner of the page. a page will get opens up in order to take the details for your instance like "name for an instance", "number of intances required to perform the tasks", "key-pair", "OS images" and many more.

    a. Provide the name for your instance.

b. Select the OS images, as the account is free -tier, so select the free-tier images(eg;- ubuntu, RedHat .etc)

c. Select key pair, so lets create a key pair, provide the name of your key pair and select the default options. And click on "Create key pair".

SSH key pair is needed to access these virtual instances from anywhere and from any machine. As soon as we create key pair, one key pair will get downloaded on your system.

Here .pem file is for operating system with SSH and .ppk file is only for windows

d. For networking, Select the default options provided.

e. For storage part, select root volume of 8 GiB of type gp2.

So at last in "Summary" options you will see all details about your instances. And then click on " Launch instance".

Congratulations Your instances is launched

🎯Conclusion

Though we came to end of this article and I hope this article has helped you to understand the about Linux. The journey is started to dive into the devops field. So stay tuned for the next article.