ubuntu 默认命令行_从命令行在Ubuntu上设置默认浏览器

ubuntu 默认命令行

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值