Mac 下使用ll命令(自定义命令bash)_index_ling的博客-CSDN博客
目录
1、打开文件bash_profile
vim ~/.bash_profile
2、键入命令别名,保存退出
alias ll='ls -alF'
alias la='ls -A'
3、测试:新打开一个命令行或刷新bash文件立即生效
source命令:更新
可以执行 source ~/.profile
更新系统环境变量,bash命令立即生效
# 刷新bash命令立即生效
source .bash_profile
# 测试自定义命令 ll
admin@bogon ~ % ll
total 160
drwxr-xr-x+ 37 admin staff 1184 6 25 21:54 ./
drwxr-xr-x 6 root admin 192 5 10 05:30 ../
-r-------- 1 admin staff 9 3 29 17:23 .CFUserTextEncoding