Send ctrl-alt-del from application

Posted on 2006-06-07
Last Modified: 2012-05-05
What I want is

echo 1 > /proc/sys/kernel/ctrl-alt-del
send ctrl-alt-del to kernel, so it reboots immediatelly. But how?

Alternativelly, how to reboot machine immediatelly (no sync and stuff). shutdown -rn now fails here(becouse of failed and still mounted disk).
Assume sysrq is not working here...
Question by:ravenpl
    LVL 24

    Expert Comment

    Why do you think a ctrl-alt-del reboots a Linux box immediatly?
    I have no idea how far you got with shutdown -rn. You want to use
    shutdown -rf  

    and you want to run this command as root.

    LVL 34

    Accepted Solution

    You could write a small C program to use reboot() (do a "man 2 reboot" for more info). Unless you do a sync() first, it's like throwing the power switch. There is also shutdown -n (DEPRECATED).
    If you have a failed and still mounted disk, it would be best to remove it from fstab before rebooting (or at least make it noauto)
    LVL 43

    Author Comment

    Splendid - thx.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
    The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now