problem setting up bash_profile

by Boris Grunwald   Last Updated February 20, 2017 10:02 AM

I cd to my '~' directory, then I made a bash_profile with nano ~/.bash_profile with an alias alias test = 'mkdir test'
then when i type source ~/.bash_profile it says

 -bash: alias: mk: not found
 -bash: alias: =: not found
 -bash: alias: mkdir test: not found`

Why is that?



Answers 1


You have to remove the whitespace around the =.

alias test='mkdir test'

will work.

Wayne_Yux
Wayne_Yux
February 20, 2017 09:27 AM

Related Questions


"export PS1=" for customizing shell prompting

Updated December 07, 2017 11:02 AM


Prepend current git branch in terminal

Updated October 31, 2017 04:02 AM

change prompt of terminal, permanently | how

Updated November 21, 2017 12:02 PM

Difference between $ and # in Linux environment

Updated January 17, 2018 17:02 PM