LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-19-2003, 02:38 PM   #1
Mimicafe
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Rep: Reputation: 0
bash: shutdown: command not found


Hello everyone!

Just wondering why Redhat 8.0 refuses to execute most standard linux commands. On trying the following commands(ifconfig, init 0 or shutdown), Redhat returns "bash: <command>: command not found".

I say what the heal is Redhat saying? If a linux machine can't execute these commands, which OS then? I understand these commands are standard and should work with all Linux distributions. I tried them on SUSE and they worked alright.

What am I doing wrong? Do I need to be in a specific directory to execute particular commands? I know most commands need root
rights.

thanks for your help.

 
Old 02-19-2003, 02:50 PM   #2
crokett
Member
 
Registered: Feb 2003
Distribution: Fedora 13
Posts: 92

Rep: Reputation: 15
Have you tried su to root and running the commands? If not, try that. The path to the commands may also not be in your path environment variable.
 
Old 02-19-2003, 04:29 PM   #3
crichards
Member
 
Registered: Feb 2003
Location: Arizona
Distribution: Gentoo!
Posts: 124

Rep: Reputation: 15
Most distros don't add /sbin and /usr/sbin to the user path. It is on the root path, however.

Try running /sbin/shutdown or /sbin/ifconfig. That will work. You do need to be root (sudo is my favorite way)
 
Old 02-19-2003, 05:26 PM   #4
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
really sounds like a permissions problem. try to run these commands as root. if this works, and you use these commands often as a normal user look into suid/gid and sudo
 
Old 02-20-2003, 02:37 PM   #5
Mimicafe
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Original Poster
Rep: Reputation: 0
I always run commands as root but they refuse to work. I tried running ifconfig from the directories suggested by crichards, but still get ''bash: ifconfig: command not found". I also tried to run init 6 but failed. The only commands that worksout on my machine are: reboot and halt. For all other commands, it fails.

How do I go about adding the path in the environment variable?
 
Old 02-20-2003, 04:59 PM   #6
crichards
Member
 
Registered: Feb 2003
Location: Arizona
Distribution: Gentoo!
Posts: 124

Rep: Reputation: 15
chmod +x /sbin/whatever.

Then try running it.
 
Old 02-20-2003, 05:11 PM   #7
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
check what you're path is:
"$PATH"

also, the path is not the problem if the command does not run at all. Did you try a full path? (ie. /sbin/shutdown)
 
Old 02-23-2003, 02:44 AM   #8
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Quote:
Originally posted by Mimicafe
I always run commands as root but they refuse to work. I tried running ifconfig from the directories suggested by crichards, but still get ''bash: ifconfig: command not found". I also tried to run init 6 but failed. The only commands that worksout on my machine are: reboot and halt. For all other commands, it fails.

How do I go about adding the path in the environment variable?
well
$echo $PATH
prints you the current path
if you want to add extra path such as /usr/sbin
then type
$export PATH=$PATH:/usr/sbin
to see your current environmental variables(one of which is path)
type
$env
keep posted
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: command not found intels_ss Linux - Newbie 5 07-20-2005 07:41 PM
bash: pg: command not found Chomper Programming 2 02-05-2005 02:22 AM
-bash: cp: command not found johnlittlepeap Fedora 2 11-15-2004 08:52 AM
bash: ll: command not found x2000koh Linux - Newbie 3 08-08-2003 05:11 AM
shutdown command not found matt Linux - General 6 07-24-2001 05:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:51 PM.

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