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.
I’m on OSX and I need to put something like this, alias blah=/usr/bin/blah in
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can add an
aliasor afunctionin your startup script file.MacOS 10.13 High Sierra and earlier:
The default shell is bash. Usually the startup script file is
.bashrc,.bash_loginor.profilefile in your home directory.Since these files are hidden you will have to do an
ls -ato list them. If you don’t have one you can create one.If I remember correctly, when I had bought my Mac, the
.bash_loginfile wasn’t there. I had to create it for myself so that I could putprompt info,alias,functions, etc. in it.Here are the steps if you would like to create one:
cd ~/to go to your home foldertouch .bash_profileto create your new file..bash_profilewith your favorite editor (or you can just typeopen -e .bash_profileto open it in TextEdit.. .bash_profileto reload.bash_profileand update any alias you add.