linux终端打开谷歌浏览器(Centos7如何安装google-chrome浏览器)(1)


一. 配置yum源

在目录 /etc/yum.repos.d/ 下新建文件 Google-chrome.repo

vim /etc/yum.repos.d/google-chrome.repo

按i进入编辑模式写入如下内容:

[google-chrome] name=google-chrome baseurl=https://dl.google.com/linux/chrome/rpm/stable/x86_64 enabled=1 gpgcheck=1 gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

按esc退出编辑模式,进入命令模式输入:wq保存并退出:

二.安装google chrome浏览器

Google官方源安装:

yum -y install google-chrome-stable

Google官方源可能在中国无法使用,导致安装失败或者在国内无法更新,可以添加以下参数来安装:

yum -y install google-chrome-stable --nogpgcheck

linux终端打开谷歌浏览器(Centos7如何安装google-chrome浏览器)(2)

显示安装完成

三.在桌面创建桌面快捷方式

cp /usr/share/applications/google-chrome.desktop /root/桌面/

linux终端打开谷歌浏览器(Centos7如何安装google-chrome浏览器)(3)

我们可以看到桌面有一个google-chrome.desktop的快捷方式

linux终端打开谷歌浏览器(Centos7如何安装google-chrome浏览器)(4)

接下来输入以下命令授权

chmod 777 /root/桌面/google-chrome.desktop

然后在该快捷方式下鼠标右键打开属性在命令后面添加 --no-sandbox 关闭

linux终端打开谷歌浏览器(Centos7如何安装google-chrome浏览器)(5)

四、最后双击该快捷方式选 “Trust and Launch”即可打开浏览器

linux终端打开谷歌浏览器(Centos7如何安装google-chrome浏览器)(6)

我们熟悉的chrome图标就回来了

linux终端打开谷歌浏览器(Centos7如何安装google-chrome浏览器)(7)


over

,