Skip to content
Atlas, your robot learning host

Interim portrait

Atlas · Foundations working-directory

Hello, little human. I am Atlas. One useful idea is plenty for a beginning. Read the explanation, then explore an example.

Choose your robot No recording yet · text complete
concept for everyone

Working Directory

The working directory is the location a shell uses when resolving ordinary relative file paths.

Tune in, human.

Reviewed videos and Shorts

Captions requested · no autoplay

Finding reviewed videos…

    Keep the useful bits, human.

    Beginner field notes

    Choose explanation level
    • The working directory is the folder used as the starting point for ordinary relative paths in the current shell environment.
    • In the illustrated POSIX-style shell, pwd prints an absolute pathname for the current working directory.
    • If notes is an existing subfolder, cd ./notes asks the current shell to enter it. It does not move that folder somewhere else.
    See a worked example

    Change the base for relative paths

    One reviewed sample, shared across levels. Nothing here runs on your computer.

    Example review recorded 2026-10-07 · version 1.

    Example input · do not paste
    pwd
    cd ./notes
    pwd
    Example output · do not paste
    /home/learner/human-lab
    /home/learner/human-lab/notes

    Illustrative POSIX-shell output. The notes folder must already exist beneath the initial human-lab folder. cd normally produces no output here; the two displayed paths come from the two pwd commands.

    Sources for this sample

    Where 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.

    Ask your coding assistantAsk about the assistant’s working folder
    Paste this request into your coding assistant’s conversation.
    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:

    Computer terminal · shell promptShow this shell’s working folder
    Enter this at a shell prompt, outside an active coding-assistant conversation.
    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

    After a successful cd ./notes command, the shell’s working directory changes from human-lab to its notes subfolder.

    The reviewed description and complete diagram source are available here.

    Read the complete diagram source

    This is the source for the reviewed diagram, not a command to run.

    flowchart LR
      A["Working directory: human-lab"] -->|"cd ./notes"| B["Working directory: human-lab/notes"]
    Full explanation and primary sources

    Reviewed explanation

    A shell session has a working directory. It is the starting point for ordinary relative path arguments in the examples here. Opening another terminal tab can give you a different session with a different working directory, so check the current location instead of assuming it matches another tab.

    In the simple POSIX-shell example, cd ./notes changes the shell’s working directory to an existing notes subfolder. The ./ prefix explicitly starts from the current directory. It changes the shell’s location; it is not a command to move the folder or delete its contents. pwd shows the resulting location.

    The example assumes a human-lab folder with a notes subfolder already inside it. If the target folder does not exist or is inaccessible, cd can fail; the example does not create it for you. Before running a script by filename, check that you are in the folder containing it or supply the appropriate path.

    Source collection

    Notes AI source review · 2026-10-17

    AI source comparison recorded 2026-10-07. Human learner validation is pending.

    Quick quiz · one question

    Track the working directory through a failed change

    Sample scenario. Synthetic POSIX shell. Only the listed folders exist and are accessible; no symbolic links or CDPATH lookup apply. Steps continue after the failed cd. Predict stdout from pwd only; the failed cd has a diagnostic whose exact wording is outside this model.

    Initial working directory
    /human-lab
    Existing accessible folder
    /human-lab
    Existing accessible folder
    /human-lab/notes
    Step 1
    cd ./notes
    Step 2
    pwd
    Step 3
    cd ./missing
    Step 4
    pwd
    Resolve after the steps
    plan.txt

    Follow the four steps. What is the final working directory, where does plan.txt point, and what are the two pwd output lines?

    Answers stay on this device.

    Sources and exercise scope
    • POSIX.1-2024: cd

      cd changes the current shell working directory; an unsuccessful change leaves that directory unchanged.

    • POSIX.1-2024: pwd

      Plain pwd reports the current working directory as an absolute path, followed by a newline.

    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 7 of 8
    Save or adjust this lesson
    Reference notes · file removal and public access

    Robot reference desk

    Understand what can change

    These reviewed public notes are available to everyone. They do not establish that an operation ran or inspect your files, backups or permissions.

    File removal

    Before deleting files: deleting a file can remove it without putting it in Trash or a recycle bin, and recovery is not guaranteed. Check the intended targets and whether a usable backup or recovery option exists before continuing.

    Sources for this note

    Public access

    Before making a resource public: public read access can let anyone view the exposed content, and public write access can allow changes to data. Check the actual audience, exposed content and allowed operations before continuing. This guidance does not inspect or change your permissions.

    Sources for this note

    A link can carry these public reference topics in its fragment. Page scripts, extensions, browser history and copied links can read them. This page attempts to minimize that fragment when JavaScript runs; reloading afterward can lose the selection. No project details or conversation text belong in a lesson link. Privacy details.