Keep the useful bits, human.
Beginner field notes
- A shell command is an instruction for the active shell. Its spelling and meaning depend on that shell.
- In the simple example cd ./notes, cd names the command and ./notes supplies its folder argument.
- In a POSIX-style shell, pwd reports an absolute working-directory path. That printed path is output, not another command to enter.
See a worked example
Ask where this shell is working
One reviewed sample, shared across levels. Nothing here runs on your computer.
Example review recorded 2026-10-07 · version 1.
pwd/home/learner/human-labExample output only. In a POSIX-style shell, pwd prints your actual current directory. For a PowerShell filesystem session, use Get-Location and expect its own output format.
Sources for this sampleWhere does this instruction go?
A Terminal window can show a shell or run Claude Code. Check which program is ready for your input; the window’s name or a single prompt symbol is not enough.
- Ask your coding assistant
- A plain-language request goes in the assistant’s conversation. It can run a command only if that tool and your permission are available.
- Claude Code command
- A Claude Code slash command, such as
/plugin, belongs at the Claude Code prompt. It is not a shell command or a command for every chat website. - Computer terminal · shell prompt
- A shell command belongs in a shell, such as zsh or Bash. On a Mac, use Terminal or an editor’s integrated terminal with a shell ready for input.
Copying does not run anything. Read the instruction’s purpose and destination before entering it. Example output is a result to read, not another command.
Try one read-only step: find the current folder
Choose one route. You do not need to install HWTL or make an account to read these steps.
In this project, use a read-only shell command to show your current working folder and explain the result. Do not change files. If you cannot run a command, tell me. Or, at a Unix-style shell prompt on macOS or Linux:
pwd After entering pwd, press Enter and read the path it prints. Your path will differ from the sample lesson. In PowerShell, use Get-Location instead.
Separate terminal tabs and the assistant’s command tools may use different working folders. Check the location in the session where the next command will run; do not assume they match. A plain chat without command tools can explain the step, but cannot run it for you.
Visual
The reviewed description and complete diagram source are available here.
More of this diagram is available inside its frame. Focus the frame and use the arrow keys to pan.
Read the complete diagram source
This is the source for the reviewed diagram, not a command to run.
flowchart LR
C["Command name: pwd"] --> S["Shell runs command"]
S --> P["Output: current path"] Full explanation and primary sources
Reviewed explanation
The shell reads a command line and decides what to run. For named commands such as pwd, the name identifies what to run and following words can supply arguments. Some commands are built into the shell; others start separate programs. The detailed syntax depends on the shell, so an example written for one shell is not automatically valid in another.
For a first read-only example in a POSIX-style shell such as Bash or zsh, pwd prints the current working directory. It does not need an argument for this basic use. In PowerShell, Get-Location is the explicit command for showing the current location; PowerShell also supports providers beyond ordinary filesystem folders.
Type only a command you intend to run, then press Enter to execute it. The text that appears afterwards is output. If a tool reports an error, read it before retrying or changing the command. The example path below is illustrative; your own location will usually be different.
Source collection
- POSIX.1-2024: Shell Command Language
Used in: Quick notes · Worked example · Lesson text
Prompt conventions, simple commands, quoting/expansion, command search, redirection, execution environment and pipeline boundaries.
POSIX shell interpretation, simple command names and arguments, and builtin versus external utility execution.
- POSIX.1-2024: cd
Used in: Quick notes
Current-shell directory changes, relative operands, CDPATH, logical/physical modes, unsuccessful changes, separate environments and the -P/-e exit-status exception.
- POSIX.1-2024: pwd
Used in: Quick notes · Worked example · Lesson text
Reports an absolute working-directory pathname and defines -L/-P logical/physical behavior.
pwd writes an absolute pathname of the current working directory.
- Microsoft Learn: Get-Location (PowerShell 7.5)
Used in: Worked example · Lesson text
Get-Location reports the current PowerShell location, including provider/drive distinctions.
Notes AI source review · 2026-10-17
AI source comparison recorded 2026-10-07. Human learner validation is pending.
Quick quiz · one question
Keep the command name separate from its output
Sample scenario. Synthetic POSIX-style shell with working pwd and a known working directory. No options, arguments, aliases, functions, symbolic links, or shell startup behavior are modeled.
- Host and interpreter
A terminal window is displaying a POSIX-style shell session.- Current folder
/work/lesson-notes- Tutorial command line
$ pwd- Prompt convention
$ is the tutorial's shell prompt marker.
You are working in /work/lesson-notes and enter plain pwd. Which command name and output should this sample produce?
Why this answer?
Answers stay on this device.
Sources and exercise scope
- POSIX.1-2024: pwd
Plain pwd reports the current working directory as an absolute path, followed by a newline.
- POSIX.1-2024: Shell Command Language
Simple command processing distinguishes a command name and its arguments; execution is performed by the shell.
Original synthetic exercise. AI comparison against primary documentation recorded on 2026-10-08; the references above state their scope. Human learner validation has not been run. A result here records this attempt; it does not establish mastery.
Follow this learning pathLesson 6 of 8
From project files to a small program
Save or adjust this lesson
Make this lesson yours
Save it for later, or tell your robot what would help.
This correction stays on this browser. Browse all concepts if the topic is missing.
Familiarity is your own assessment. To use it in your coding tool, download your updated learning profile.
Familiarity and lesson feedback are saved on this browser. They do not sync to your account or coding tool.