Skip to content

noahgift/Coursera-DE-C2-configure-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Coursera-DE-C2-configure-shell

Learn to configure the shell environment by editing .bashrc

Config == Automation bash-config

Goal: Learn to configure

Let's practice configuring the Bash shell

Part 1: Open ~/.bashrc and edit it

  1. Edit the Bash configuration file ~/.bashrc by using Vim, vim ~/.bashrc or opening the Visual Studio Code Editor
  2. Add the following statements at the end of the file:
export API="API-Key-Goes-Here"
echo "This is an example of using a variable at shell launch: " $API

  1. Test this out by sourcing the new config: source ~/.bashrc. What did you see?

Part 2: Open a second shell and interact with new environment

  1. Open a new shell. What did you see?
  2. Echo the variable $API echo $API
  3. What do you see?

Part 3: Create an alias in ~/.bashrc and use it

  1. Edit the Bash configuration file ~/.bashrc by using Vim, vim ~/.bashrc or opening the Visual Studio Code Editor
  2. Add the following statements at the end of the file:
alias root="cd /"

  1. Test this out by sourcing the new config: source ~/.bashrc. What did you see when you type in alias?
  2. What do you see when you type in root? Why could this be helpful to you personally?

About

Learn to configure the shell environment by editing .bashrc

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages