The Linux Operating System

Level: Beginner Module: Linux Fundamentals 6 min read Lesson 1 of 10

Overview

  • What you’ll learn: The fundamentals of the Linux operating system, including the kernel, distributions, and the Ubuntu Server ecosystem.
  • Prerequisites: None
  • Estimated reading time: 15 minutes

Introduction

Linux is one of the most widely used operating systems in the world, powering everything from smartphones and embedded devices to the vast majority of servers on the Internet. Unlike proprietary operating systems such as Windows or macOS, Linux is open-source software, meaning its source code is freely available for anyone to view, modify, and distribute.

Understanding Linux is an essential skill for system administrators, DevOps engineers, and software developers. In this lesson, we will explore what Linux is, how its architecture is organized, the concept of distributions, and why Ubuntu Server is an excellent choice for production environments.

By the end of this lesson, you will have a solid understanding of the Linux ecosystem and be ready to start working with the command line in subsequent lessons.

What is Linux?

Linux, in the strictest sense, refers to the Linux kernel — the core component of the operating system that manages hardware resources, process scheduling, memory management, and device drivers. The kernel was originally created by Linus Torvalds in 1991 and has since grown into one of the largest collaborative software projects in history.

When most people say “Linux,” they are referring to a complete operating system that combines the Linux kernel with a collection of user-space utilities, libraries, and applications. This complete package is more accurately called a GNU/Linux system, as many of the essential utilities come from the GNU Project.

Kernel vs. User Space

The Linux architecture is divided into two main areas:

  • Kernel space: The privileged area where the kernel runs. It has direct access to hardware, manages memory, schedules processes, and handles system calls from user-space programs.
  • User space: Where all user applications and services run. Programs in user space cannot directly access hardware; instead, they make requests to the kernel through system calls.
$ uname -r
5.15.0-91-generic

$ uname -a
Linux ubuntu-server 5.15.0-91-generic #101-Ubuntu SMP x86_64 GNU/Linux

The uname command displays information about the running kernel. The -r flag shows the kernel release version, while -a displays all available system information.

Linux Distributions

A Linux distribution (or “distro”) is a complete operating system built around the Linux kernel. Each distribution packages the kernel together with a specific set of software, a package manager, configuration tools, and sometimes a desktop environment. Popular distributions include:

  • Ubuntu: Based on Debian, known for ease of use and extensive documentation. Available in Desktop and Server editions.
  • Debian: One of the oldest distributions, known for stability and its massive software repository.
  • CentOS / Rocky Linux / AlmaLinux: Enterprise-grade distributions compatible with Red Hat Enterprise Linux (RHEL).
  • Fedora: A cutting-edge distribution sponsored by Red Hat, often used as a testing ground for RHEL features.
  • Arch Linux: A rolling-release distribution aimed at experienced users who want full control over their system.

Each distribution has its own package management system. Debian-based systems (including Ubuntu) use apt and .deb packages, while Red Hat-based systems use dnf (or yum) and .rpm packages.

Ubuntu Server

Ubuntu Server is a variant of the Ubuntu distribution designed specifically for server environments. It ships without a graphical desktop by default, providing a minimal installation optimized for performance and security.

Key Features

  • LTS Releases: Ubuntu offers Long Term Support releases every two years (e.g., 22.04 LTS, 24.04 LTS). LTS versions receive security updates and bug fixes for five years, making them ideal for production servers.
  • Snap packages: Ubuntu supports Snap, a universal package format that bundles applications with their dependencies for consistent deployment.
  • Cloud-init: Built-in support for cloud instance initialization, making Ubuntu Server a popular choice on AWS, Azure, and GCP.
  • Extensive documentation: The Ubuntu Server Guide provides comprehensive coverage of common server administration tasks.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
ID=ubuntu
ID_LIKE=debian

Server vs. Desktop

The key differences between Ubuntu Server and Ubuntu Desktop are:

  • No GUI by default: Server edition uses the command line exclusively, reducing resource usage.
  • Different default packages: Server includes tools like OpenSSH server, while Desktop includes a graphical desktop environment.
  • Kernel tuning: The server kernel may be configured with different scheduler settings optimized for throughput rather than interactivity.

Getting Help

Linux provides several built-in mechanisms for getting help directly from the command line:

$ man ls
LS(1)                     User Commands                    LS(1)

NAME
       ls - list directory contents

SYNOPSIS
       ls [OPTION]... [FILE]...

$ ls --help
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).

$ info coreutils
GNU Coreutils reference documentation...
  • man pages: The manual pages are the primary documentation system on Linux. Use man <command> to read the full manual for any command.
  • --help flag: Most commands support a --help flag that prints a brief usage summary.
  • info pages: Some GNU utilities provide more detailed documentation through the info system.
  • apropos: Search man pages by keyword. For example, apropos partition finds all man pages related to partitioning.

Key Takeaways

  • Linux refers to the kernel; a complete OS is a Linux distribution combining the kernel with user-space tools.
  • The architecture is split into kernel space (hardware access, process management) and user space (applications, services).
  • Distributions like Ubuntu, Debian, CentOS, and Arch each package Linux differently with their own tools and philosophies.
  • Ubuntu Server LTS releases provide five years of support and are widely used in production and cloud environments.
  • Built-in help is always available through man, --help, info, and apropos.

What’s Next

In Lesson 2, you will learn about Shell Navigation and File System, including how to use the bash shell, navigate directories, and work with files using essential Linux commands.

繁體中文

概述

  • 學習目標:了解 Linux 作業系統的基礎知識,包括核心、發行版及 Ubuntu Server 生態系統。
  • 先決條件:
  • 預計閱讀時間:15 分鐘

簡介

Linux 是世界上使用最廣泛的作業系統之一,從智慧型手機和嵌入式裝置到網際網路上絕大多數的伺服器,都是由 Linux 驅動的。與 Windows 或 macOS 等專有作業系統不同,Linux 是開源軟體,這意味著任何人都可以自由地檢視、修改和散布其原始碼。

了解 Linux 對於系統管理員、DevOps 工程師和軟體開發人員來說是一項必備技能。在本課程中,我們將探討 Linux 是什麼、其架構如何組織、發行版的概念,以及為何 Ubuntu Server 是生產環境的絕佳選擇。

在本課程結束時,您將對 Linux 生態系統有紮實的了解,並準備好在後續課程中開始使用命令列。

什麼是 Linux?

嚴格來說,Linux 指的是 Linux 核心——作業系統的核心元件,負責管理硬體資源、行程排程、記憶體管理和裝置驅動程式。核心最初由 Linus Torvalds 於 1991 年建立,此後已成長為歷史上最大的協作軟體專案之一。

大多數人所說的「Linux」實際上是指一個完整的作業系統,它將 Linux 核心與一系列使用者空間工具、程式庫和應用程式結合在一起。這個完整的套件更準確地稱為 GNU/Linux 系統,因為許多基本工具來自 GNU 專案。

核心空間與使用者空間

Linux 架構分為兩個主要區域:

  • 核心空間:核心運行的特權區域。它可以直接存取硬體、管理記憶體、排程行程,並處理來自使用者空間程式的系統呼叫。
  • 使用者空間:所有使用者應用程式和服務運行的地方。使用者空間中的程式無法直接存取硬體;它們透過系統呼叫向核心發出請求。
$ uname -r
5.15.0-91-generic

$ uname -a
Linux ubuntu-server 5.15.0-91-generic #101-Ubuntu SMP x86_64 GNU/Linux

Linux 發行版

Linux 發行版(或「distro」)是圍繞 Linux 核心建構的完整作業系統。每個發行版將核心與特定的軟體集、套件管理器、設定工具,有時還包括桌面環境打包在一起。常見的發行版包括:

  • Ubuntu:基於 Debian,以易用性和豐富的文件聞名。提供桌面版和伺服器版。
  • Debian:最古老的發行版之一,以穩定性和龐大的軟體儲存庫著稱。
  • CentOS / Rocky Linux / AlmaLinux:與 Red Hat Enterprise Linux (RHEL) 相容的企業級發行版。
  • Fedora:由 Red Hat 贊助的前沿發行版,通常用作 RHEL 功能的測試平台。
  • Arch Linux:針對希望完全控制系統的有經驗使用者的滾動發行版。

Ubuntu Server

Ubuntu Server 是 Ubuntu 發行版的變體,專為伺服器環境設計。它預設不附帶圖形桌面,提供針對效能和安全性最佳化的最小化安裝。

主要特點

  • LTS 版本:Ubuntu 每兩年提供一次長期支援版本(例如 22.04 LTS、24.04 LTS)。LTS 版本提供五年的安全更新和錯誤修復,非常適合生產伺服器。
  • Snap 套件:Ubuntu 支援 Snap,這是一種通用套件格式,將應用程式與其相依性捆綁在一起以進行一致的部署。
  • Cloud-init:內建雲端實例初始化支援,使 Ubuntu Server 成為 AWS、Azure 和 GCP 上的熱門選擇。
  • 豐富的文件:Ubuntu Server 指南提供了常見伺服器管理任務的全面涵蓋。

伺服器版與桌面版

  • 預設無圖形介面:伺服器版專用命令列,減少資源使用。
  • 不同的預設套件:伺服器版包含如 OpenSSH 伺服器等工具,而桌面版包含圖形桌面環境。
  • 核心調校:伺服器核心可能針對吞吐量而非互動性進行不同的排程器設定。

取得幫助

Linux 提供了多種從命令列直接獲取幫助的內建機制:

  • man 手冊頁:手冊頁是 Linux 上的主要文件系統。使用 man <command> 來閱讀任何命令的完整手冊。
  • --help 選項:大多數命令支援 --help 選項,會列印簡要的使用摘要。
  • info 頁面:某些 GNU 工具透過 info 系統提供更詳細的文件。
  • apropos按關鍵字搜尋手冊頁。例如,apropos partition 可找到所有與分割區相關的手冊頁。

重點摘要

  • Linux 指的是核心;完整的作業系統是將核心與使用者空間工具結合的 Linux 發行版。
  • 架構分為核心空間(硬體存取、行程管理)和使用者空間(應用程式、服務)。
  • Ubuntu、Debian、CentOS 和 Arch 等發行版各自以不同的工具和理念來打包 Linux。
  • Ubuntu Server LTS 版本提供五年支援,廣泛用於生產和雲端環境。
  • 內建幫助始終可透過 man--helpinfoapropos 取得。

下一步

在第 2 課中,您將學習 Shell 導航與檔案系統,包括如何使用 bash shell、導航目錄以及使用基本的 Linux 命令處理檔案。

日本語

概要

  • 学習内容:カーネル、ディストリビューション、Ubuntu Server エコシステムを含む Linux オペレーティングシステムの基礎。
  • 前提条件:なし
  • 推定読了時間:15分

はじめに

Linux は世界で最も広く使用されているオペレーティングシステムの一つであり、スマートフォンや組み込みデバイスからインターネット上のサーバーの大部分まで、あらゆるものを動かしています。Windows や macOS などのプロプライエタリなオペレーティングシステムとは異なり、Linux はオープンソースソフトウェアであり、誰でもそのソースコードを自由に閲覧、変更、配布することができます。

Linux を理解することは、システム管理者、DevOps エンジニア、ソフトウェア開発者にとって不可欠なスキルです。このレッスンでは、Linux とは何か、そのアーキテクチャがどのように構成されているか、ディストリビューションの概念、そして Ubuntu Server が本番環境に最適な選択である理由を探ります。

このレッスンを終える頃には、Linux エコシステムについてしっかりとした理解を持ち、後続のレッスンでコマンドラインの操作を始める準備ができているでしょう。

Linux とは?

厳密に言えば、Linux は Linux カーネルを指します。これはオペレーティングシステムのコアコンポーネントで、ハードウェアリソース、プロセススケジューリング、メモリ管理、デバイスドライバーを管理します。カーネルは 1991 年に Linus Torvalds によって作成され、以来、歴史上最大の共同ソフトウェアプロジェクトの一つに成長しました。

ほとんどの人が「Linux」と言うとき、Linux カーネルとユーザー空間のユーティリティ、ライブラリ、アプリケーションのコレクションを組み合わせた完全なオペレーティングシステムを指しています。この完全なパッケージは、多くの基本的なユーティリティが GNU プロジェクトから来ているため、より正確には GNU/Linux システムと呼ばれます。

カーネル空間とユーザー空間

  • カーネル空間:カーネルが実行される特権領域。ハードウェアに直接アクセスし、メモリを管理し、プロセスをスケジュールし、ユーザー空間プログラムからのシステムコールを処理します。
  • ユーザー空間:すべてのユーザーアプリケーションとサービスが実行される場所。ユーザー空間のプログラムはハードウェアに直接アクセスできず、システムコールを通じてカーネルにリクエストを送ります。
$ uname -r
5.15.0-91-generic

$ uname -a
Linux ubuntu-server 5.15.0-91-generic #101-Ubuntu SMP x86_64 GNU/Linux

Linux ディストリビューション

Linux ディストリビューション(「ディストロ」)は、Linux カーネルを中心に構築された完全なオペレーティングシステムです。各ディストリビューションは、カーネルと特定のソフトウェアセット、パッケージマネージャー、設定ツール、場合によってはデスクトップ環境をパッケージ化しています。

  • Ubuntu:Debian ベースで、使いやすさと充実したドキュメントで知られています。
  • Debian:最も古いディストリビューションの一つで、安定性と巨大なソフトウェアリポジトリで知られています。
  • CentOS / Rocky Linux / AlmaLinux:Red Hat Enterprise Linux (RHEL) と互換性のあるエンタープライズグレードのディストリビューション。
  • Fedora:Red Hat がスポンサーの最先端ディストリビューション。
  • Arch Linux:システムを完全に制御したい経験豊富なユーザー向けのローリングリリースディストリビューション。

Ubuntu Server

Ubuntu Server は、サーバー環境向けに特別に設計された Ubuntu ディストリビューションの変種です。デフォルトではグラフィカルデスクトップなしで出荷され、パフォーマンスとセキュリティに最適化された最小限のインストールを提供します。

主な特徴

  • LTS リリース:Ubuntu は2年ごとに長期サポートリリースを提供します(例:22.04 LTS、24.04 LTS)。LTS バージョンは5年間のセキュリティアップデートとバグ修正を受け取り、本番サーバーに最適です。
  • Snap パッケージ:アプリケーションとその依存関係をバンドルするユニバーサルパッケージ形式。
  • Cloud-init:クラウドインスタンスの初期化をビルトインでサポート。
  • 充実したドキュメント:Ubuntu Server ガイドは一般的なサーバー管理タスクを包括的にカバーしています。

サーバー版 vs デスクトップ版

  • デフォルトで GUI なし:サーバー版はコマンドラインのみを使用し、リソース使用量を削減します。
  • 異なるデフォルトパッケージ:サーバー版には OpenSSH サーバーなどのツールが含まれ、デスクトップ版にはグラフィカルデスクトップ環境が含まれます。
  • カーネルチューニング:サーバーカーネルは対話性よりもスループットに最適化されたスケジューラ設定で構成される場合があります。

ヘルプの取得

  • man ページ:Linux の主要なドキュメントシステム。man <command> でコマンドの完全なマニュアルを読めます。
  • --help フラグ:ほとんどのコマンドは簡単な使用方法の要約を表示する --help フラグをサポートしています。
  • info ページ:一部の GNU ユーティリティは info システムを通じてより詳細なドキュメントを提供します。
  • aproposキーワードで man ページを検索します。

重要ポイント

  • Linux はカーネルを指し、完全な OS はカーネルとユーザー空間ツールを組み合わせた Linux ディストリビューションです。
  • アーキテクチャはカーネル空間(ハードウェアアクセス、プロセス管理)とユーザー空間(アプリケーション、サービス)に分かれています。
  • Ubuntu、Debian、CentOS、Arch などのディストリビューションは、それぞれ独自のツールと哲学で Linux をパッケージ化しています。
  • Ubuntu Server LTS リリースは5年間のサポートを提供し、本番環境やクラウド環境で広く使用されています。
  • ビルトインヘルプは man--helpinfoapropos を通じて常に利用できます。

次のステップ

レッスン2では、Shell ナビゲーションとファイルシステムについて学びます。bash シェルの使い方、ディレクトリの移動方法、基本的な Linux コマンドを使ったファイル操作について学びます。

You Missed