Skip to content

This page was translated from the Korean original with AI and may contain errors.

Command Reference ​

One-line summary: This page gathers the commands used in this course in one place. If a command looks unfamiliar, look it up here. You do not need to memorize them.

How to read a command is in Chapter 2. In short, the order is name · option · target. Options start with - or --.

First, check where you are typing. If the symbol right before the cursor is %, $, or >, you are in the terminal. If it is ❯, you are in the Claude input box. If you see only >, dquote>, or heredoc> at the very start of the line, your input is not finished yet. Press Ctrl + C and paste again. Most tables in this reference are commands you type in the terminal. Only the last section is typed in the Claude input box.

Symbols ​

SymbolMeaningExample
~Your home foldercd ~
.The current foldergit add .
..The folder one level upcd ..
*Any number of characters (even none)inbox/meeting-*.txt
|Passes the output of the command before it to the next commandcat memo.txt | claude -p "Summarize this"
>Saves the output to a file (overwrites)claude -p "Summarize this" > summary.txt
>>Adds the output to the end of a fileecho second line >> memo.txt
<<'EOF'Passes everything up to the EOF line as input, as isSee below
"…"Groups text into one piece even if it has spacesclaude -p "two or more words"
;Runs the next command after the one before itpwd; ls
2>/dev/nullHides error text from the screenls no-such-folder 2>/dev/null
$?The exit code of the command just beforeecho $?

> erases the file's contents and writes it anew. Do not use it on a file you must not erase. <<'EOF' is for Mac and Linux only. In Windows PowerShell, make the file with Notepad.

The shape below, used in several chapters, is a bundle that makes one file.

bash
cat > memo.txt <<'EOF'
first line
second line
EOF

cat > memo.txt saves what it receives into memo.txt. <<'EOF' passes everything until a line with only EOF appears as the contents. So only the two middle lines go into the file. EOF is a mark that means "this is the end." Because it has quotes, text like $HOME is saved as is, without being changed.

Folders and Files ​

This table is for Mac and Linux. PowerShell also accepts names like ls, cd, cp, mv, and rm, but the options are different. So do not use ls -la or rm -rf as is in PowerShell. PowerShell commands are gathered in a separate section below.

CommandWhat it does
pwdShow the current folder
lsShow the list inside a folder
ls -laShow details, including hidden files
ls -aShow hidden files too
cd folderMove to that folder
mkdir folderMake a folder
mkdir -p a/b/cMake the in-between folders too, all at once
cp source targetCopy a file
mv source targetMove a file
cat fileShow a file's contents
rm fileDelete a file
rm -f fileDelete without an error even if the file does not exist
rm -rf folderDelete a folder along with everything inside
echo textPrint text
sleep 30Wait 30 seconds
source fileApply a file's settings to the current window
bash fileRun the commands written in a file, one after another
fgGo back to a program you paused with Ctrl + Z

The -p in mkdir -p is short for parents. It does not give an error even if the folder already exists.

rm does not go through the trash. -r means everything inside the folder, and -f means delete without asking. rm -rf cannot be undone. When you type it, be sure to read the folder name again.

Commands Used for Installing ​

CommandWhat it does
curl addressDownload the contents of a web address
curl -fsSL address | bashDownload an install file and run it right away
irm address | iexDownload and run it right away in PowerShell

-fsSL is four options written together.

  • -f: If the server returns an error, it does not pass on the error page.
  • -s: Hides the progress display.
  • -S: Still shows errors even when -s is used.
  • -L: Follows the address if it has moved.

irm downloads the file, and iex runs its contents.[1] Both lines in the table above run what they download as is. So use them only with addresses you can trust.

Windows PowerShell Commands ​

CommandWhat it does
$HOMEYour home folder
ls -ForceShow hidden files too
mkdir folder -ForceMove on without an error even if the folder already exists
Get-Content -Encoding UTF8 fileShow a file without garbling Korean text
Copy-Item source targetCopy a file
Move-Item source targetMove a file
Remove-Item fileDelete a file
Write-Output textPrint text
notepad fileOpen a file in Notepad
foreach (…) { … }Run what is inside { } for each item in a list
if ($LASTEXITCODE -eq 0) { … } else { … }Run the first part on success, the second on failure

$LASTEXITCODE is the exit code of the program that just finished. -eq 0 means "if it equals 0." 0 means success.

claude Commands ​

You type these in the terminal. The first word is claude.

CommandWhat it does
claudeStart a conversation
claude --versionShow the version
claude --permission-mode manualStart in manual mode
claude -cContinue the most recent conversation in this folder
claude -rPick a past conversation and open it
claude --resume nameOpen a named conversation right away
claude --safe-modeStart with your settings turned off
claude purgeDelete the saved records and state for this folder (do not practice with it)
claude -p "request"Ask once and finish
claude --worktree nameStart in a separate work folder
claude doctorCheck the install status
claude updateUpdate to the latest version
claude mcp add --transport http name addressAdd a remote MCP server
claude mcp listList MCP servers and their connection status
claude mcp remove nameRemove an MCP server

-r is the short name for --resume. claude purge is hard to undo. Do not run it for practice.

These are options you use with -p.

CommandMeaning
claude -p "request" --allowedTools "Read,Write"Sets the tools it may use without asking
claude -p "request" --max-turns 10The upper limit on how many times it keeps working
claude -p "request" --output-format jsonPrints the answer in JSON format

In --allowedTools, Read means reading files and Write means writing files. --transport http means a remote server that connects over HTTP.

git Commands ​

CommandWhat it does
git --versionCheck whether Git is installed
git initStart keeping records for this folder
git config user.name "name"Set the name written in records
git config user.email "email"Set the email written in records
git config core.quotePath falseShow Korean file names as they are
git add .Put changes in the current folder into the next record
git status --shortShow the change status briefly
git commit -m "description"Save a record with a description
git resetCancel what you put into the next record
git log --onelineShow records one line each

-m is short for message. --short means show the list briefly.

Claude Input Box Commands ​

Type these in the input box after you start claude. Only the common ones are gathered here. To see the full list, type / in the input box.

CommandWhat it does
/helpHelp
/exitQuit
/rename nameName the session
/resumeOpen a past conversation
/contextSee what is taking up the context
/compactShorten the conversation by summarizing it
/clearStart fresh with an empty conversation
/rewindOpen the rewind menu
/permissionsSee permission rules
/usageSee usage
/modelPick a model

Shortcuts are in Chapter 5.

References (1)
  1. Claude Code official docs, "Terminal guide for new users". "irm fetches the file and iex runs it." code.claude.com (checked on 2026-11-06) ↩︎