Can’t Open Terminal in Ubuntu: How to Fix
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:
- Open Activities by pressing Win.
- In the search field, type Terminal.
- Right-click on the Terminal app in the results and select Add to Favorites.
- Terminal should now appear in the 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:
- Log in to Ubuntu.
- Press Ctrl+Alt+T.
- The Terminal window should open. If it does, you can replace the missing Terminal icon using the steps in the section below.
- 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:
- Open Activities by pressing the Win key.
- Click in the search field and start typing Terminal.
- The Terminal app should appear in the results. Double-click it to open it.
- 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:
- Right-click on the desktop or on any folder.
- From the context menu, select Open in Terminal.
- 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:
- Press Alt+F2.
- In the Run a Command window, type gnome-terminal.
- 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:
- Since you cannot open Terminal, open a TTY window by pressing Ctrl+Alt+F3.
- Log in to your account.
- 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
- 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:
- Open a TTY window by pressing Ctrl+Alt+F3.
- Sign in to your account.
- Install Dconf using the following command:
sudo apt install dconf-editor
- Once installed, quit the TTY window by pressing Alt+F2.
- Click on the appropriate folders to navigate to org/gnome/terminal/legacy.
- Use the toggles to undo the Terminal settings you changed previously.
- 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:
- Open a TTY window by pressing Ctrl+Alt+F3.
- Log into your account.
- To find the current version of Python you’re running, enter the following command:
python3 --version
- Make a note of the Python version.
- Enter the following command:
sudo nano /usr/bin/gnome-terminal
- The very top line should have a reference to Python.
- 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
- Press Ctrl+X to exit.
- When prompted, press Y to save your changes.
- Press Enter to confirm.
- Close the TTY window by pressing Alt+F2.
- 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:
- Open a TTY window by pressing the shortcut Ctrl+Alt+F3.
- Log into your account.
- Enter the following command:
sudo locale-gen --purge
- Press Enter and your locales should regenerate.
- 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:
- Open a TTY window by pressing Ctrl+Alt+F3.
- Sign in to your account.
- To remove Terminal, enter the following command and press Enter:
sudo apt remove gnome-terminal
- To reinstall Terminal, enter the following command and press Enter:
sudo apt install gnome-terminal
- 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:
- Press Ctrl+Alt+F3 to open a TTY window.
- Log into your account.
- 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
- 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.
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.