Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please help me, I am learning how to add sublime to command line from this link and when I created .bash_profile file, in the first line I typed export PATH= and saved it.

My command line is broken. I can't do anything with command (for example, I can't use ls, nano, mkdir, rm, etc.) and when I press Tab to view all commands, I see

img img

I tried echo $PATH but it returns " " (empty or null). Please suggest me how to solve this problem.

Thank you and sorry for my English.

share|improve this question

migrated from stackoverflow.com Apr 7 '13 at 6:39

This question came from our site for professional and enthusiast programmers.

2  
Well, don't set PATH to an empty string. I don't see the linked blog post suggesting that you should do it. – Lev Levitsky Apr 6 '13 at 21:56
    
oops! i misunderstand. – Guzzilar Apr 6 '13 at 22:12
up vote 3 down vote accepted
export PATH=

will set you PATH variable to blank and not enable the shell to find any commands. You should delete this line from your .bash_profile and your problem will be fixed.

I just checked the link referenced in your post and I think this is the line your having a problem with:

export PATH=/usr/local/bin:(...)

I think the author of the blog really meant to write this:

export PATH=/usr/local/bin:$PATH

This will work correctly. Try adding that line to your .bash_profile. It will simply ensure that commands contained in /usr/local/bin are found first when the shell searches for them (which it does when you type 'rm' for example)

share|improve this answer
    
Oh! i error to reading hahaha// i tried to open .bash_profile for editing but permission denied and i can't use sudo command. how i open bash_file and edit it without sudo command? Thank – Guzzilar Apr 6 '13 at 22:07
    
The same way you added the line in the first place!! – ennuikiller Apr 6 '13 at 22:17
    
i used "sudo touch ~/.bash_profile" and "sudo nano ~/.bash_profile" but now i can't use both command. //sorry i newbie for command line – Guzzilar Apr 6 '13 at 22:24
    
/usr/bin/sudo will get you the sudo command – ennuikiller Apr 6 '13 at 22:31
    
O.o wowww it's excellent!! command is come back to me hahaha Thank you so much!! – Guzzilar Apr 6 '13 at 22:40

You must log in to answer this question.

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