Make a new folder and cd into it.

mkcd(){ NAME=$1; mkdir -p "$NAME"; cd "$NAME"; }

August 3, 2017PrasannaNatarajan

Explanation

Paste this function in the ~/.bashrc file.

Usage:

mkcd name1

This command will make a new folder called name1 and cd into the name1.

I find myself constantly using mkdir and going into the folder as the next step. It made sense for me to combine these steps into a single command.