Recall & Review
beginner
What does the
pwd command do in Linux?The
pwd command shows the full path of the current directory you are in. It tells you exactly where you are in the folder structure.Click to reveal answer
beginner
How can
pwd help when you feel lost in the terminal?If you don't know which folder you are working in, running
pwd will print your current location. This helps you avoid mistakes like creating files in the wrong place.Click to reveal answer
beginner
True or False:
pwd changes your current directory.False.
pwd only shows your current directory path. It does not move you to another directory.Click to reveal answer
beginner
What is the typical output format of
pwd?It outputs an absolute path starting with a slash
/, like /home/username/Documents. This path shows the full route from the root folder to your current folder.Click to reveal answer
intermediate
Can
pwd be used in scripts? Why?Yes,
pwd is often used in scripts to get the current directory path. This helps scripts know where they are running and manage files correctly.Click to reveal answer
What does the
pwd command display?✗ Incorrect
pwd prints the full path of the directory you are currently in.If you run
pwd and see /home/user, where are you?✗ Incorrect
/home/user is the home directory for the user named 'user'.Does
pwd change your location in the terminal?✗ Incorrect
pwd only prints your current directory path; it does not change it.Which symbol usually starts the output of
pwd?✗ Incorrect
The output is an absolute path starting with a slash
/.Why might a script use
pwd?✗ Incorrect
Scripts use
pwd to know the current directory path for file operations.Explain what the
pwd command does and why it is useful.Think about how you find your location on a map.
You got /3 concepts.
Describe a situation where using
pwd in a script would be helpful.Imagine a script saving files and needing to know where to put them.
You got /3 concepts.