$
学ぶ Linux ハンドブック
ja
XP:0
クエスト 47SysUpdater
+170 XP

Updating vs. Upgrading (apt update & apt upgrade)

このクエストの対話型ターミナルを起動する→インストール不要 • ブラウザ上で完全動作

概念と概要

New system administrators often confuse updating and upgrading. In Debian and Ubuntu environments:

- sudo apt update: Refreshes your local cache of package lists from upstream repository servers (/etc/apt/sources.list). It discovers which newer package versions exist, but does not modify or upgrade any software on disk.
- sudo apt upgrade: Compares your currently installed software against the refreshed list and downloads/installs the newer package versions.

Running apt upgrade without running apt update first will either install outdated versions or fail completely because your system does not know newer releases exist!

Refresh your local package repository cache with sudo apt update, then upgrade installed packages to their latest versions with sudo apt upgrade.

コマンド構文リファレンス

Command / SyntaxDescription
sudo apt updateRefresh package repository index lists
sudo apt upgradeUpgrade installed packages to newest versions

検証目標

  • ○
    Run "sudo apt update" to refresh repository index
  • ○
    Run "sudo apt upgrade" to upgrade installed packages

クエスト完了への準備はできましたか? 47?