How do I create a Bash alias?

后端 未结 16 676
一个人的身影
一个人的身影 2020-11-28 17:38

I\'m on OSX and I need to put something like this, alias blah=\"/usr/bin/blah\" in a config file but I don\'t know where the config file is.

16条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 18:06

    On OS X you want to use ~/.bash_profile. This is because by default Terminal.app opens a login shell for each new window.

    See more about the different configuration files and when they are used here: What's the difference between .bashrc, .bash_profile, and .environment?

    and in relation to OSX here: About .bash_profile, .bashrc, and where should alias be written in?

提交回复
热议问题