Print Working Directory
Part of the Fundamentals section of Coddy's Terminal journey — lesson 4 of 82.
The pwd command stands for Print Working Directory. It shows you the full path of the directory you are currently in.
When you open a terminal, you start in your home directory. The pwd command helps you confirm exactly where you are in the filesystem at any moment.
Simply type pwd and press Enter:
pwdThe output will look something like this:
/homeThis is called a path — it shows the full location of your current directory, starting from the root of the filesystem (/).
Understanding paths:
/— the root of the entire filesystem/home— the home directory
/home/documents— the documents folder inside home
pwd is especially useful when you have navigated deep into different folders and need to remember where you are.
Challenge
BeginnerUse the pwd command to print your current working directory.
Hint:
pwdtakes no arguments — just type it and press Enter!
Cheat sheet
The pwd command stands for Print Working Directory and shows the full path of your current location in the filesystem:
pwdExample output:
/homeUnderstanding paths:
/— the root of the entire filesystem/home— the home directory/home/documents— the documents folder inside home
Try it yourself
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
4Directories
Create A DirectoryCopy A DirectoryMove And Rename A DirectoryDelete A DirectoryRecap - Directory Operations7File Content
Head And TailWord CountSort CommandUnique CommandGrep BasicsGrep With FlagsRecap - Text Detective2Navigation
Print Working DirectoryList FilesChange DirectoryAbsolute vs Relative PathsHome And Root DirectoryRecap - Find Your Way8Redirection
Standard OutputOverwrite To A FileAppend To A FileStandard InputStandard ErrorRecap - Log Builder6Wildcards And Patterns
The Star WildcardThe Question Mark WildcardBracket WildcardsCombining WildcardsRecap - Selective Operations9Piping
What Is A PipeChaining Two CommandsChaining Multiple CommandsPipe With GrepRecap - Data Pipeline