Aliases I

What happens when you store this alias in ~/.bash_profile?

alias pd="pwd"

The alias command allows you to create keyboard shortcuts, or aliases, for commonly used commands.

  1. Here alias pd="pwd" creates the alias pd for the pwd command, which is then saved in the bash profile. Each time you enter pd, the output will be the same as the pwd command.
  2. The command source ~/.bash_profile makes the alias pd available in the current session.

Each time we open up the terminal, we can use the pd alias.

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.