
ubuntu 默認命令行
Ubuntu Linux has a default browser functionality that will automatically launch the correct browser when clicking on a link in a gnome gui application. It’s easy enough to set the default browser using the GUI tools, but sometimes it’s easier to set it using the command line client.. for instance, if you are trying to remotely administer a machine.
Ubuntu Linux具有默認的瀏覽器功能,當單擊gnome gui應用程序中的鏈接時,它將自動啟動正確的瀏覽器。 使用GUI工具設置默認瀏覽器很容易,但是有時候使用命令行客戶端設置它更容易。例如,如果您嘗試遠程管理計算機。
To change this setting, we’ll use the update-alternatives command.
要更改此設置,我們將使用update-alternatives命令。
sudo update-alternatives –config x-www-browser
sudo update-alternatives –config x-www-browser
You should see something similar to this. You’ll notice that konqueror is the default browser on my computer right now.
您應該會看到類似的內容。 您會注意到konqueror現在是我計算機上的默認瀏覽器。
$ sudo update-alternatives –config x-www-browser
$ sudo update-alternatives –config x-www-browser
There are 2 alternatives which provide `x-www-browser’.
有兩種提供“ x-www-browser”的方法。
Selection Alternative ———————————————– 1 /usr/bin/firefox *+ 2 /usr/bin/konqueror
選擇方案———————————————– 1 / usr / bin / firefox * + 2 / usr / bin / konqueror
Press enter to keep the default[*], or type selection number:
按Enter鍵保留默認值[*],或輸入選擇編號:
If I wanted to select firefox as the default browser, I could just type 1 and hit enter.
如果我想選擇firefox作為默認瀏覽器,我可以只輸入1并按Enter。
翻譯自: https://www.howtogeek.com/howto/ubuntu/set-the-default-browser-on-ubuntu-from-the-command-line/
ubuntu 默認命令行