01 — なぜターミナル

なぜターミナルを覚えるのか

AIエージェント(Claude Code・Codex・Cursor など)がやっているのは、ターミナルを動かすこと。それだけです。中で何が起きているか読めなければ、出てきた答えが合っているかも分かりません。すぐ迷子になります。だから、ターミナルが先です。

AIがやっているのは、これ

日本語で頼むと、AIは裏でコマンドを順に打っています。「Documents の中に notes を作って、今日の空ファイルを置いて」。この一言で動く中身が、次の4コマです。

1
Documents に移動する
zsh — ~
~ % cd Documents Documents %
2
notes フォルダを作る
zsh — Documents
~ % cd Documents Documents % mkdir notes Documents %
3
notes の中に入る(プロンプトが変わる)
zsh — notes
~ % cd Documents Documents % mkdir notes Documents % cd notes notes %
4
今日の空ファイルを置く
zsh — notes
~ % cd Documents Documents % mkdir notes Documents % cd notes notes % touch 2026-06-03.md notes %

読めないと、どうなるか

ターミナルが少し読めれば、肩越しに「合ってる」「違う」が分かります。読めなければ、こうなります。

覚えるのは、5つだけ

このサイトで扱うコマンドは5つ。これだけで、AIの動きの大半は追えます。

pwd いまどこにいるか確認する pwd = print working directory
現在の working directory(作業場所)をフルパスで表示する。
ls ここにあるものを一覧する ls = list
現在の場所にあるファイルとフォルダを並べて表示する。
cd 別の場所に移動する cd = change directory
プロンプトが変わる。それが移動の合図だ。
mkdir 新しいフォルダを作る mkdir = make directory
指定した名前のフォルダを現在の場所に作る。
touch / ni 空のファイルを置く ni = New-Item
Mac は touch、Windows は ni。中身は空のファイルを作る。

1つずつ、画面の変化つきで確かめる。→ コマンド事典

このサイトの約束

説明は最小限。画面はコマ送りで山ほど。横に開いて、自分のPCで打つ。読むだけでは、指は覚えません。