The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
when executing .sh script in telnet error "script not found" smiley Shell Programming and Scripting 1 04-22-2008 10:01 AM
"No Drives Found" error during Redhat Linux AS 4 installation pieman8080 Linux 1 05-23-2007 02:18 PM
Network Path Not Found Error "Sunfire V100" louisd11 SUN Solaris 4 12-13-2006 09:20 AM
Help! "Bus error" and "CPU Panic" box wont boot hcclnoodles SUN Solaris 3 10-05-2006 01:38 PM
unknown error message "sh: No: not found" cindytucci UNIX for Advanced & Expert Users 2 07-26-2005 09:44 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-30-2007
Registered User
 

Join Date: Apr 2007
Posts: 27
Stumble this Post!
why emacs caused "command not found" error

I installed Red Hat Enterprise Linux 5 on my PC. When i typed 'emacs' on the console, "command not found" error occurrd. Why.


Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-01-2007
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Stumble this Post!
From people.redhat.com

When someone comes into #redhat and has troubles, often users give that person specific commands to run, to help diagnose the problem. Often users run those programs but get "Command not found" messages so they assume they do not have said program installed. Most times however, that is not the case. The program is just not in the user's $PATH. For example, fuser or modprobe are located in "/sbin" directory. Traditionally /sbin is not in a user's PATH because they contain system binaries which users should not have to use. In order to run these programs, you have to do one of two things. 1) add "/sbin" to your path (not recommended) or 2) add the path to the command (commonly referred to as "absolute paths"). So instead of typing: fuser, type: /sbin/fuser.

Now the problem is solved by this raises another question, how did you know fuser was in /sbin? You may have heard of a command called which that will show you the full path of shell commands. But a more useful command to learn is called whereis. "whereis" will not only locate the binary, but it'll find its man pages and even source code. "whereis fuser" will return /sbin/fuser & fuser's man page location.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0