mac 设置 ll 命令

1、首先在 ~/.bash_profile 文件中加入如下命令
alias ll='ls -alF'

2、执行 source ~/.bash_profile 命令,使修改生效

这样就可以使用 ll 命令了,但是每次新开的终端 ll 命令都会失效,以下是解决方案

1、在 ~/.zshrc 文件中加入如下命令
source ~/.bash_profile

若没有.zshrc 文件,则执行 touch .zshrc 命令就可以;

2、执行 source ~/.zshrc 是文件生效,这样每次打开的新终端,都可以使用 ll 命令啦。

posted @ 2022-04-01 16:57  masy  阅读(1326)  评论(0编辑  收藏  举报