Getting Started With Linux: A Beginner’s Primer (Part-1)

Author: Ayush Maggo

Operating System: An operating system is a software program that manages computer hardware and resources, such as CPU, memory, and storage. It acts as an intermediary between all of your software (user applications) and the computer hardware, enabling them to interact with each other.

What is Linux?

Linux is a kind of operating system, similar to Windows and MacOS. It is an open-source operating system. Linux is developed by Linus Torvalds and thousands of open source contributors. Linux follows the architecture of Unix. It is well-known for its security, flexibility, and stability.

Why do we use Linux?
  • Linux is an open-source operating system.
  • Linux is freely available.
  • It has a strong community, and a significant percentage of servers run on Linux.
  • Most developers use Linux.
  • Linux supports multi-user and multi-tasking.
  • In terms of security, Linux boasts a wide range of distributions that are continuously growing. Renowned distributions such as Ubuntu, Debian, and CentOS consistently receive updates, making it extremely challenging to develop a virus that can effectively target the entire Linux ecosystem due to its constantly evolving nature.
  • Linux is reliable.
Flavors of Linux:

“Flavors of Linux” refers to the distribution of Linux. Since the Linux Kernel is free to use and modify, anyone can utilize it to create their own distribution. You have the freedom to create your own distribution.

Below are some popular flavors of Linux:

RHEL (Red Hat Enterprise Linux), CentOS, Ubuntu, Amazon Linux, Fedora, Linux Mint, OpenSUSE, Manjaro.

Linux is widely used in industries due to its strong community support.

Linux Architecture

The Linux architecture refers to the underlying structure and design principles of the Linux operating system.

  • Hardware is controlled by the Kernel.
  • The Kernel is the heart of Linux. 
  • The Linux Kernel is the core component of the operating system.
How to communicate with the Kernel?

We can communicate with the kernel using the shell. The shell serves as the medium for communication.

Shell: The shell is the command-line interpreter in Linux. It serves as an interface between the user and the kernel, executing various commands. For instance, when a user enters “ls,” the shell executes the “ls” command. Additionally, the shell can run other programs, including applications, scripts, and user programs written in languages such as C or the shell programming language.

The shell is a Command-Line Interface (CLI).

A shell interprets the commands entered through the keyboard and sends them to the operating system for execution.

Top Shells in Linux:
  • Bash – The Bourne Again Shell is the default shell in many Linux distributions. It is highly portable and widely used. CentOS 8 also uses Bash as its default shell.
  • Zshell (Zsh) – Zshell is similar to, or an extended version of, Bash. It offers numerous features, such as the ability to share command history across multiple terminals.
  • Fish – Fish is a friendly and interactive shell. It is an extended version of a common shell and provides convenient features like auto-completion of commands.
  • Tcsh – Tcsh, short for Tenex C shell, is an extended version of the C shell. It includes its scripting language and shares similarities with the C programming language.
Top operations performed by a Kernel:
  • Resource management – The kernel determines which processes are granted access to system resources for various operations.
  • Memory management – The kernel has full control over system memory and must efficiently manage it, including allocating and deallocating memory for processes and enabling memory access for those processes.
  • Device management – When devices such as printers or pen drives are connected, the kernel detects them and facilitates the system in establishing connections with these peripherals.
  • System calls – System calls serve as an interface between a process and the operating system. When a process lacks permission to directly access a resource, a system call provides access to that resource on behalf of the process.
How to log in to remote Linux?

You can log in to remote Linux using SSH. 

The command is: ssh <user_name>@<ip_address>

For example: ssh centos@15.206.75.130

After executing the command, it will prompt you to enter the password.

File system hierarchy:

The file system hierarchy is organized as follows:

  • / – This is the top-level directory.
  • /root – The /root directory is the home directory for the root user, and it houses administrative files and configurations.
  • /home – The /home directory serves as the home directory for other users on the system.
  • /boot – The /boot directory contains bootable files for Linux and holds essential files used during the system boot process.
  • /etc – It contains all configuration files.
  • /usr – The /usr directory is the default location where software is installed.
  • /bin – The /bin directory contains commands that are used by all users. It stores user binaries, executable files, and commonly used Linux commands, such as cat, cp, cd, ls, etc.
  • /sbin – The /sbin directory contains commands that are exclusively used by the root user for system administration purposes.
Important links:

Linux -> https://www.linux.org/forums/#linux-tutorials.122

Happy Learning!

We use cookies on this site to enhance your user experience. For a complete overview of how we use cookies, please see our privacy policy.