Peter_APIIT, on Jan 30 2007, 03:49 AM, said:
Question :
When i type,
shutdown -t 0
shutdown -t now
in the console. It won"t work. If i typed
shutdown now
It is work but it go to a black screen which is switch to run level 1 from level 6 which is the GUI desktop.
sh-3.1 #
im not in linux so im doing this from memory... :)/>
shutdown requires that you pass it the time when it will start shutting down processes. when you specified the -t parameter on the first two invocations then you just told it to wait (-t) 0 and <whatever number 'now' evaluates to> seconds but you didn't specify what would be the reference time to shutdown. i would assume that invoking the following would work:
shutdown -t 0 now
because it means you want the system to shutdown now with 0 second delay.
btw, runlevel 5 is the gui mode, runlevel 6 means a reboot, and runlevel 1 is the single user mode. that is mode you got dropped with the
sh-3.1 #
prompt. invoking
sh-3.1 # init 5
will bring you back to gui mode.
Peter_APIIT, on Jan 30 2007, 03:49 AM, said:
After it, i don"t know why the system cannot shuting down. What command should i type in order to shuting down the system.
like what ian said, i just use halt. i think it is symlinked or alias to shutdown in some way.
Peter_APIIT, on Jan 30 2007, 03:49 AM, said:
Could you all guys please explain to me what is sh-3.1 # ? When i typed,
/bin /sh
It changed to another screen, seems like bash or scripting. I have no idea what is it. The screen is sh-3.1 $ .
Then i try to typed, echo "Hello World". It appeared the Hello World to the console.
refer to my explanation above how you got the sh prompt . i think that is the default runlevel that shutdown will take you. check the manpages to be sure. :)/>
when you invoked sh again you just told your current shell to run another shell on top of it. to get back to the original shell (or parent shell) then you only need to execute the 'exit' command.
Peter_APIIT, on Jan 30 2007, 03:49 AM, said:
In general, please help me on this. I have enough suffered on this. Please forgive my stupidness, if this is a stupid question.
there are no stupid questions, only ones that are asked rudely or is not thought well enough. yours doesnt meet either. dont worry about being a newbie. we all started that way. some dont even get away from the label. check my sig if you dont believe me. :lol2:/>
ciao!