Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install multiple terminals in Linux and change the default terminal

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to install multiple terminals in Linux and change the default terminal". The explanation in the article is simple and clear and easy to learn and understand. please follow the editor's train of thought to study and learn "how to install multiple terminals in Linux and change the default terminal".

The terminal is a key part of any Linux system. It allows you to access the Linux system through shell. Although today's Linux distributions, such as Ubuntu,CentOS, can basically use GUI to accomplish most general tasks. However, terminal programs are still essential for Linux users.

And most desktop environments have their own terminal implementations, if you have multiple terminal applications on your Linux system. It may look different and may use different keyboard shortcuts.

For example, the perfectly handsome terminal Guake Terminal provides some features that may not be available in the distribution terminal by default.

You can install another terminal on your system and use it as the default terminal, using the usual keyboard shortcut Ctrl + Alt + T to open it.

We can also install the enhanced terminal Terminator in Ubuntu with the following installation command:

[linuxidc@linux:~/www.linuxidc.com] $sudo apt install terminator

The effect picture is as follows:

Terminator can launch multiple terminals in Ubuntu in the same window. You can freely divide the area in a window to establish a new terminal, and adjust the size of each terminal through mouse stretching, which is very convenient for users who need to operate multiple terminals at the same time. When operating multiple servers at the same time, you don't have to switch terminal windows, you can do it in one window, which is really very convenient.

Then install zsh as a terminal in Ubuntu with the following installation command:

[linuxidc@linux:~/www.linuxidc.com] $sudo apt install zsh

After installation, it is beautified. Use curl to install oh-my-zsh.

[linuxidc@linux:~/www.linuxidc.com] $sh-c "$(curl-fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)")

After installation, it is as follows:

And the completion of traditional shell can basically get off work in front of zsh.

Instead of bash, set zsh as the default shell

[linuxidc@linux:~/www.linuxidc.com] $chsh-s / bin/zsh

To switch back to bash:

[linuxidc@linux:~/www.linuxidc.com] $chsh-s / bin/bash

Check what shell the system has

[linuxidc@linux:~/www.linuxidc.com] $cat / etc/shells # / etc/shells: valid login shells / bin/sh / bin/bash / bin/rbash / bin/dash / usr/bin/fish / bin/zsh / usr/bin/zsh

/ usr/bin/zsh now comes the problem of how to change the default terminal of the system in Ubuntu with so many Linux terminals installed. Is there a standard way to change the default application in Ubuntu? don't worry, see the following article.

In Debian-based distributions, there is a convenient command-line utility called update-alternatives, which allows you to work with default applications.

You can use it to change the default command line text editor, terminal, and so on. To do this, run the following command:

Sudo update-alternatives-config x-terminal-emulator

It displays all terminals that exist on the system, and the current default terminal is marked with an asterisk.

[linuxidc@linux:~/www.linuxidc.com] $sudo update-alternatives-password for config x-terminal-emulator [sudo] linuxidc: there are 6 candidates available to replace x-terminal-emulator (provide / usr/bin/x-terminal-emulator). Select path priority status-0 / usr/bin/terminator 50 automatic mode * 1 / usr/bin/gnome-terminal.wrapper 40 manual mode 2 / usr/bin/koi8rxterm 20 manual mode 3 / usr/bin/lxterm 30 manual mode 4 / usr/bin/terminator 50 manual mode 5 / usr/bin/uxterm 20 manual mode 6 / usr/bin/xterm 20 manual mode to maintain the current value [*] press Or type the selected number: 5 update-alternatives: use / usr/bin/uxterm to provide / usr/bin/x-terminal-emulator (x-terminal-emulator) in manual mode

All you have to do now is enter the selection number.

Automatic mode and manual mode

You may have noticed automatic mode and manual mode in the output of the update-alternatives command.

If you choose automatic mode, the system may automatically determine the default application when you install or remove the package. This decision is affected by the priority number (as shown in the command output above).

Suppose you have 2 terminals installed on your system and the default terminals have been deleted. Your system will now check which terminals are in automatic mode. If there is more than one, it selects the one with the highest priority as the default terminal.

Thank you for your reading, the above is the content of "how to install multiple terminals in Linux and change the default terminal". After the study of this article, I believe you have a deeper understanding of how to install multiple terminals in Linux and change the default terminal. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 230

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report