Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Before you raise your pitchforks, this is NOT another "How do I change my $PATH variable value?" question. I had installed Oh my zsh on my machine(Macbook Pro), and didn't like it. So I uninstalled it.

Ever since I installed it I get the following when I run the $PATH command:

Anups-xxxx-xxx% $PATH
zsh: no such file or directory: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin

How do I get rid of the bit that says zsh: no such file or directory. Thanks in advance!

share|improve this question
1  
err, there is no $PATH command. If you want to see your PATH you have to run echo $PATH. –  patrix Jul 27 '12 at 15:57
add comment

1 Answer

up vote 1 down vote accepted

Okay, so you've got a good understanding of $PATH and how it's used, but you're mistaken in thinking that it's a command. In Bash (and other shells), words prefaced by a dollarsign are variables. You can change the value of $PATH with the export command (as you probably already know).

export PATH=$PATH:/path/to/something/you/need/bin

So in your shell when you just type $PATH you're basically telling your shell to run the command /usr/bin/:/bin/:/usr/local/bin:/etc//etc//etc/ which isn't a valid shell command.

@patrix was right, you should use echo to inspect your $PATH. I suspect that the "zsh: no such file or directory" is just your shell telling you that your command doesn't make sense.

share|improve this answer
    
Thanks! That makes for sense now! Answer Accepted. –  Anup Jul 28 '12 at 8:48
add comment

Your Answer

 
discard

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.