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" I can see the man pages for shutdown on the same box. This is screwy... Does anyone know why this would happen? |
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.
|
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.
|
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? |
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" |
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. |
All times are GMT -5. The time now is 03:30 AM. |