I was trying to add the source command at the end so that I don't have to enter it in the command line each session, the addition I made was, in the end of the file,

# Load Root Files
source /home/user/file/blah/blah/thisroot.sh

It seems I goofed up. As now when I run the standard command to run the program, I get

user@user-laptop:~$ root -l
bash: /home/user/Downloads/root/bin/root: No such file or directory

I thought I might just revert whatever changes I made. But now I cannot even open the .bashrc file.

$ emacs .bashrc&
[1] 2478
user@user-laptop:~$ Command 'emacs' is available in '/usr/bin/emacs'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
emacs: command not found

Now you can probably realize by all this that I am quite the n00b here. Please help me out.


You've messed up your PATH, so that is why you cannot start emacs by just running that command. You will need to use the full path to start emacs. You need to be in your home directory to run this command.

Try this

/usr/bin/emacs .bashrc
  • I was able to open the emacs file using this, and removed the two lines that I had added. But the problem still persists, what can I do? – yayu Jul 11 '11 at 0:58
  • 1
    @yayu: have you logged out and logged back in? – Chris Morgan Jul 11 '11 at 5:13

This may be a little too late, but just so the community may benefit, if it's the case, you could follow the instructions on this answer to reset your .bashrc file. I would make a copy of the old one just in case you have some other things there that work and that you still want to use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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