{"id":15550,"date":"2025-12-18T23:59:02","date_gmt":"2025-12-18T22:59:02","guid":{"rendered":"https:\/\/www.palentino.es\/blog\/?p=15550"},"modified":"2025-12-19T00:04:53","modified_gmt":"2025-12-18T23:04:53","slug":"%f0%9f%90%a7-comando-oculto-linux-magic-sysrq-reisub","status":"publish","type":"post","link":"https:\/\/www.palentino.es\/blog\/%f0%9f%90%a7-comando-oculto-linux-magic-sysrq-reisub\/","title":{"rendered":"&#x1f427; Comando oculto Linux: Magic SysRq (REISUB)"},"content":{"rendered":"<p>&#x1f4a5; <em data-start=\"237\" data-end=\"294\">Control total del sistema incluso cuando est\u00e1 congelado<\/em><\/p>\n<h3>&#x1f9e8; \u00bfQu\u00e9 es?<\/h3>\n<p><strong>Magic SysRq<\/strong> es una combinaci\u00f3n especial <strong>a nivel de kernel<\/strong>.<br \/>\nFunciona <strong>aunque el sistema est\u00e9 colgado<\/strong>, sin interfaz gr\u00e1fica, sin SSH, sin nada.<\/p>\n<p>&#x1f449; Es literalmente un <strong>bot\u00f3n de emergencia del kernel Linux<\/strong>.<\/p>\n<p><a href=\"https:\/\/www.palentino.es\/blog\/wp-content\/uploads\/2025\/12\/Linux-Magic-sysrq-palentino.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15552\" src=\"https:\/\/www.palentino.es\/blog\/wp-content\/uploads\/2025\/12\/Linux-Magic-sysrq-palentino.jpg\" alt=\"\" width=\"1028\" height=\"694\" srcset=\"https:\/\/www.palentino.es\/blog\/wp-content\/uploads\/2025\/12\/Linux-Magic-sysrq-palentino.jpg 1028w, https:\/\/www.palentino.es\/blog\/wp-content\/uploads\/2025\/12\/Linux-Magic-sysrq-palentino-300x203.jpg 300w, https:\/\/www.palentino.es\/blog\/wp-content\/uploads\/2025\/12\/Linux-Magic-sysrq-palentino-1024x691.jpg 1024w\" sizes=\"auto, (max-width: 1028px) 100vw, 1028px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<hr \/>\n<h2>1&#xfe0f;&#x20e3; Activar Magic SysRq (si est\u00e1 deshabilitado)<\/h2>\n<p><span style=\"color: #003366;\"><strong>echo 1 | sudo tee \/proc\/sys\/kernel\/sysrq<\/strong><\/span><\/p>\n<p>(Persistente en \/etc\/sysctl.conf)<br \/>\n<strong>kernel.sysrq = 1<\/strong><\/p>\n<hr \/>\n<h2>2&#xfe0f;&#x20e3; El combo legendario: <strong>REISUB<\/strong><\/h2>\n<p>Se ejecuta <strong>manteniendo pulsado<\/strong>:<br \/>\n<span style=\"color: #003366;\"><strong>Alt + SysRq (Print Screen)<\/strong><\/span><\/p>\n<p>Y luego, <strong>lento<\/strong>, una letra cada 2\u20133 segundos:<br \/>\n<span style=\"color: #003366;\"><strong>R E I S U B<\/strong><\/span><\/p>\n<hr \/>\n<h3>&#x1f9e0; \u00bfQu\u00e9 hace cada letra?<\/h3>\n<table>\n<thead>\n<tr>\n<th>Tecla<\/th>\n<th>Acci\u00f3n (nivel kernel)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>R<\/strong><\/td>\n<td>Devuelve control del teclado al kernel<\/td>\n<\/tr>\n<tr>\n<td><strong>E<\/strong><\/td>\n<td>Mata procesos de forma limpia<\/td>\n<\/tr>\n<tr>\n<td><strong>I<\/strong><\/td>\n<td>Mata procesos <em>a la fuerza<\/em><\/td>\n<\/tr>\n<tr>\n<td><strong>S<\/strong><\/td>\n<td>Sincroniza discos (flush)<\/td>\n<\/tr>\n<tr>\n<td><strong>U<\/strong><\/td>\n<td>Remonta discos en solo lectura<\/td>\n<\/tr>\n<tr>\n<td><strong>B<\/strong><\/td>\n<td>Reinicio inmediato (sin corrupci\u00f3n)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&#x1f525; <strong>Resultado<\/strong>: reinicio seguro incluso en sistemas totalmente congelados.<\/p>\n<hr \/>\n<h3>&#x26a0;&#xfe0f; \u00bfPor qu\u00e9 es tan potente?<\/h3>\n<ul>\n<li>No depende de systemd<\/li>\n<li>No depende del entorno gr\u00e1fico<\/li>\n<li>No depende de red<\/li>\n<li>No depende de login<\/li>\n<li>Funciona en <strong>producci\u00f3n, servidores, industriales<\/strong><\/li>\n<\/ul>\n<p>Es <strong>nivel root\u2026 pero m\u00e1s abajo<\/strong>.<\/p>\n<hr \/>\n<h3>&#x1f9ea; Casos reales donde salva vidas<\/h3>\n<ul>\n<li>Servidores industriales bloqueados<\/li>\n<li>M\u00e1quinas sin monitor funcional<\/li>\n<li>Sistemas embebidos<\/li>\n<li>Kernel panic parcial<\/li>\n<li>Escritorios congelados sin SSH<\/li>\n<\/ul>\n<hr \/>\n<h3>&#x1f9e0; Curiosidad brutal<\/h3>\n<p>Muchos administradores Linux <strong>nunca lo usan<\/strong><br \/>\npero <strong>los que lo conocen\u2026 no reinician mal nunca m\u00e1s<\/strong>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#x1f4a5; Control total del sistema incluso cuando est\u00e1 congelado &#x1f9e8; \u00bfQu\u00e9 es? Magic SysRq es una combinaci\u00f3n especial a nivel de kernel. Funciona aunque el sistema est\u00e9 colgado, sin interfaz gr\u00e1fica, sin SSH, sin nada. &#x1f449; Es literalmente un bot\u00f3n de emergencia del kernel Linux.<\/p>\n","protected":false},"author":1,"featured_media":5836,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[431],"tags":[],"class_list":["post-15550","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-2"],"_links":{"self":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts\/15550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/comments?post=15550"}],"version-history":[{"count":3,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts\/15550\/revisions"}],"predecessor-version":[{"id":15554,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts\/15550\/revisions\/15554"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/media\/5836"}],"wp:attachment":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/media?parent=15550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/categories?post=15550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/tags?post=15550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}