49

I just installed Ubuntu 18 on my desktop PC alongside Windows 10 and have been using Ubuntu without any problems for a couple of days. Today, when I booted up my computer, I am no longer able to open the terminal at all. I've tried restarting it multiple times, but it still won't work. If I click the terminal icon on my task bar, nothing happens. If I try opening the terminal with CTRL+ALT+t, it still doesn't work.

How can I resolve this?

14
  • 2
    No, the terminal doesn't show when I Alt+Tab
    – John Seed
    Oct 23, 2018 at 19:42
  • 2
    When I run gnome-terminal from xterm, nothing happens..
    – John Seed
    Oct 23, 2018 at 23:30
  • 2
    After doing a fresh install of Ubuntu, once again the terminal is not showing when I open it. When I look in the System Monitor is shows that gnome-terminal is running, but there is no terminal visible whatsoever...
    – John Seed
    Oct 24, 2018 at 23:37
  • 3
    Same here. And that's crazy. One of the most important features of linux - running a console window - is broken. In a LTS release! (We're not talking about a dev version here!)
    – Regis May
    Mar 22, 2019 at 14:48
  • 1
    @FaustoR. I just created an answer to a similar question with a solution for this issue: askubuntu.com/a/1143596/167115
    – mchid
    May 15, 2019 at 23:52

10 Answers 10

85

I had the same problem. After updating Python to version 3.7, some applications like Jupyter Notebook, Meld and the terminal, did not launch.

The problem was that the symbolic link to python3.4 was lost. Reinstalling python3-minimal solved it:

sudo apt-get --reinstall install python3-minimal
7
  • 16
    You can download Visual Studio Code and use it's built-in terminal - I had this same problem and I fixed it using the Visual Studio Code terminal via running the various commands through that terminal to fix the Python stuff code.visualstudio.com/#alt-downloads Mar 25, 2020 at 19:21
  • 5
    JetBrain products also have terminals and works too. Apr 10, 2020 at 0:30
  • 3
    i tried all other solutions in stack overflow, but only this worked. Thanks a lot
    – aahnik
    Oct 2, 2020 at 16:26
  • 1
    This is the easiest solution. I run this command in Visual Studio Code terminal. And it works. Thanks!
    – mahfuz
    Oct 15, 2021 at 13:36
  • 2
    This solution deserves a medal of honor.
    – Neucro
    Oct 17, 2021 at 3:55
22

The same problem happened with me. The reason is that the python version is 3.7. You can download and say any terminal for solution. I used the terminal of visual code.

The code you need to enter is:

sudo update-alternatives --config python3

Then you should choose a version lower than python 3.7. I choose python3.6. So I write 1 and confirm.

If the problem persists, you can rewrite it.

Example:

visual code terminal with commands

6

Did you update your python3?
If yes, then this will be the solution:

  1. Ctrl+Alt+F1 to open xterm.
  2. Enter your username.
  3. Enter your password.
  4. Type this command:

    sudo update-alternatives --config python3
    
  5. Select option 1.
  6. Ctrl+Alt+F7 to return to GUI
4
  • 1
    This is not helpful since option 1 may be any Python version (incl. 3.7 which seems to cause the issues).
    – Julian L.
    Mar 5, 2020 at 7:53
  • 2
    You can download Visual Studio Code and use it's built-in terminal - I had this same problem and I fixed it using the Visual Studio Code terminal via running the various commands through that terminal to fix the Python stuff code.visualstudio.com/#alt-downloads Mar 25, 2020 at 19:21
  • The F buttons to press may change depending on you configuration. For me, it was F2 at step 1, and F1 at step 6. Apr 28, 2022 at 12:17
  • I was using Option 3 so I could use Python 3.11 on Ubuntu (following this guide itsupportwale.com/blog/…). I guess this is not possible this way then? Jul 20, 2023 at 11:20
3

As suggested in other answers and comments, you can try other terminals than the default gnome-terminal, e.g. terminator (I prefer this over the default terminal for other reasons anyway) or the one included in Visual Studio Code.

To install,

  1. leave your graphical user session and switch to a plain terminal with CTRL+ALT+e.g. F3
  2. Login and sudo apt install terminator
  3. Switch back to your graphical session with CTRL+ALT+F1 or F2 (or other F-key depending on your setup)
  4. Launch terminator and enjoy
  5. (If needed, set as default: sudo apt update-alternatives --config x-terminal-emulator)
1
  • Thanks for sharing the alternative software. It isn't an answer for the question, but Terminator working like Terminal in Ubuntu 18.04.
    – Cloud Cho
    Nov 3, 2022 at 21:59
2

I also second Allen's answer but you don't really need xterm. Just right-click on a point in desktop and choose "open terminal". It works that way. Then type

sudo update-alternatives --config python3

and choose a lower Python version as mentioned before.

2

What worked for me is following command:

cd /usr/bin
sudo cp gnome-terminal gnome-terminal-backup
sudo cp gnome-terminal.real gnome-terminal

Explanation: First line is for backup.

Is taken from: https://www.youtube.com/watch?v=fRwbpBol4Aw

0
1

As the terminal does not work, you can use terminal in Intellij IDEA/VS Code/open another console by Ctrl+Alt+F3, and:

First, try:

sudo update-alternatives --config python3

If you cannot --config("No alternatives for python3"), you need to install a new alternative. For example:

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2

And after all, do --config to revert the version(choose 3.6), as some system component relies on the libs in 3.6, and I guess that for the new 3.8, they are not installed, and a bunch of things will stop working!

0

If you want to update python then , first install tilix because terminal will not work after updating python but tilix will work.You can perform any task in tilix like terminal.

0

For my case, the sudo update-alternatives --config python3 didn't solve. I had to undo symbolic links in /usr/bin like this:

from

sanata@sanata-desktop:/usr/bin$ ls -ght python*
lrwxrwxrwx 1 root    9 Aug 11 14:52 python3 -> python3.8
lrwxrwxrwx 1 root    9 Aug 11 14:52 python -> python3.8

to

sanata@sanata-desktop:/usr/bin$ ls -ght python*
lrwxrwxrwx 1 root    9 Aug 11 14:52 python3 -> python3.6
lrwxrwxrwx 1 root    9 Aug 11 14:52 python -> python3.6

Python 3.6 was before I had modified.

Additionally in some computer, the alias in ~\.bashrc method works. ref

Runtime environment:
  OS Ubuntu 18.04 AArch64

-1

You can use ctrl+alt+F1 up to F6 to open multiple terminals in text mode. If you want to return to GUI press ctrl+alt+F7.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .