1. brew使用
brew 又叫Homebrew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件, 只需要一个命令, 非常方便。
brew install tree
#显示所有文件和目录$ tree -a#在文件和目录清单加上色彩,便于区分各种类型$ tree -C#显示目录名称而非内容$ tree -d#列出文件或目录的更改时间$ tree -D#在每个文件或目录之前,显示完整的相对路径名称$ tree -f
2. 终端ll解决方案
$ echo "alias ll='ls -alF'">>.bash_profile$ source ~/.bash_profile// 解决每次使用mac都要进行配置的问题$ echo "soucre .bash_profile">>.bash_profile
3. 终端code解决方案
参考:https://code.visualstudio.com/docs/setup/mac
#进入bin目录$ cd /usr/local/bin#从vscode中的path中删除代码$ sudo rm -rf code#启动vscodecommand + shift + p --> install code
4. 给Terminal终端添加命令提示插件
1、打开一个终端新界面
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
- 打开~/.zshrc文件,添加
3、终端执行source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/.zshrc
4. mac常用命令汇总
```javascript日历
$ cal [month] [year]
日期
$ date
```javascript#给某个命令定义别名$ alias xxx='example'例如open命令$ cd ~/.bash_profile$ echo "alias op='open'">>.bash_profile或者vim进行编辑
