Debian

如何從命令行安裝瀏覽器?

  • September 23, 2020

我用 Xfce 桌面環境安裝了 Debian 10。我安裝了一組最少的瀏覽器,如下所示:

$ sudo apt -y install firefox chromium

出於開發目的,我還想安裝opera,yandex-browsergoogle-chrome. 以前我為此使用了瀏覽器。

我怎樣才能從控制台做到這一點?

創建一個安裝瀏覽器的腳本,它由兩部分組成:首先添加瀏覽器儲存庫,然後從這些儲存庫中安裝瀏覽器本身。browsers.deb.sh

wget -qO - https://deb.opera.com/archive.key | sudo apt-key add

sudo tee /etc/apt/sources.list.d/opera-stable.list <<DEBREPO
# This file makes sure that Opera Browser is kept up-to-date
# as part of regular system upgrades
deb https://deb.opera.com/opera-stable/ stable non-free #Opera Browser (final releases)
DEBREPO

sudo tee /etc/apt/sources.list.d/opera-developer.list <<DEBREPO
# This file makes sure that Opera Browser is kept up-to-date
# as part of regular system upgrades
deb https://deb.opera.com/opera-developer/ stable non-free #Opera Browser (final releases)
DEBREPO

wget -qO - https://repo.yandex.ru/yandex-browser/YANDEX-BROWSER-KEY.GPG | sudo apt-key add

sudo tee /etc/apt/sources.list.d/yandex-browser-beta.list <<DEBREPO
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://repo.yandex.ru/yandex-browser/deb beta main
DEBREPO

wget -qO - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add

sudo tee /etc/apt/sources.list.d/google-chrome.list <<DEBREPO
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
DEBREPO

sudo apt update
sudo apt -y install opera-stable opera-developer yandex-browser-beta google-chrome-stable

opera-developer opera-stable yandex-browser-beta google-chrome-stable

引用自:https://unix.stackexchange.com/questions/610857