Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I edited .bashrc file with PATH value, but when I open a new terminal after this, none of command is working.

When i am opening a new terminal its giving :

bash: export: `/usr/lib/java/jdk1.7.0_51': not a valid identifier
bash: export: `=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/shilpa/sqllib/bin:/home/shilpa/sqllib/adm:/home/shilpa/sqllib/misc:/home/shilpa/sqllib/db2tss/bin:/bin': not a valid identifier
bash: export: `/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/shilpa/sqllib/bin:/home/shilpa/sqllib/adm:/home/shilpa/sqllib/misc:/home/shilpa/sqllib/db2tss/bin:Downloads/hadoop-1.2.1/bin': not a valid identifier

shilpa@ubuntu:~$ ls
bash: ls: No such file or directory

Please help me with this.

share|improve this question
Can you post the contents of your .bashrc? – chaos Feb 23 '14 at 21:39

2 Answers 2

Probably you messed up the .bashrc file in your home directory.

Simply replace it with the example copy in /etc/skel/.bashrc

share|improve this answer
-1 if I could. He may have added a bunch of stuff to his .bashrc, which would be lost then. I assume he just messed up the line setting $PATH. I am optimistic: He probably does not have to start with a new .bashrc. (Although to give a better answer than this one, we would need the contents of his .bashrc, of course). – Keba Feb 23 '14 at 21:46

In your current shell, reset a basic working path: PATH=/bin:/usr/bin

Then edit your .bashrc. Make sure when you're assigning to your path, that you don't make one of these mistakes:

  • use a dollar sign on the left hand side: $PATH=/foo:... # don't do this
  • allow spaces around the equal sign: PATH =/foo:... # don't do this
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.