Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacFan26

macrumors 65816
Original poster
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 🙂
 
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.
 
Thank you! I knew there was some other file I needed...but I didn't know what it was 😱
 
I think it maybe not necessary to create .bash_profile file if U already have .profile in Ur home dir.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.