1

My terminal on Ubuntu is not working. The cursor is blinking, but I cannot type anything. What should I do to fix this issue?

5
  • 2
    press Ctrl-C to cancel whatever it is doing. Then check your configuration-files (.profile, .bashtc and more), You probably have made some changes in one of them recently. Fix whatever you have changed,
    – Soren A
    Commented Jun 10 at 18:23
  • I Pressed Ctrl+C but it doesn't cancel . yeah i changed .profile file. Then this occurs.
    – isuri
    Commented Jun 10 at 19:03
  • What did you change in .profile ?
    – Soren A
    Commented Jun 10 at 19:08
  • 2
    Use Files (Nautilus), right click the file(s) and Open in Text editor, then edit / change it back or find and correct any fault(s).
    – Hannu
    Commented Jun 10 at 19:08
  • Note: CTRL+Pause/Break (upper right corner of keyboard) is a more potent CTRL-C.
    – Hannu
    Commented Jun 10 at 19:10

1 Answer 1

0

First, turn on "Show hidden files" with ctrl+H, and then open your .profile file with a text editor.

Replace it with the following contents (you can optionally take its backup first).

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi

You may also have to restore the bashrc file.

5
  • Thank you . i tried this now but still the terminal cursor is blinking
    – isuri
    Commented Jun 10 at 20:36
  • Did you try closing and opening the terminal? By any chance, is the .bashrc file also affected? Commented Jun 10 at 21:38
  • I close and reopen the terminal even i restart the laptop
    – isuri
    Commented Jun 11 at 3:44
  • Thanks . you are right the issue with .bashrc file. Now terminal is working. Thank you very much.
    – isuri
    Commented Jun 11 at 3:55
  • you can accept my answer by clicking the checkmark, if it worked for you. Commented Jun 11 at 4:45

You must log in to answer this question.

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