Jump to content

Shutdown


Guest mahiles
 Share

Recommended Posts

Guest mahiles

Is there anyway I could create a file that, when executed does "su" and enters the root password and then shuts down the computer?

 

Getting even more complicated (especially for newbie me lol) could I get it to prompt me if I wanted to enter a delay time?

 

Slightly separate question but same topic, whats the difference between doing "shutdown -h..." and skipping the -h. I know it means halt but what does that actually do? Doesn't seem to make any difference to me?

 

Thanks

Link to comment
Share on other sites

You can't set a delay with the halt command. You can use shutdown with a delay.

 

shutdown -h -t5

 

That will shut your machine down in 5 seconds. The -t option must be in seconds.

 

/germ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...