How-To

Can’t Open Terminal in Ubuntu: How to Fix

can't open terminal in ubuntu

Not being able to open the Terminal app on Ubuntu doesn’t need to be terminal. Try the steps in this troubleshooting guide to fix the problem.

The Terminal app in Ubuntu is a text-based method of controlling your Linux machine. Terminal gets its name from the days before personal computers, when a ‘dumb terminal’ would be connected to a mainframe computer to allow you to enter commands. The Terminal app on your Linux computer is actually a terminal emulator, allowing you the same ability to pass commands to your computer.

Sometimes, however, things go wrong, and the Terminal app won’t open. Here’s what to try if you can’t open the Terminal app in Ubuntu.

How to Replace the Missing Terminal Icon in Ubuntu

If you’ve accidentally deleted the Terminal icon from the desktop, you can quickly restore it for quick access.

To add Terminal to the Ubuntu dock:

  1. Open Activities by pressing Win.
  2. In the search field, type Terminal.
    ubuntu activities
  3. Right-click on the Terminal app in the results and select Add to Favorites.
    ubuntu add to favorites
  4. Terminal should now appear in the dock.
    ubuntu dock

If restoring the shortcut allows you to open the Terminal app and it works as expected, then the problem is resolved—you can start using it from now.

However, if the Terminal still doesn’t open, then there’s a different problem causing the issue that you’ll need to troubleshoot. You’ll need to try one of the other steps listed below to see if Terminal will launch and, if it doesn’t, troubleshoot it with some potential fixes.

How to Open the Ubuntu Terminal with a Keyboard Shortcut

You can open Terminal in Ubuntu using a keyboard shortcut. This combination of keys will open the app in the same way as clicking on the icon.

To open Terminal in Ubuntu with a keyboard shortcut:

  1. Log in to Ubuntu.
  2. Press Ctrl+Alt+T.
  3. The Terminal window should open. If it does, you can replace the missing Terminal icon using the steps in the section below.
  4. If the Terminal window doesn’t open, you’ll need to try one of the other fixes listed below.

How to Open the Ubuntu Terminal with Activities

You can also open Terminal by searching for it in the Activities app. This will locate the app if you’ve accidentally removed it from your desktop or dock.

To open Terminal with Activities:

  1. Open Activities by pressing the Win key.
  2. Click in the search field and start typing Terminal.
    ubuntu activities
  3. The Terminal app should appear in the results. Double-click it to open it.
    ubuntu terminal app
  4. If the app fails to open, you’ll need to try one of the fixes below.

How to Open the Ubuntu Terminal From a Context Menu

You can also open Terminal by accessing a context menu on the desktop. This will give you the option to open the current folder in Terminal.

To open Terminal from a context menu:

  1. Right-click on the desktop or on any folder.
  2. From the context menu, select Open in Terminal.
    ubuntu open in terminal
  3. A Terminal window should open in the directory of the desktop or selected folder.

How to Open the Ubuntu Terminal by Running a Command

Another way you can open Terminal is by running a command to open the Terminal app. You can access the run prompt with a simple keyboard shortcut.

To open Terminal by running a command:

  1. Press Alt+F2.
  2. In the Run a Command window, type gnome-terminal.
    ubuntu run terminal
  3. Press Enter and Terminal should open.

Troubleshooting Fixes if Ubuntu Terminal Won’t Open

Is Ubuntu’s Terminal app still not opening? You may need to try one of these troubleshooting fixes next.

Removing Recently Installed Apps

If Terminal isn’t opening at all and you’ve recently installed a new app, this may be causing a conflict. You can try uninstalling the recently installed app and see if Terminal will work once again.

To uninstall an app on Ubuntu:

  1. Since you cannot open Terminal, open a TTY window by pressing Ctrl+Alt+F3.
  2. Log in to your account.
  3. To delete a specific package, enter the following command, replacing package-name with the name of the package you want to remove:
    sudo apt remove package-name
  4. Once the app has been uninstalled, try opening Terminal again to see if this has fixed the problem.

Fix the Terminal Configuration

If you’ve made some changes to the Terminal configuration, this may be the root of your troubles. You can try undoing these changes to get Terminal working again. You can use Dconf-Editor if you prefer using a GUI to roll back your changes.

To use Dconf to fix your Terminal configuration:

  1. Open a TTY window by pressing Ctrl+Alt+F3.
  2. Sign in to your account.
  3. Install Dconf using the following command:
    sudo apt install dconf-editor
  4. Once installed, quit the TTY window by pressing Alt+F2.
  5. Click on the appropriate folders to navigate to org/gnome/terminal/legacy.
  6. Use the toggles to undo the Terminal settings you changed previously.
    dconf terminal settings
  7. Try launching Terminal again.

Upgrade Python

A number of Ubuntu users have found that they could not open Terminal in Ubuntu due to issues with Terminal referencing an outdated version of Python. Updating Python was found to fix this issue.

To change the Terminal configuration to the latest version of Python:

  1. Open a TTY window by pressing Ctrl+Alt+F3.
  2. Log into your account.
  3. To find the current version of Python you’re running, enter the following command:
    python3 --version
  4. Make a note of the Python version.
    ubuntu python version
  5. Enter the following command:
    sudo nano /usr/bin/gnome-terminal
  6. The very top line should have a reference to Python.
    ubuntu python3
  7. Edit this line to match the first two values of the version of Python you noted down in step 4. For example, if you’re running Python 3.10.8, changed the first line to:
    #!/usr/bin/python3.10

    ubuntu current python version

  8. Press Ctrl+X to exit.
  9. When prompted, press Y to save your changes.
    ubuntu save Y
  10. Press Enter to confirm.
  11. Close the TTY window by pressing Alt+F2.
  12. Restart Terminal and see if it has fixed your problem.

Purge the Current Locale Settings

If something has messed up your locales, Terminal may not know which language to display, which can cause it to quit. You can purge your current locale settings, which will cause them to regenerate. This may fix your problem.

To purge the current locale settings:

  1. Open a TTY window by pressing the shortcut Ctrl+Alt+F3.
  2. Log into your account.
  3. Enter the following command:
    sudo locale-gen --purge
  4. Press Enter and your locales should regenerate.
    ubuntu locales
  5. Once completed, close the TTY window with Alt+F2 and try opening Terminal again.

Uninstall and Reinstall Terminal on Ubuntu

If nothing else works, you can try removing and reinstalling the Terminal app itself. While this isn’t the most elegant option, it may fix your issue.

To remove and reinstall Terminal:

  1. Open a TTY window by pressing Ctrl+Alt+F3.
  2. Sign in to your account.
  3. To remove Terminal, enter the following command and press Enter:
    sudo apt remove gnome-terminal
  4. To reinstall Terminal, enter the following command and press Enter:
    sudo apt install gnome-terminal
  5. Try opening Terminal again.

Try an Alternative Terminal Application

If nothing else works, you can try installing a different terminal emulator and hope that you have better luck using that one.

To install an alternative terminal emulator:

  1. Press Ctrl+Alt+F3 to open a TTY window.
  2. Log into your account.
  3. Try one of the following commands to install an alternative terminal emulator:
    sudo apt install terminator
    
    sudo apt install guake
    
    sudo apt install tilix
    
    sudo apt install hyper
    
    sudo apt install tilda
  4. Launch the terminal emulator you installed and see if it works.

Troubleshooting on Ubuntu

If you can’t open Terminal in Ubuntu, then hopefully one of the suggestions above will help you to resolve the problem. If you find any other useful fixes, please let us know in the comments below.

There’s plenty more you can do once you have Ubuntu up and running again. You can learn how to change the background wallpaper, or to switch from Unity to Gnome. If you’re using Ubuntu for work, you might want to learn how to install Teams on Ubuntu, too.

1 Comment

1 Comment

  1. László Tóth

    September 17, 2023 at 5:46 am

    Hi Adam,
    My gnome-terminal also went wrong. My best estimation is that causing this: I installed Python 3.11 alternatively to 3.10.
    While my apt sources list also went wrong so I am not able to install any of gnome-terminal alternatives. ( apt install command is not able to run without error) Please advise what shall I do to overcome the situation?
    BR,
    L.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

To Top