Mac aliases in bash

MacFan26

macrumors 65816
Original poster
Jan 8, 2003
1,219
1
San Francisco, California
hey guys,

Does anyone have aliases set in their terminal? I've been trying to add one, and it will work in that same window, but not if I open a new window or quit and reopen terminal. Any ideas? I'm just using alias blah="my command"

thanks :)
 

plinden

macrumors 68040
Apr 8, 2004
3,968
3
Where are you setting the alias?

If it's just in the command line, then the alias is set only for the duration of that terminal session and isn't inherited by any new shells.

To set aliases and environment variables that are universally accessible, create .bash_profile if it isn't already present and add them to it ... that is, if you're using bash, which you should.
 

drm12

macrumors newbie
Oct 12, 2008
1
0
I think it maybe not necessary to create .bash_profile file if U already have .profile in Ur home dir.