Command Line Navigation Flashcards
7 cards from real 010-160 practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Command Line Navigation flashcards as text
Which command displays the full path of the current working directory?
Answer: pwd
The `pwd` (print working directory) command outputs the absolute path of the current directory.
What does the tilde (~) represent in a Linux shell?
Answer: The current user's home directory
In bash and most Linux shells, `~` expands to the current user's home directory (e.g., /home/alice).
Which command would change to the previous working directory you were in?
Answer: cd -
`cd -` switches back to the previously visited directory, equivalent to `cd $OLDPWD`.
What is the absolute path of the root directory in Linux?
Answer: /
The root directory is represented by a single forward slash `/`, which is the top of the filesystem hierarchy.
If you are in /home/user/docs and type 'cd ../..', where will you end up?
Answer: /home
Each `..` moves one level up: from docs to user, then from user to home, landing at /home.
Which environment variable stores the path to the current user's home directory?
Answer: $HOME
The `$HOME` environment variable contains the absolute path to the current user's home directory.
What does 'cd' with no arguments do in bash?
Answer: Changes to the home directory
Running `cd` without arguments is equivalent to `cd ~` and takes you to the current user's home directory.