Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

blue439

macrumors newbie
Original poster
Mar 24, 2009
5
0
... for everything. Path variable search turned this up:

Last login: Tue Jan 18 19:03:34 on console
Welcome to Darwin!
[Les-Kanekunis-Computer-2:~] kanekuni% /usr/local/bin/ls
tcsh: /usr/local/bin/ls: Command not found.
[Les-Kanekunis-Computer-2:~] kanekuni% /bin/echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin

How can I get Terminal to work?
 
How do I move the file to the correct location? Sorry, haven't used Terminal much.
 
You move a file with the mv command. I'm not clear on what you're trying to do, so my answers may be rather vague.
 
To find the location of a command type:

which <command>

Example.

$ which ls
/bin/ls

If which ls doesn't return anything that means the command is not in your PATH. To see your path type (for clarity blank lines have been added):

$ env |grep -i pathenv |grep -i path
INFOPATH=/sw/share/info:/sw/info:/usr/share/info

MANPATH=/sw/share/man:/usr/share/man:/usr/local/share/man:/usr/X11/man:/sw/lib/perl5/5.10.0/man:/usr/X11R6/man

PATH=/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin:/Users/jerry/bin:/Users/jerry/scripts:/usr/local/bin:/Users/jerry/bin:/Users/jerry/scripts:/usr/local/bin
 
How do I move the file to the correct location? Sorry, haven't used Terminal much.

Whoah, what? You want to move ls? It's already in the correct location, "/bin", with all the other basic Unix commands.

Don't bother trying to include the path in the command - just type ls. Since /bin is in the PATH environment variable Terminal will find it.
 
/usr/local/bin is supposed to hold commands not included by the OS--i.e. stuff you install.

See:
Code:
man hier
for more details.
 
Okay, so how do I set the correct path so I can use Terminal. Thanks for the replies.
 
It's already set by default. If you want to use ls, then type ls and hit Enter.

Instead of the mass confusion that is seen earlier in this thread, explain what you're trying to do and the error that is being thrown.
 
please help...terminal not working

i have the same problem with terminal...somehow my path got messed up.

i type ls (or any other command) and all that comes up is:
bash - command not found

so, as the other guy asked, how do i reset my path so that terminal works?

much thanks guys...i really appreciate it...(im obv a term-newb)

cwik
 
i have the same problem with terminal...somehow my path got messed up.

i type ls (or any other command) and all that comes up is:
bash - command not found

so, as the other guy asked, how do i reset my path so that terminal works?

much thanks guys...i really appreciate it...(im obv a term-newb)

cwik

Copy and paste exactly this command into a Terminal window:
Code:
echo $PATH
Then make a screen shot of the window and post it.

I'm asking for a screenshot because I want to see the whole context.


Making and uploading screen shots:
https://forums.macrumors.com/showpost.php?p=15977842
http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X
https://forums.macrumors.com/posts/14126379/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.