My terminal on Ubuntu is not working. The cursor is blinking, but I cannot type anything. What should I do to fix this issue?
1 Answer
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.
-
Thank you . i tried this now but still the terminal cursor is blinking– isuriCommented 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 -
-
Thanks . you are right the issue with .bashrc file. Now terminal is working. Thank you very much.– isuriCommented 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
Files
(Nautilus), right click the file(s) andOpen in Text editor
, then edit / change it back or find and correct any fault(s).