当前位置: 代码迷 >> 综合 >> mac在命令行启动Chrome
  详细解决方案

mac在命令行启动Chrome

热度:29   发布时间:2024-01-31 13:07:12.0

命令行输入:open ~/.bash_profile,回车

在文件中添加如下配置:

#将"Google\ Chrome"添加到环境变量中
export PATH="/Applications/Google\ Chrome.app/Contents/MacOS":$PATH
#给命令"Google\ Chrome"起别名chrome
alias chrome="Google\ Chrome"

命令行输入:source ~/.bash_profile回车

在命令行输入chrome,回车,此时就可以打开浏览器

 

  相关解决方案