LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-25-2013, 01:35 AM   #1
ker
LQ Newbie
 
Registered: Jun 2013
Posts: 4

Rep: Reputation: Disabled
Unhappy 'hutdown -h now' doesnt work in RHEl 5??


i used 'shutdown -h now'command to shutdown RHEL 5, but it doesnt work ??? any help!
 
Old 06-25-2013, 01:39 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
What error did you get? Did you run it as a normal user or superuser i.e. root?

Anyway, once try to invoke it with root user or try sudo.
 
Old 06-25-2013, 01:50 AM   #3
ker
LQ Newbie
 
Registered: Jun 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
yes i used su to switched into root... as i use 'shutdown -h now' it says "bash : shutdown: command not found"
 
Old 06-25-2013, 01:52 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

so /sbin is not in your path. Did you pass any options to su?
Eg
Code:
su -l
Evo2.

Last edited by evo2; 06-25-2013 at 01:55 AM.
 
Old 06-25-2013, 02:02 AM   #5
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
If you have done su, and shutdown command is not in path then use full path of the cmd while executing it, as:
Code:
~$ sudo /sbin/shutdown -h now
 
1 members found this post helpful.
Old 06-25-2013, 02:09 AM   #6
ker
LQ Newbie
 
Registered: Jun 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
@ evo2: no i dint pass any option with 'su' command
 
Old 06-25-2013, 02:11 AM   #7
ker
LQ Newbie
 
Registered: Jun 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thumbs up

thank u shivaa it worked for me
 
Old 06-25-2013, 02:17 AM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by ker View Post
@ evo2: no i dint pass any option with 'su' command
So you would not have gotten root's path, which should include /sbin.

Evo2.
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] mt command doesnt work properly in RHEL 5.3 sree.m Linux - Server 4 03-30-2012 07:38 AM
HELP!!! RHEL 5.0 doesnt detect my realtek rtl8139d lan card oppofwar Linux - Hardware 8 11-04-2008 08:05 PM
rmdir -rf does not seem to work in fc4 .what do i do?rm -p also doesnt seem to work vinay87 Linux - Newbie 2 05-09-2006 10:18 AM
screensaver doesnt work encore Slackware 10 09-21-2005 05:43 PM
Why doesnt my USB mouse doesnt work? barkha Linux - Hardware 2 08-16-2005 12:31 PM


All times are GMT -5. The time now is 08:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration