VICIgeek
What is Linux? A Comprehensive Guide

What is Linux? A Comprehensive Guide

Linux is a free, open-source operating system kernel, first released by Linus Torvalds in 1991 under the GPL. When paired with GNU utilities and userland tools, it forms complete Linux distributions that power everything from desktops and servers to smartphones, IoT devices, and supercomputers.

Linux Kernel Architecture

Prerequisites

  • A PC, server, or virtual machine (x86_64, ARM, etc.)
  • Keyboard, mouse, and monitor (for desktop installs)
  • Internet access to download ISOs and packages
  • Basic familiarity with command-line interfaces

1  Brief History

  1. **1991**: Linux 0.01 released; kernel only.
  2. **1992**: Combines with GNU tools to form usable systems.
  3. **Late 1990s**: First major distributions (Slackware, Red Hat).
  4. **2000s**: Enterprise adoption by IBM, Oracle, and more.
  5. **2010s–2020s**: Dominates servers, Android, cloud, and edge devices.

2  Linux Architecture

A typical Linux system is layered:

  • Kernel: Manages hardware, memory, processes, drivers.
  • Shells: Command interpreters (bash, zsh, fish).
  • System Libraries: Core APIs (glibc, libssl).
  • Init/System Manager: Boots and supervises services (systemd).
  • Userland: Applications, GNU tools, desktop environments.

3  Popular Distributions

Choose based on use case:

DistributionUse CasePackage Manager
UbuntuGeneral-purpose desktop & serverapt
CentOS Stream/AlmaLinuxEnterprise serversyum/dnf
FedoraUpstream featuresdnf
DebianStable servers & desktopsapt
Arch LinuxDIY/install-from-scratchpacman
openSUSEEnterprise & communityzypper

4  Common Use Cases

  • Servers: Web, database, mail, file, and container hosts.
  • Desktops: Development, multimedia, office productivity.
  • Embedded Systems: Appliances, IoT, routers.
  • Mobile: Android, custom ROMs.
  • Development & DevOps: Containers (Docker), orchestration (Kubernetes).
  • Research & HPC: Supercomputers and clusters.

5  Getting Started

  1. **Pick a Distro:** Start with Ubuntu or Fedora for ease of use.
  2. **Download ISO:** Grab the minimal or desktop image from official sites.
  3. **Create Bootable Media:** Use BalenaEtcher, Rufus (Windows), or `dd` (Linux/macOS).
  4. **Install:** Boot USB, partition drives, set root/user credentials.
  5. **Update:** Use `sudo your-pkg-manager update && sudo your-pkg-manager upgrade`.
  6. **Learn CLI:** Practice common commands to navigate and manage the system.

6  Essential Linux Commands

Master these for daily operations:

CommandPurposeExample
`ls`List directory contents`ls -al /var/log`
`cd`Change directory`cd /etc`
`cp`Copy files or directories`cp file.txt /tmp/`
`mv`Move or rename`mv oldname newname`
`rm`Remove files or directories`rm -rf /tmp/test`
`mkdir`Create directory`mkdir ~/projects`

7  System Navigation & File Ops

  • pwd: Print working directory.
  • find . -name "*.conf": Search files.
  • grep -R "pattern" /path: Search text in files.
  • tail -f /var/log/syslog: Live log view.
  • du -h --max-depth=1: Disk usage by directory.

8  Process & Resource Management

  • ps aux: List all processes.
  • top or htop: Interactive process viewer.
  • kill PID: Terminate process.
  • free -h: Show memory usage.
  • df -h: Show filesystem disk space.

9  Network & Services

  • ip addr: Display interfaces and IPs.
  • ping host: Test connectivity.
  • ss -tuln: List open ports/services.
  • systemctl status nginx: Check service with systemd.
  • journalctl -xe: View logs for troubleshooting.

10  Package Management

  • Debian/Ubuntu: sudo apt update, sudo apt install package.
  • Fedora/CentOS: sudo dnf install package or yum install package.
  • Arch Linux: sudo pacman -Syu, sudo pacman -S package.
  • openSUSE: sudo zypper refresh, sudo zypper install package.

11  User & Permission Management

  • sudo adduser username: Create a user.
  • sudo usermod -aG sudo username: Grant sudo privileges.
  • chmod 644 file: Set file permissions.
  • chown user:group file: Change ownership.
  • sudo passwd username: Change user password.

12  Shell Scripting Basics


#!/bin/bash
# Sample backup script
BACKUP_DIR="$HOME/backup"
mkdir -p "$BACKUP_DIR"
tar -czf "$BACKUP_DIR/etc-$(date +%F).tar.gz" /etc
echo "Backup completed: $(date)"

Best Practices

  1. Run regular updates and security patches.
  2. Use key-based SSH and disable password login.
  3. Leverage firewalls (ufw, firewalld) to restrict access.
  4. Keep backups with versioning (rsync, BorgBackup).
  5. Log and monitor with syslog-ng or ELK stack.

Next Steps

  • Explore advanced topics: containers (Docker), orchestration (Kubernetes).
  • Learn configuration management: Ansible, Puppet, Chef.
  • Dive into kernel compilation and custom modules.
  • Contribute to open-source projects and Linux communities.
Read What is Linux? A Comprehensive Guide

For deeper study, refer to the Linux Documentation Project, distribution wikis, and specialized guides.

Ad Space (Demo)