搜索
❏ 站外平台:

如何在 Ubuntu 中更改默认终端

作者: 译者: LCTT geekpi

| 2020-02-18 11:49   收藏: 1    

终端Terminal是 Linux 系统的关键部分。它能让你通过 shell 访问 Linux 系统。Linux 上有多个终端应用(技术上称为终端仿真器)。

大多数都有自己的终端实现。它们的外观可能有所不同,并且可能有不同的快捷键。例如,对高级用户非常有用,它提供了一些可能无法在发行版默认终端中使用的功能。

你可以在系统上其他终端,并将其设为默认,并能通过 打开。

现在问题来了,如何在 Ubuntu 中更改默认终端。它没有遵循的标准方式,要怎么做?

更改 Ubuntu 中的默认终端

在基于 Debian 的发行版中,有一个方便的letou行程序,称为 ,可用于处理默认应用。

你可以使用它来更改默认的letou行文本编辑器、终端等。为此,请运行以下letou:

sudo update-alternatives --config x-terminal-emulator

它将显示系统上存在的所有可作为默认值的终端仿真器。当前的默认终端标有星号。

abhishek@nuc:~$ sudo update-alternatives --config x-terminal-emulator 
There are 2 choices for the alternative x-terminal-emulator (providing /usr/bin/x-terminal-emulator).

  Selection    Path                             Priority   Status
------------------------------------------------------------
  0            /usr/bin/gnome-terminal.wrapper   40        auto mode
  1            /usr/bin/gnome-terminal.wrapper   40        manual mode
* 2            /usr/bin/st                       15        manual mode

Press <enter> to keep the current choice[*], or type selection number:

你要做的就是输入选择编号。对我而言,我想使用 GNOME 终端,而不是来自 的终端。

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/gnome-terminal.wrapper to provide /usr/bin/x-terminal-emulator (x-terminal-emulator) in manual mode

自动模式 vs 手动模式

你可能已经在 update-alternatives letou的输出中注意到了自动模式和手动模式。

如果选择自动模式,那么在或删除软件包时,系统可能会自动决定默认应用。该决定受优先级数字的影响(如上一节中的letou输出所示)。

假设你的系统上了 5 个终端仿真器,并删除了默认的仿真器。现在,你的系统将检查哪些仿真器处于自动模式。如果有多个,它将​​选择优先级最高的一个作为默认仿真器。

我希望你觉得这个小技巧有用。随时欢迎提出问题和建议。


via:

作者: 选题: 译者: 校对:

本文由 原创编译,Linux中国 荣誉推出



最新评论

LCTT 译者
geekpi 💎💎💎💎
共计翻译: 1491.5 篇 | 共计贡献: 2828
贡献时间:2013-10-25 -> 2021-07-23
访问我的 LCTT 主页 |


返回顶部

分享到微信

打开微信,点击顶部的“╋”,
使用“扫一扫”将网页分享至微信。