LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-19-2004, 01:03 AM   #1
sunilmuddu
LQ Newbie
 
Registered: Mar 2004
Location: hyderabad
Posts: 3

Rep: Reputation: 0
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

Last edited by sunilmuddu; 03-19-2004 at 02:52 AM.
 
Old 03-19-2004, 01:41 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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.
 
Old 03-20-2004, 10:28 AM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Moved: This thread is more suitable in Linux-Newbie and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 03-20-2004, 11:13 AM   #4
statmobile
Member
 
Registered: Aug 2003
Location: Chapel Hill, NC
Distribution: Gentoo, Windows 95 2000 & XP
Posts: 160

Rep: Reputation: 30
What do you see when you type:
echo $PATH
(Remember that Caps lock is important here)
 
Old 03-22-2004, 11:34 PM   #5
sunilmuddu
LQ Newbie
 
Registered: Mar 2004
Location: hyderabad
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
Old 03-23-2004, 12:25 AM   #6
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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"
 
Old 03-23-2004, 11:59 PM   #7
sunilmuddu
LQ Newbie
 
Registered: Mar 2004
Location: hyderabad
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
Old 03-24-2004, 12:18 AM   #8
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't perform root command by using Sudo acbenny Linux - General 6 05-07-2008 08:19 PM
command not found error cdsnithi Linux - Software 2 07-06-2005 12:26 PM
command not found error lordshipmayhem Linux - Newbie 4 06-28-2005 09:15 PM
Basic Commands Not Found Error varunbihani Linux - Newbie 5 01-21-2005 04:57 AM
"Command not found" for existing commands kpachopoulos Linux - Newbie 8 10-01-2004 04:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration