so my Ubuntu 20.04
is behaving weirdly, i am unable to launch Terminal
. Whenever i click on the icon it gives me the loading animation and then nothing happens. I didn't even installed anything special that will cause something like this. Help me with this. Thanks !!

- 327
2 Answers
if you can open the .bashrc with a text application like 'Text Editor' edit it as advised by Thiago Rider Augusto in I messed up my .bashrc
- Click in Ubuntu icon (the first bottom in side menu).
- Write gedit
- Open Text Editor clicking in its icon.
- Click in Open.
- In the list, write: ~/.bashrc
- Enter
- Clean your failing .bashrc file.
- Save and you can open terminal again.
second option is to default your .bashrc -
ADVISABLE YOU MAKE A COPY OF THIS FILE BEFORE REPLACING IT - (just make a copy, rename a backup when you go to that file in the file manager in /etc/skel/)
see if you can switch TTY with CTRL-ALT-F4, login and run this below
Finally, use the following command in your terminal to replace the >~/.bashrc with a fresh copy,
/bin/cp /etc/skel/.bashrc ~/
It will replace your corrupt ~/.bashrc with a fresh one. After that, you >need to source the ~/.bashrc so that the change takes place immediately, >write in the terminal,
. ~/.bashrc
or,
source ~/.bashrc
as mentioned by souravc default .bashrc
then CTRL-ALT-F1 to return -

- 46
- 5
-
1so after executing the first command
bin/cp /etc/skel/ .bashrc /~
whenever i execute the second command~/.bashrc
its giving me this error:zsh: permission denied: /home/kishori/ .bashrc
– vatsalay Sep 26 '20 at 03:39 -
Try to use sudo. sudo ~/.bashrc if that fails - have you logged in when you accessed the TTY? – Jake Cope Sep 26 '20 at 14:21
Posting because I had the same issue. Have you updated Python recently??
I tried a bunch of things everywhere. Here's what I eventually found that worked. It turned out when I updated python, it updated what gnome-terminal was set to. Here's what ya do:
Ctrl + Alt + F3
, this will open a terminal
login
type sudo vim /usr/bin/gnome-terminal
substitute vim for whatever editor you have if needed
check the comment at the top does it read #!/usr/bin/python3
? If so, change it to the version you're using of python.
I was updating to 3.9 so I changed it to #!/usr/bin/python3.9
. This fixed the issue and allowed me to open the terminal. Update it to whichever version you're using.
The issue was caused by when I updated python, for some reason it changed the gnome-terminal to just generically be python, instead of the python version I was actually using.
-
Note to future visitors: this is bad advice. If you modified the system Python, you have already messed things up, and now is time for damage control, not more changes. Follow the accepted answer here to actually fix it. – Esther Apr 20 '23 at 17:52
-
@Esther When I followed exactly that it didn't fix it. – My Code Made Me Suicidal Apr 20 '23 at 17:55
-
what version of Ubuntu are you running? You have to switch back to the default Python using update-alternatives. If you can't (eg you removed it entirely) you are stuck and probably will need to uninstall. For example, apt relies on Python extensively to run, and can be broken by newer python versions, etc. – Esther Apr 20 '23 at 17:59
-
https://askubuntu.com/questions/1397938/terminal-not-opening-after-changing-python-version/1397940#1397940 – Esther Apr 20 '23 at 18:00
-
I'm running ubuntu 20.04, and python 3.9. I also have python 3.8 and python 2.7 installed. I have the update-alternatives for python set to 2.7. – My Code Made Me Suicidal Apr 20 '23 at 18:01
-
-
also, I'm not sure about
python
, it possibly also should be set to python3, apparently Ubuntu 20.04 doesn't come with it by default (maybe you had it from an earlier version that you upgraded?) – Esther Apr 20 '23 at 18:17
/etc/skel
. – pLumo Sep 25 '20 at 07:42.bashrc
in my/etc/skel
what should i do with that ? I am kinda new to this stuff. – vatsalay Sep 25 '20 at 07:47