Ubuntu: Change Default Terminal Emulator

Changing the default terminal emulator in Ubuntu can sometimes lead to the error ‘Too many levels of symbolic links’. This issue can occur during the configuration of terminal alternatives. This guide will help you understand how to resolve this problem and set your preferred terminal emulator as the default on Ubuntu.

In this tutorial you will learn:

  • How to install and configure a new terminal emulator
  • How to fix the ‘Too many levels of symbolic links’ error
Ubuntu: Change Default Terminal Emulator
Ubuntu: Change Default Terminal Emulator
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu Desktop ( 16.04, 18.04, 20.04, 22.04, 24.04 )
Software Terminator, GNOME Terminal, or any preferred terminal emulator
Other Access to Terminal
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Introduction to Changing the Default Terminal

Ubuntu users may prefer to use a different terminal emulator than the default GNOME Terminal. Common alternatives include Terminator and Tilix. Switching the default terminal properly ensures that shortcut keys and context menu actions that launch a terminal do so with the user’s preferred application.

First, install Terminator as we will use it to demonstrate how to switch the default terminal:

$ sudo apt install terminator

After installing Terminator, find the path to its executable binary to use in setting it as the default terminal. You can do this by using the which command:

$ which terminator

This command will output the full path of the terminator executable, typically /usr/bin/terminator. Use this path when setting the default terminal.

How to Test Your Default Ubuntu Terminal

To test your current default terminal, when on the desktop press Alt+F2 and enter the command: x-terminal-emulator. This will launch the current default terminal emulator. Additionally, if you are using GNOME, you can also right-click on the desktop and select ‘Open Terminal’ to launch the terminal. This method confirms the default terminal emulator set by the system.

How to Test Your Default Ubuntu Terminal
How to Test Your Default Ubuntu Terminal

Methods to Change the Default Terminal

Below are two methods to change the default terminal in Ubuntu. The first method addresses the update-alternatives tool, while the second method is specific to users of the GNOME desktop environment.

  1. Using update-alternatives: This method updates the system’s alternatives to set a new default terminal emulator.
    $ sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/bin/terminator 50

    This command installs Terminator as an option for the default terminal emulator within the alternatives system, assigning it a priority of 50. Higher priority numbers give the terminal higher precedence during the automatic selection process.

    $ sudo update-alternatives --list x-terminal-emulator

    This command lists all the terminal emulators that are registered within the alternatives system. It allows you to verify that Terminator is correctly installed and shows other available options.

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




    This command initiates a manual configuration for the default terminal emulator, allowing you to select from the listed alternatives. You will choose Terminator’s number from the list to set it as the default.
    This method involves installing a new terminal, registering it in the alternatives system, and selecting it as the default. This approach is effective across different desktop environments in Ubuntu.

    Changing default Ubuntu terminal
    Changing default Ubuntu terminal
  2. For GNOME Users: Setting the default terminal through gsettings.
    $ gsettings set org.gnome.desktop.default-applications.terminal exec '/usr/bin/terminator'
    

    This command directly changes the default terminal application setting for users of the GNOME desktop environment, making it straightforward to switch to Terminator or any other installed terminal emulator.

Conclusion

After following the above methods, your new terminal emulator will be set as the default, and you can open it through any shortcuts or system contexts that launch a terminal. This guide not only helps in customizing your workspace but also addresses common issues like symbolic link errors during the process.