Architecture of Linux

Architecture of Linux

Architecture of Linux  can be divided into three levels of functionality, as shown in below diagram.

Understanding  Architecture of Linux : A Three-Tiered Approach

  1. Kernel Level: The Core of Linux
    • At the foundational level lies the kernel, the powerhouse of Linux. Responsible for scheduling tasks, managing resources, and enforcing security protocols, the kernel acts as the backbone of the operating system.
  2. Shell Level: Bridging User and System
    • Moving up the hierarchy, we encounter the shell – the user interface that serves as the gateway to Linux. Here, user commands are interpreted, and applications are initiated. The shell facilitates the interaction between users and the system, offering a command-line environment for efficient control.
  3. Utilities Level: Empowering User Operations
    • At the pinnacle of Linux functionality is the utilities level, which provides a suite of essential functions. This user-centric layer empowers individuals to operate utilities seamlessly. In essence, it is the USER level, where users harness the power of utilities to enhance their computing experience.

Introduction to Linux Operating System

Introduction to Linux Operating System:

Linux is an open-source Unix-like operating system kernel that serves as the foundation for a diverse range of operating systems.

Developed by Linus Torvalds in 1991, Linux has since evolved into a powerful and versatile platform widely used in various computing environments, from servers and desktops to embedded systems and mobile devices.

One of Linux’s key features of Linux Operating System :
  • Its open-source nature
  • Allowing users to access
  • Modify the source code, fostering a collaborative
  • Community-driven development model.

Linux distributions, or “distros,” package the Linux kernel with additional software and tools to create complete operating systems. Known for its stability, security, and efficiency, Linux has become a popular choice for both enthusiasts and enterprises seeking a reliable and customizable operating system. Its command-line interface, along with a wealth of graphical user interfaces, provides users with flexibility and control over their computing experience. Overall, Linux has played a crucial role in shaping the landscape of modern computing.

Types of Linux Operating System

Linux Operating System is an open-source operating system kernel that has been used as the foundation for various operating systems, often referred to as Linux distributions or distros. These distributions can vary significantly in terms of package management, desktop environment, user interface, and system administration tools. Here are some of the well-known types or families of Linux operating systems:

Debian-based:
  • Debian
  • Ubuntu
  • Linux Mint
  • Kali Linux
Red Hat-based:
  • Red Hat Enterprise Linux (RHEL)
  • Fedora
  • CentOS
SUSE-based:
  • openSUSE
  • SUSE Linux Enterprise
Arch-based:
  • Arch Linux
  • Manjaro
Gentoo-based:
  • Gentoo

 Slackware:

  • Slackware
Independent/Community:
  • Slackware
  • Void Linux
  • Alpine Linux
Embedded Linux:
  • OpenEmbedded
  • Buildroot

These distributions cater to different needs and preferences. Debian and its derivatives are known for stability and strong package management. Red Hat-based distributions are often used in enterprise environments. Arch and Gentoo are known for their rolling release models and provide more flexibility but might require more technical expertise. Slackware is known for simplicity and minimalism.

It’s essential to choose a distribution based on your requirements, whether it’s for general desktop use, server deployment, development, or specialized tasks like ethical hacking (Kali Linux). Each distribution has its own package management system, default desktop environment, and configuration tools, so users often choose based on personal preference and the specific needs of their projects.

Linux Bash Shell Realtime Project of Daily Backup Script // Project 1

Realtime Project Flow Diagram

In the above Flow diagram

[root@engrabhishekroshan scripts]# cat daily_backup_prd.sh
#!/bin/bash

# Define paths and filenames
backup_config_file=”/archive/backup_config.txt”
backup_destination=”/member”
#hourly_dir=”$backup_destination/$(date +’%Y-%m-%d_%H-%M’)”
backup_filename=”backup_$(date +’%Y%m%d_%H%M%S’).tar.gz”
source_directory=”/archive”
# Check if the backup configuration file exists

if [ -f “$backup_config_file” ]; then
echo “Backup configuration file found. Proceeding with the backup.”
else
echo “Backup configuration file not found. Exiting.”
exit 1
fi
#
#
#mkdir -p “$hourly_dir”
# Read backup configuration from the file (modify as per your config file format)
source “$backup_config_file”

# Perform the backup
tar -czf “$backup_destination/$backup_filename” “$source_directory” 2>/dev/null

# Check if the backup was successful
if [ $? -eq 0 ]; then
echo “Backup completed successfully: $backup_destination/$backup_filename”
else
echo “Backup failed. Please check for errors.”
exit 1
fi

###########END OF SCRIPT####################

[root@engrabhishekroshan scripts]# chmod 755 daily_backup_prd.sh
[root@engrabhishekroshan scripts]# ll daily_backup_prd.sh
-rwxr-xr-x. 1 root root 950 Jan 19 02:27 daily_backup_prd.sh

Output After Execution

[root@engrabhishekroshan scripts]# sh daily_backup_prd.sh
Backup configuration file found. Proceeding with the backup.
Backup completed successfully: /member/backup_20240217_010045.tar.gz

error: Content is protected !!