LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 05-11-2004, 03:55 PM   #1
xviddivxoggmp3
Member
 
Registered: Feb 2004
Location: scanf
Distribution: Redhat Enterprise 4.4 AS
Posts: 236

Rep: Reputation: 30
Question shutdown command


I was setting up some aliases in my .bashrc file, but the system does not recognize them.

Code:
alias sd="shutdown -h 0"
alias rb="shutdown -r 0"
The system says it doesn't recognize the shutdown command.
I can see the man pages for shutdown on the same box.
This is screwy...
Does anyone know why this would happen?
 
Old 05-11-2004, 03:59 PM   #2
ricstirato
Member
 
Registered: Jan 2004
Location: Gießen, Germany
Distribution: Xubuntu 12.04, Mythbuntu, Ubuntu Server 12.04
Posts: 174

Rep: Reputation: 24
Normal users don't have shutdown in their path, so shutdown can't be found. Use /sbin/shutdown and make sure you are allowed to use it as a normal user.
 
Old 05-11-2004, 04:04 PM   #3
xviddivxoggmp3
Member
 
Registered: Feb 2004
Location: scanf
Distribution: Redhat Enterprise 4.4 AS
Posts: 236

Original Poster
Rep: Reputation: 30
i understand how to set permissions on a file, but how would you do it on a command? is shutdown a program file? I no longer have my linux box in front of me, so i can not explore it.
 
Old 05-12-2004, 06:30 AM   #4
Hammett
Senior Member
 
Registered: Aug 2003
Location: Barcelona, Catalunya
Distribution: Gentoo
Posts: 1,056

Rep: Reputation: 57
for reboot, you can use "reboot" (available to users) and for shutdown... is in /sbin/shutdown, but has not user permissions, so you should change it.
Can you use also "shutdown -h 0" ?? cause i always use "shutdown -h now"....are they the same?
 
Old 05-12-2004, 01:10 PM   #5
ricstirato
Member
 
Registered: Jan 2004
Location: Gießen, Germany
Distribution: Xubuntu 12.04, Mythbuntu, Ubuntu Server 12.04
Posts: 174

Rep: Reputation: 24
You can configure sudo to allow all normal users (or a group or single user or ...) to use shutdown (man sudo ;-).
The alias line then would be something like

alias sd="sudo shutdown -h 0"
 
Old 05-12-2004, 04:48 PM   #6
xviddivxoggmp3
Member
 
Registered: Feb 2004
Location: scanf
Distribution: Redhat Enterprise 4.4 AS
Posts: 236

Original Poster
Rep: Reputation: 30
now is with out any second delay.
0 means 0 second delay.
I'm not sure, but I would believe they would be the same.
unless it counts miliseconds prior to the 1st second.
I would believe it would be the same.
 
  


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
Shutdown command? MikeZila Linux - Newbie 7 07-27-2008 05:09 PM
shutdown command mikedelo Linux - Software 7 03-15-2004 08:37 AM
shutdown command Oakstaff Linux - Newbie 8 11-18-2003 09:47 PM
shutdown command nelly_boy Linux - Software 11 08-03-2003 06:04 AM
Shutdown Command? AMDPwred Linux - General 1 01-25-2002 08:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 08:34 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