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 默认命令行