LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   i am getting command not found error when i am trying to perform commands in linux? (https://www.linuxquestions.org/questions/linux-newbie-8/i-am-getting-command-not-found-error-when-i-am-trying-to-perform-commands-in-linux-159688/)

sunilmuddu 03-19-2004 01:03 AM

i am getting command not found error when i am trying to perform commands in linux?
 
Hi All,

i am getting command not found error when i am trying to perform commands in linux?

i am using redhat9.

any time of command, say 1. pvcreate, 2. pvscan, 3. pvdisplay etc.,

can anyone help me in overcoming this problem, please do.

thanks,
Sunil Muddu

slakmagik 03-19-2004 01:41 AM

Saying what commands would help. If it's something you've installed, it may have ended up somewhere off your path. If it's something meant for root it may be off your path or you may not have the right permissions. Check out the man pages for 'bash' regarding 'path' and for 'chmod', I guess, to get an idea of permissions. Either editing your path, changing perms, or moving the executable someplace appropriate should do it. Or, if it *is* something you need to be root for, 'su'.

Oh, just noticed that was post #1 - welcome to LQ. :)

Mara 03-20-2004 10:28 AM

Moved: This thread is more suitable in Linux-Newbie and has been moved accordingly to help your thread/question get the exposure it deserves.

statmobile 03-20-2004 11:13 AM

What do you see when you type:
echo $PATH
(Remember that Caps lock is important here)

sunilmuddu 03-22-2004 11:34 PM

when i type echo $PATH, iam getting this path.

/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/qa/bin/sbin

and displaying the prompt for next command.

slakmagik 03-23-2004 12:25 AM

I'd suspect you'd need /sbin or /usr/sbin on your path or need root permissions/paths. Try a 'which pvscan' to see where they are, assuming they're on the system at all. Then install them, add the path they're in to yours, 'su' to root - whichever's appropriate. I figure it's just an 'su'. If not, 'export PATH="$PATH:where-it-is"

sunilmuddu 03-23-2004 11:59 PM

Hi digiot,

thankyou very much for the help, it is working fine now, but one small concern, it is showing "command not found" error when i type "env" to check the environment and see the path now.

can i get any more suggestions on this.

thanks again for the great help.

thanks & regards,
Sunil Muddu:p

slakmagik 03-24-2004 12:18 AM

Hm. That's strange. I have env in /usr/bin/env. I don't have much occasion to use env, but it still oughtta be there. :) I usually use 'set' to see everything or 'echo $VAR' to see a specific variable. This is assuming bash, actually. I'm not sure how other shells work. I guess I'd try the same principle - except I told you wrong - 'which' won't help you find something to put on your path if it's not on your path. ;) Try 'whereis env' and then 'echo $PATH' - if the path 'whereis' shows isn't shown by 'echo' then it'd be a case of adding it, too. But that wouldn't explain how env got lost. I'm guessing there's a typo or something in one of your shell config files.


All times are GMT -5. The time now is 08:10 PM.