Command pwd
Explore the pwd command to identify your current directory within the Bash shell. Understand the difference between parameters and options in commands, use the tilde abbreviation for home directories, and practice using autocomplete to efficiently navigate and manage the file system.
We'll cover the following...
pwd
Depending upon our Bash configuration, the current directory may be displayed in the command prompt itself. This feature, however, is not enabled in Linux and macOS by default.
When we start the terminal, it opens the home directory of the current user. Bash abbreviates this path with the tilde symbol ~. We see this symbol before the command prompt. Use a tilde instead of the home directory absolute path. It makes our commands shorter.
It’s time to practice with Bash. We can see the terminal ...