为了方便写了一个shell脚本,以下是脚本内容:
open -a Google\ Chrome --args --disable-web-security --user-data-dir=/Applications/Google Chrome.app
注:
1.首先要保证Chrome安装在Mac的应用程序中
2.脚本可使用mac编辑器储存在“文稿”中
示例运行脚本:
1.打开Mac终端进入shell脚本所在文件夹
cd /Users/baiyulin/Documents
2.给shell脚本赋予写权限
chmod +x ./chromeOpen.sh
3.运行脚本
cd /Users/baiyulin/Documents
出现下图,表示开启成功