You can add an alias
or a function
in your startup script file. Usually this is .bashrc
, .bash_login
or .profile
file in your home directory.
Since these files are hidden you will have to do an ls -a
to list them. If you don't have one you can create one.
If I remember correctly, when I had bought my Mac, the .bash_login
file wasn't there. I had to create it for myself so that I could put prompt info
, alias
, functions
, etc. in it.
Here are the steps if you would like to create one:
- Start up Terminal
- Type
cd ~/
to go to your home folder
- Type
touch .bash_profile
to create your new file.
- Edit
.bash_profile
with your favorite editor (or you can just type open -e .bash_profile
to open it in TextEdit.
- Type
. .bash_profile
to reload .bash_profile
and update any alias you add.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…