Use the MagicSysRq key to restart Linux

Source: Internet
Author: User
Using the MagicSysRq key to implement Linux security restart MagicSysRq is a key combination in the Linux kernel. it allows users to execute some low-level commands regardless of the system status. It is often used to recover from the frozen state of the system or restart the computer without interrupting... using the Magic SysRq key for Linux security restart Magic SysRq is a key combination in the Linux kernel. it allows users to execute some low-level commands regardless of the system status. It is often used to recover from the frozen state of the system or restart the computer without damaging the file system. The key combination consists of Alt + SysRq plus a corresponding key. In most systems, the SysRq key is the Print Screen key. First, you need to make the SysRq key take effect as follows. Echo "1">/proc/sys/kernel/sysrq the list of keys associated with SysRq www.2cto.com is a Commandkeys effective for Alt + SysRq + commandkey. o 'K'-kill all processes running on the current virtual console. O's '-try to synchronize all mounted file systems. O 'B'-immediately restart the system o 'E' without detaching the partition or synchronizing it. o 'E'-sends a SIGTERM signal to all processes except init. O 'M'-output the current memory information to the console. O 'I'-sends a SIGKILL signal to all processes except init. O 'R'-converts the keyboard from raw mode (a mode called by a program like X11) to XLATE mode. O's-synchronize all mounted file systems. O't'-output the current task list and their information to the console. O 'U'-remount all mounted file systems in read-only mode. O 'O'-immediately shut down the system. O 'P'-output the current register and flag information to the console. O '0-9'-set the log level of the console to control the kernel information output to the console. O 'F'-oom_kill will be called to kill processes that occupy a large amount of memory. O 'H'-used to display help instructions. However, in addition to the Keys listed above, other keys can also print help instructions. You can also write the key to the/proc/sysrq-trigger file. For example, to restart the system, you can run the following command: echo "B">/proc/sysrq-trigger use the Magic SysRq key to secure Linux restart www.2cto.com. if you want to secure Linux restart in the suspended state, follow these steps. This will avoid checking and repairing the file system (fsck) during the next restart ). That is, press Alt + SysRq, and then press the following bold letters. O unRaw (get control of the keyboard from X11), o tErminate (send a SIGTERM signal to all processes so that they can end normally), o Kill (send a SIGKILL signal to all processes, force these processes to end immediately), o Sync (synchronize data to the disk), o Unmount (Unmount all read-only file systems), o reBoot (restart the system), this article is from Qingteng Garden
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.