3

When I open gnome-terminal, I see no command prompt. Pressing any button does not help. What can I do to fix my terminal?

screen photo

2 Answers2

1

Under these circumnstances to be able to edit the .bashrc:

  1. Go to the terminal and go to Edit/Preferences/Commands:

    Tick these 2 :

    • Run command as a login shell
    • Run a custom command instead of my shell
      • Custom command: /bin/dash
  2. Close and open a new tab in the terminal, you should have a $ and be able to run some basic commands

  3. Now you can edit your .bashrc file (in your home directory), copy the content to .bashrc_bad and then preferably delete everything inside .bashrc
  4. Save it and run bash to see if it crashes again
0

In my case it was due to Angular, i was installing different Angular version as i was upgrading my app. And then i wasn't able to get any prompt on terminal and wasn't able to type anything in the terminal. Tried TTY / Restart but nothing worked. But as i was having GUI access so I open .bashrc from my file manager and opened .bashrc which is located in /user/home (you have to press ctrl + h, as it's a hidden file). Now open this file with your text editor and see if you find any unusual entry, if find just remove it or you can set it to default. You will easily find the default .bashrc file and replace that with your own. Now after saving this, refresh your terminal and you will get your access back.

Haamza
  • 1