Mac常用配置

mac索引

重建 spotlight 索引

1
sudo mdutil -i off /

关闭索引

1
sudo mdutil -E

该命令用来重建索引

1
sudo mdutil -i on /

homebrew 安装

简介:macOS 缺失的软件包管理器

autojump 快速跳到自己熟悉的目录

1
2
安装
$ brew install autojump

配置在.zshrc文件中,plugins 一行中配置,例如plugins=(git autojump) 中间用空格隔开。

.bashrc VS .bash_profile

参考

.bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.

To do this, add the following lines to .bash_profile:

1
2
3
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

Now when you login to your machine from a console .bashrc will be called.

0%