Find the answer to your Linux question:
Results 1 to 5 of 5
hi Is there any shortcut keys to shutdown linux like the one available in windows? Regards, geetha...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    7

    Is there any shortcut keys to shutdown linux?


    hi

    Is there any shortcut keys to shutdown linux like the one available in windows?

    Regards,
    geetha
    Last edited by oz; 05-25-2008 at 05:32 PM. Reason: removed spam URLs

  2. #2
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,049
    Apart from the magic SysRq key, there is /etc/inittab which has these lines on my system:
    Code:
    # What to do at the "Three Finger Salute".
    #ca::ctrlaltdel:/sbin/ctrlaltdel
    ca::ctrlaltdel:/sbin/shutdown -a -t3 -r now
    You can adjust that to your needs.
    Can't tell an OS by it's GUI

  3. #3
    Linux Newbie SagaciousKJB's Avatar
    Join Date
    Aug 2007
    Location
    Yakima, WA
    Posts
    162
    Quote Originally Posted by Freston View Post
    Apart from the magic SysRq key, there is /etc/inittab which has these lines on my system:
    Code:
    # What to do at the "Three Finger Salute".
    #ca::ctrlaltdel:/sbin/ctrlaltdel
    ca::ctrlaltdel:/sbin/shutdown -a -t3 -r now
    You can adjust that to your needs.
    Isn't using the SysRq commands dangerous, or is that just if you're using 'b'? I remember being taught to use 'rseiub', because 'b' didn't unmount partitions before it restarted, which is bad for journaled filesystems like ext3. That's how it was explained to me, anyway. Does that sound accurate?

    So is SysRq 'p' safe on its own? Or should it still be treated as if it were not syncing or unmounting partitions?

  4. #4
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,049
    Good questions. Yeah, there is some danger in using SysRq, specially the 'b' option on ext* filesystems. It should invoke fsck on boot though. Which I consider better than staring at a locked system.

    The funny thing though, I just read the link I posted above again, and I didn't see the Raising Elephants Is So Utterly Boring before. That seems the safest choice. But I think the OP isn't talking about locked down or crashed systems, but just a quick keystroke to turn off the machine.

    I know you can configure the power button on modern machines to cause a clean shutdown. If you are willing to configure your ACPI settings manually that is, because it entails a little more than right-click, left-click, check-box, done. I never thought it worth the trouble.
    Can't tell an OS by it's GUI

  5. #5
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by SagaciousKJB View Post
    Isn't using the SysRq commands dangerous, or is that just if you're using 'b'? I remember being taught to use 'rseiub', because 'b' didn't unmount partitions before it restarted, which is bad for journaled filesystems like ext3. That's how it was explained to me, anyway. Does that sound accurate?

    So is SysRq 'p' safe on its own? Or should it still be treated as if it were not syncing or unmounting partitions?
    Quote Originally Posted by Freston View Post
    Good questions. Yeah, there is some danger in using SysRq, specially the 'b' option on ext* filesystems. It should invoke fsck on boot though. Which I consider better than staring at a locked system.

    The funny thing though, I just read the link I posted above again, and I didn't see the Raising Elephants Is So Utterly Boring before. That seems the safest choice. But I think the OP isn't talking about locked down or crashed systems, but just a quick keystroke to turn off the machine.

    I know you can configure the power button on modern machines to cause a clean shutdown. If you are willing to configure your ACPI settings manually that is, because it entails a little more than right-click, left-click, check-box, done. I never thought it worth the trouble.
    The magic sysrq key is not a soluiton for this topic. So, I'd leave that out of the topic.

    Configure your inittab correctly or define a keystroke on your window manager.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •