cat /etc/apt/sources.list で apt のソースを調べる
このステップでは、システムがソフトウェアパッケージをどこから取得するかを調べます。前の実験で sudo apt update
と sudo apt install htop
を使用したとき、apt
はソフトウェアをダウンロードするサーバーを知る必要がありました。この情報は設定ファイルに保存されています。
apt
のソースを列挙する主要なファイルは /etc/apt/sources.list
です。再び cat
コマンドを使用してその内容を表示できます。
ターミナルに以下のコマンドを入力し、Enter キーを押します。
cat /etc/apt/sources.list
deb
または deb-src
で始まる行が表示されます。これらの行は、apt
がパッケージを探すリポジトリ(サーバー)を指定しています。
## See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
## newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted
## deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted
### Major bug fix updates produced after the final release of the
### distribution.
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
## deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
### N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
### team. Also, please note that software in universe WILL NOT receive any
### review or updates from Canonical except for security updates. The
### responsibility for security updates from this repository rests entirely
### with the community.
deb http://archive.ubuntu.com/ubuntu/ jammy universe
## deb-src http://archive.ubuntu.com/ubuntu/ jammy universe
... (output may vary)
各 deb
行は通常、以下の形式に従います。
deb [options] uri distribution [component1] [component2] [...]
deb
: バイナリパッケージリポジトリを示します。
uri
: リポジトリのアドレス(例:http://archive.ubuntu.com/ubuntu/
)。
distribution
: ディストリビューションのコードネーム(例:jammy
)。
components
: ソフトウェアのカテゴリ(例:main
, restricted
, universe
, multiverse
)。
#
で始まる行はコメントで、apt
は無視します。
デフォルトのソースにないソフトウェアをインストールするためにサードパーティのリポジトリを追加する必要がある場合、sources.list
を理解することは重要です。
続ける をクリックしてこのステップを完了します。