読み方のヒント

矢印ボタン(または ← → キー)でページを移動できます。

第6節 ソフトウェアを入れる

6.2 入れて、確かめる

フォルダの中身を木の形で表示する tree を入れます。

sudo apt install tree
The following NEW packages will be installed:
  tree
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
Need to get 47.1 kB of archives.
After this operation, 111 kB of additional disk space will be used.

依存するパッケージがあると、The following NEW packages will be installed: の下に一緒に並び、Do you want to continue? [Y/n] と確認されます。並んだ一覧と、使うディスクの量を見てから Y を入力します。

入れたら、版を表示して動くことを確かめます。

tree --version
tree -L 1 ~/komorebi-practice
/home/haruto/komorebi-practice
├── backup.sh
├── data
├── logs
├── notes
└── work

4 directories, 1 file

多くのコマンドは、--version で版を表示します。手順書や質問に版を書くと、ほかの人が同じ状態を再現しやすくなります。

パッケージの情報は apt show、入っているかどうかは apt list --installed で確かめます。

apt show tree | head -n 5
apt list --installed | grep tree

31 / 34