The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Things look quiet here. But I've been doing a lot of blogging at dan.langille.org because I prefer WordPress now. Not all my posts there are FreeBSD related. I am in the midst of migrating The FreeBSD Diary over to WordPress (and you can read about that here). Once the migration is completed, I'll move the FreeBSD posts into the new FreeBSD Diary website.

Command not found 19 March 1999
Share
Need more help on this topic? Click here
This article has 2 comments
Show me similar articles
This article deals with what to do when you get the above error message but you can see the command and you know it works
Background
I had just finished Installing the lynx port from the Internet and was trying to run lynx.  But I encountered the following problems:
kennett# lynx
lynx: Command not found.
kennett# which lynx
lynx: Command not found.

But lynx was at /usr/local/bin and had the correct file permission:

-r-xr-xr-x  1 root  wheel  823640 Mar 15 21:39 lynx
The fix
I was able to run it by issuing the following command:
kennett# /usr/local/bin/lynx

I initially thought that /usr/local/bin was not in my path.  But it was as evidenced by the following:

kennett# echo $PATH   
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:/usr/X11R6/bin:/root/bin

I was running as root, so I issused the following command:

source ~root/.login

After that, I was able to run lynx by just typing lynx

Postscript
I've since been told that doing a rehash would solve the above problem.   See man csh for details.
Share
Need more help on this topic? Click here
This article has 2 comments
Show me similar articles