案例:给"ls -l"命令,设置别名通过"ll"快速访问
1、在项目根目录底下查看有无.bash_profile文件,注意这个是个隐藏文件,需要使用ls -a命令查看:

没有.bash_profile新建一个文件, 在最后添加一行:

2、!wq保存退出。执行下面的命令:
source ~/.bash_profile
这样就设置成功,在执行一下"ll"就有这个命令了

案例:给"ls -l"命令,设置别名通过"ll"快速访问
1、在项目根目录底下查看有无.bash_profile文件,注意这个是个隐藏文件,需要使用ls -a命令查看:
没有.bash_profile新建一个文件, 在最后添加一行:
2、!wq保存退出。执行下面的命令:
source ~/.bash_profile
这样就设置成功,在执行一下"ll"就有这个命令了