Linux Series: Bash Programming & Operating Systems (Part - 1)

Muhammad Noorani

Web Developer
Content Writer
Technical Writer

Overview

In this guide, I will walk you through the basics of Linux. If you are new to Linux and unsure about its origins and purpose, this blog will provide you with a comprehensive overview.
If you're not sure how to install Linux on your system, don't worry! There are multiple ways to use Linux even if you're currently using Windows as your operating system.
Be sure to check out my step-by-step guide on installing Linux within Windows. Here's the link for easy access: Blog Link

What Happens When you start your computer?

Now, you pressed the button to start your pc/Laptop,

What is an Operating System?

Operating System is Software to manage and operate a Computer Device.
It acts as a bridge between the computer hardware and the applications that run on the computer.
Now, software needs to pass these conditions to be considered an Operating System:

What is a File System?

A file system is a method or data structure used by the operating system to store, organize, and retrieve data on a storage device such as a hard drive or solid-state drive.
The file system defines how the data is organized and stored on the storage device and provides a set of rules for accessing and retrieving the data.
In today's time our computers are very fast, any file that we want to open. It does not take much time to find the file we are looking for.

What is a Kernel?

A kernel is any core of any Operating System. It manages the communication between hardware and software components.
It has complete control over everything in the system. It can control the memory and the CPU time of any software that is out there.

Windows vs Linux, Why use Linux?

First going into the comparison, let's see the types of Operating Systems(Famous):
MacOS and Linux are pretty similar as they both are UnIx Based.
Windows has some similarities with Unix but is a proprietary Operating System, it has some components that are Unix-based but majorly it is derived from other Operating Systems but it remains a distinct and separate operating system from Unix.
That is why developers prefer using either Linux or MacOS.

Why Use Linux?

Open Source
Terminal
Easier to get things done

History of Linux

In 1969, two developers namely one was Ken Thompson and Dennis Ritchie.
If you know C language already, then you must be familiar with Dennis Ritchie.
In the late 1960s, Ken Thompson and Dennis Ritchie developed Unix while working at Bell Labs. In the 1970s, the entire Operating System was rewritten in C language to make it more portable, and Unix soon became a widely used operating system.
This is how the first Unix-based operating system came into the picture.
In 1983, Richard Stallman started the GNU project to create a free and open-source operating system. Other operating systems like BSD, MINIX, etc. were also developed around this time.
However, all of these operating systems lacked a unified kernel.
In 1991, Linus Torvalds started working on the Linux kernel, which became the unified kernel for all distributions of Linux.
Linus Torvalds is now known as the "Father of Linux."

Linux Distributions (Which one to choose?)

All the Linux distributions that are there, use the Linux Kernel, which Linus Torvalds developed in 1991.
There are so many distributions of Linux, but in my opinion, Ubuntu is the best blend between a GUI(Graphic User Interface) and CLI(Command Line Interface). That is why I shifted from Windows to Linux Operating System.

You can find me on these platforms 🤝 :

Subscribe to my newsletter

Read articles from Muhammad Noorani directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Did you find this article valuable?

Support Muhammad Noorani by becoming a sponsor. Any amount is appreciated!

Overview

Welcome to part 2 of our Linux Fundamentals series! In this section, we will be exploring Ubuntu, one of the most popular Linux distributions.
Throughout this part, we will be diving into the command line interface, a powerful tool that allows you to interact with the system using text commands.
We'll be covering some of the most useful and commonly used commands in Linux, helping you to build your knowledge and confidence.

Starting the Terminal

What Is A Terminal?
What Is A Shell?
Bash Programming
Shell Format

Structure and Tree Hierarchy of Directory 📁

Let's understand this with images,
Now, visually you are familiar with the Structure and Tree Hierarchy of Directory.

Exploring Commands 💻

First, let's print "Hello World" into the console using Bash.
Relative Path and Absolute Path- Relative path specifies the location of a file or directory relative to the current working directory, whereas an absolute path specifies the exact location of a file or directory from the root directory.
Let's start exploring.
example: whatis ls ls(1) - list directory contents

Flags 🏴

In Bash, flags are also referred to as options or switches. They are additional parameters that can be passed to a command to modify its behavior.
Let's see some Flags::
. : This flag represents the current directory.
.. : This flag represents the parent directory of the current directory. It is often used to move up one level in the directory hierarchy. For example, cd .. would move the user up one level in the directory hierarchy.
~ : This flag represents the user's home directory. It is often used to refer to the home directory of the current user.
- : This flag represents the previous directory. It is often used to quickly switch between two directories.
/ : This flag represents the root directory of the file system. It is often used to refer to the top-level directory in the file system hierarchy.

You can find me on these platforms 🤝 :

Subscribe to my newsletter

Read articles from Muhammad Noorani directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Did you find this article valuable?

Support Muhammad Noorani by becoming a sponsor. Any amount is appreciated!
Partner With Muhammad
View Services

More Projects by Muhammad