[Linux] Linux Foundations & Infrastructure Setup


Ubuntu

Table of Content


1. Operating System Overview

๐Ÿ“Š Windows vs. Linux

FeatureWindowsLinux
Source ModelClosed Source (Proprietary)Open Source (GPL License)
Kernel TypeHybrid KernelMonolithic Kernel
InterfaceGUI (Graphic User Interface)CLI (Command Line Interface)
ConfigurationRegistry, GUI SettingsPlain Text Files
StabilityForced updates / RebootsHigh uptime / Live patching
CostPaid LicenseFree / Open Source
Primary UseDesktop, Office, GamingServers, Cloud, AI, Embedded

๐Ÿง  OS Main Functions

  • Process Management: Allocation of CPU resources and multitasking control.
  • Memory Management: Managing RAM allocation and Virtual Memory (Swap).
  • File System Management: Organizing storage, retrieval, and naming of data.
  • I/O Device Management: Coordinating hardware communication via device drivers.
  • Security & Protection: Managing user permissions and preventing unauthorized access.

2. System Architecture

๐Ÿš Kernel and Shell Relationship

  • Kernel: The core of the OS. It interacts directly with the hardware (CPU, RAM, Disk).
  • Shell: The user interface (Interpreter). It takes your commands and translates them into system calls that the kernel can execute.

๐Ÿ›ก๏ธ Kernel Mode vs. User Mode

  • User Mode: Restricted mode where applications run. Prevents apps from crashing the whole system.
  • Kernel Mode: Privileged mode for the OS core. Full access to all hardware and CPU instructions.
  • Transition: Applications switch from User Mode to Kernel Mode via System Calls to perform tasks like โ€œreading a file.โ€

3. Open Source & Distributions

๐Ÿ”“ Open Source Overview

  • Definition: Software where the source code is public, allowing anyone to view, modify, and distribute it.
  • Advantages: High security (many eyes on code), rapid innovation, no vendor lock-in, and lower cost (TCO).

๐Ÿ“ฆ Linux Distributions

FamilyExamplesPros/Cons & Usage
Debian / UbuntuUbuntu, MintPros: User-friendly, huge community. Cons: Can be bloated. Usage: Beginners, Web Servers.
Red Hat (RHEL)RHEL, Rocky, AlmaPros: Enterprise stability, long support. Cons: Paid support (RHEL). Usage: Corporate environments.
Arch LinuxArch, ManjaroPros: Always latest software (Rolling). Cons: High difficulty. Usage: Power users, enthusiasts.

4. Virtualization & Infrastructure

๐Ÿ—๏ธ VM vs. Container

  • Virtual Machine (VM):
    • Virtualizes Hardware.
    • Includes a full Guest OS for every instance.
    • Heavy resource usage, slow boot, but high isolation.
  • Container (Docker):
    • Virtualizes the Operating System.
    • Shares the Host Kernel.
    • Lightweight, starts in seconds, โ€œwrite once, run anywhereโ€ efficiency.

๐ŸŒ Client-Server Structure

  • Server: A machine or process that โ€œlistensโ€ for requests and provides a service (Web, DB).
  • Client: An application (like a Browser or SSH terminal) that requests a service from the server.

5. Remote Environment Setup

๐Ÿšช Port Forwarding

  • Concept: Connecting a port on your physical computer (Host) to a port on your virtual machine (Guest).
  • Setup: Map Host Port 2222 โ†’ Guest Port 22 in VirtualBox settings. This allows you to SSH into the VM from your main desktop.

๐Ÿ”‘ SSH Remote Connection Guide

SSH (Secure Shell) is the industry standard for secure remote management.

  1. Verify Service: systemctl status ssh
  2. Standard Connection: ssh username@server_ip
  3. Connection via Port Forwarding:

     ssh -p 2222 username@127.0.0.1
     ### OR
     ssh -p 2222 username@localhost
    





ยฉ 2017. by isme2n

Powered by aiden