一、打开终端,切换为root用户(su root,而后输入密码)vim
二、在usr下建立local目录(mkdir local),local目录下建立bin目录bash
三、建立Sublime的软连接,以下图app
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublspa
四、打开ect下的.bash_profile文件配置(vim .bash_profile),若不存在该文件(touch .bash_profile),加入此行命令io
/usr/local/bin就是刚才放置sublime软连接的地址路径配置
五、保存.bash_profile文件,而后更新配置(source .bash_profile)file
六、使用软连接subl打开文件夹,能够直接将文件夹拖至终端可显示其路径终端
打开文件夹以下图所示:密码