MOTD ⚙ CHAPTERS 01 / 05
TODAY'S QUIZ0 / 5 STREAK0 days POINTS0 THE OPERATOROpen

$man 1 pwd

Ten things the page says. Every one of them is on your machine right now — run the command above and check.

  1. 01

    Print the full filename of the current working directory.[man]

  2. 02
    -L, --logical

    use PWD from environment, even if it contains symlinks.[man]

  3. 03

    NOTE: your shell may have its own version of pwd, which usually supersedes the version described here.[man]

  4. 04

    Please refer to your shell's documentation for details about the options it supports.[man]

  5. 05

    pwd prints the name of the current directory.[info]

  6. 06
    -L, --logical

    If the contents of the environment variable 'PWD' provide an absolute name of the current directory with no '.' or '..' components, but possibly with symbolic links, then output those contents.[info]

  7. 07
    -P, --physical

    Print a fully resolved name for the current directory.[info]

  8. 08

    That is, all components of the printed name will be actual directory names - none will be symbolic links.[info]

  9. 09

    If -L and -P are both given, the last one takes precedence.[info]

  10. 10

    If neither option is given, then this implementation uses -P as the default unless the 'POSIXLY_CORRECT' environment variable is set.[info]

$run --yourself

Find out where you actually are

There are two right answers to 'where am I' when symlinks are involved, and pwd -P is the one the kernel agrees with.

These commands write files, so run them in a scratch directory:

$ mkdir -p ~/motd-lab && cd ~/motd-lab
~/motd-lab
$ pwd
$ ln -sfn . here
$ cd here
$ pwd
$ pwd -P

WHAT YOU SHOULD SEEAfter stepping through the symlink, pwd shows the path with 'here' in it and pwd -P shows the real resolved path underneath.

$quiz -n 5

Five questions, each one taking a term out of a line above. Ten points for each. Tap hear it to have a question read to you; answering plays the verdict.

QUESTION 1 OF 5

Which term completes this line from the page? “Print the full filename of the current working _____.”

From point 1 above.

QUESTION 2 OF 5

Which term completes this line from the page? “NOTE: your shell may have its own version of pwd, which usually _____ the version described here.”

From point 3 above.

QUESTION 3 OF 5

Which term completes this line from the page? “pwd _____ the name of the current directory.”

From point 5 above.

QUESTION 4 OF 5

Which term completes this line from the page? “Print a fully _____ name for the current directory.”

From point 7 above.

QUESTION 5 OF 5

Which term completes this line from the page? “If -L and -P are both given, the last one takes _____.”

From point 9 above.

Answer all five to bank your points.

$play --chapters 5

Five chapters, three voices. Tap one to jump — the player at the bottom of the screen follows.

download the full edition

$tee --everyone

Know someone with ten minutes and a terminal? Send them today's page. This is the card that appears when you post it:

Share card for pwd(1): print name of current/working directory
2026-09-28 · 1200×630

$su - operator

The Operator has a dispatch on pwd(1), and he files them for subscribers only. It is free. Join the club, or read about the series.

MOTD is a weekday reading of one manual page already installed on your own machine. Every statement is quoted from that page or from the GNU info documentation beside it, and every edition names the command that shows you the source.

archive · the operator · about · podcast · Feline Union

NARRATION · 3 VOICES · 01
Last login