Skip to content

Instantly share code, notes, and snippets.

@mdang
Last active November 17, 2021 23:31
Show Gist options
  • Select an option

  • Save mdang/75673af53ecdd168052ef2a064cb9e21 to your computer and use it in GitHub Desktop.

Select an option

Save mdang/75673af53ecdd168052ef2a064cb9e21 to your computer and use it in GitHub Desktop.
Exercise: Create a Bash Alias

Create a Bash Alias

15 min

Let's get some practice with modifying our .bash_profile by creating some useful command aliases.

  • Create an alias so that anywhere in the terminal you can type class and it will automatically cd into your WDI code directory
  • Create an alias to cd directly into a projects directory inside of your WDI code folder

Tips

  • Open up your .bash_profile in the editor by typing the command atom ~/.bash_profile
  • Remember that you can create an alias for any command by following the format: alias [alias_name]="[command_to_run]"
  • Anytime you modify the .bash_profile, you need to remember to either source ~/.bash_profile the file or run the command reload for the new changes to take effect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment