linux(mac)可以通過alias自定義一些shell命令。以mac下定義
ll
命令為例:
- 編輯.bashrc文件(mac下可能叫.bash_profile):
vim ~/.bash_profile
椿争; - 在最后一行添加:
alias ll="ls -lah"
(注意=兩邊別有空格)福青; - 保存后執(zhí)行
source ~/.bash_profile
(或者source ~/.bashrc
)即可;
linux(mac)可以通過alias自定義一些shell命令。以mac下定義
ll
命令為例:
vim ~/.bash_profile
椿争;alias ll="ls -lah"
(注意=兩邊別有空格)福青;source ~/.bash_profile
(或者source ~/.bashrc
)即可;