Skip to main content

Introduction to Linux and Ubuntu

Welcome to your first lesson in Linux system administration! In this lesson, we'll explore what Linux is, why it's so widely used, and introduce you to Ubuntu - one of the most popular Linux distributions for both beginners and professionals.

Learning Goals:

  • Understand what Linux is and its role in modern computing
  • Learn about the Linux kernel and its relationship with distributions
  • Get familiar with Ubuntu and its key features
  • Understand the difference between desktop and server environments
  • Recognize common use cases for Linux systems

What is Linux?

Linux is an open-source operating system kernel originally created by Linus Torvalds in 1991. Unlike proprietary operating systems like Windows or macOS, Linux is developed collaboratively by thousands of developers worldwide.

tip

The term "Linux" technically refers only to the kernel - the core component that manages hardware resources. What people commonly call "Linux" is actually a combination of the Linux kernel plus various software packages, which together form a complete operating system.

The Linux Kernel

The kernel is the heart of any operating system. It handles:

  • Process management: Starting, stopping, and managing running programs
  • Memory management: Allocating and managing RAM usage
  • Device drivers: Communicating with hardware components
  • System calls: Providing interfaces for applications to request services
Checking your Linux kernel version
uname -r

This command displays the kernel version running on your system.

Linux Distributions

A Linux distribution (or "distro") packages the Linux kernel with additional software to create a complete, usable operating system. Popular distributions include:

  • Ubuntu: User-friendly, great for beginners
  • Debian: Stable, community-driven
  • CentOS/RHEL: Enterprise-focused, very stable
  • Arch Linux: Minimal, highly customizable

Ubuntu: The Focus of This Course

Ubuntu is a Debian-based Linux distribution sponsored by Canonical. It's known for:

  • Regular release cycles (every 6 months) with Long Term Support (LTS) versions every 2 years
  • Extensive software repositories
  • Strong community support
  • Excellent documentation
  • Easy installation process
Checking Ubuntu version
lsb_release -a

Desktop vs Server Environments

Desktop Ubuntu

Desktop Ubuntu provides a complete graphical user interface (GUI) with:

  • GNOME desktop environment by default
  • Pre-installed applications (web browser, office suite, media players)
  • Graphical system tools for configuration
  • Easy software installation through graphical package managers

Server Ubuntu

Server editions are optimized for:

  • Running without a graphical interface (headless operation)
  • Stability and security
  • Running services like web servers, databases, and applications
  • Remote administration via command line
note

You can install a desktop environment on a server edition, and you can run server software on a desktop edition. The main difference is what comes pre-installed and optimized.

Why Choose Linux?

Advantages of Linux

  1. Cost: Free and open-source
  2. Security: Strong permission system and fewer viruses
  3. Stability: Can run for years without rebooting
  4. Customizability: Modify almost any aspect of the system
  5. Performance: Efficient resource usage
  6. Community Support: Extensive documentation and forums

Common Use Cases

  • Web development environments
  • Creative work (graphics, video editing)
  • Everyday computing (browsing, office work)
  • Gaming (with Steam Proton)

Key Linux Concepts

The Filesystem Hierarchy

Linux organizes files in a hierarchical structure starting from the root directory (/). Some important directories:

  • / – The root directory. Everything in Linux starts from here.
  • /home – Contains home directories for regular users (e.g., /home/vikas).
  • /root – Home directory for the root (administrator) user.
  • /etc – System configuration files for services, daemons, networking, users, and more.
  • /var – Variable data such as logs, caches, databases, mail queues, and spool files.
  • /bin – Essential user command binaries (e.g., ls, cp, mv, cat).
  • /sbin – System administration binaries (e.g., iptables, systemctl, fdisk).
  • /usr – User programs, libraries, documentation, and utilities. (Often the largest directory.)
  • /usr/bin – Non-essential command binaries for users.
  • /usr/sbin – Non-essential admin binaries.
  • /usr/local – Locally installed software.
  • /tmp – Temporary files created by programs. Automatically cleaned on reboot.
  • /dev – Virtual files representing hardware devices (e.g., /dev/sda).
  • /proc – Virtual filesystem that exposes kernel, hardware, and process information.
  • /boot – Files needed for the boot process: kernel, initramfs, GRUB configs.
  • /mnt – Temporary mount point for attaching external filesystems manually.
  • /media – Automatic mount points for external devices like USB drives.
  • /opt – Optional or third-party software not managed by the system package manager.

Users and Permissions

Linux is a multi-user system with strong security:

  • Every file and process has an owner
  • Permissions control who can read, write, or execute files
  • The root user has administrative privileges
Viewing current user
whoami

Common Pitfalls

  • Assuming Linux works like Windows: File paths, software installation, and system administration differ significantly
  • Overusing the root account: Regular tasks should use a standard user account for security
  • Not reading documentation: Linux has excellent manual pages (man command) and online resources
  • Ignoring case sensitivity: Linux filenames are case-sensitive (File.txtfile.txt)
  • Forgetting to update: Regular updates are crucial for security and stability

Summary

In this lesson, you learned that:

  • Linux is an open-source operating system kernel
  • Distributions like Ubuntu package the kernel with additional software
  • Ubuntu offers both desktop and server editions for different use cases
  • Linux provides advantages in cost, security, and customizability
  • Understanding the filesystem hierarchy and user permissions is fundamental

You're now ready to move on to installing Ubuntu and getting hands-on experience with the system!

Quiz

Show quiz
  1. What is the core component that technically defines "Linux"?

    • A) The desktop environment
    • B) The package manager
    • C) The kernel
    • D) The file system
  2. Which of these is NOT typically a characteristic of server Ubuntu?

    • A) Runs without a graphical interface
    • B) Optimized for stability
    • C) Pre-installed with office applications
    • D) Designed for remote administration
  3. What makes Ubuntu particularly suitable for beginners?

    • A) It's the most expensive distribution
    • B) It has limited documentation
    • C) Strong community support and user-friendly design
    • D) It only runs on specialized hardware
  4. Why should you avoid using the root account for regular tasks?

    • A) It's slower than regular user accounts
    • B) Security risks from having unlimited privileges
    • C) Root can't run graphical applications
    • D) Root account costs money to use
  5. What does the command lsb_release -a display?

    • A) List of running processes
    • B) Current user information
    • C) Ubuntu version details
    • D) Network configuration

Answers:

  1. C) The kernel
  2. C) Pre-installed with office applications
  3. C) Strong community support and user-friendly design
  4. B) Security risks from having unlimited privileges
  5. C) Ubuntu version details