{"id":10835,"date":"2024-12-14T06:56:23","date_gmt":"2024-12-14T06:56:23","guid":{"rendered":"https:\/\/blog.trustedhosting.in\/?p=10835"},"modified":"2024-12-14T06:56:23","modified_gmt":"2024-12-14T06:56:23","slug":"how-to-reboot-your-server-in-linux","status":"publish","type":"post","link":"https:\/\/www.webystrata.com\/blog\/how-to-reboot-your-server-in-linux\/","title":{"rendered":"How to Reboot Your Server in Linux"},"content":{"rendered":"<figure id=\"attachment_10837\" aria-describedby=\"caption-attachment-10837\" style=\"width: 2560px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.trustedhosting.in\/cpanel-hosting.html\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-10837 size-full\" title=\"How to Reboot Your Server in Linux\" src=\"https:\/\/blog.trustedhosting.in\/wp-content\/uploads\/2024\/12\/5665291_57806-scaled.jpg\" alt=\"How to Reboot Your Server in Linux\" width=\"2560\" height=\"2560\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/5665291_57806-scaled.jpg 2560w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/5665291_57806-300x300.jpg 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/5665291_57806-1024x1024.jpg 1024w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/5665291_57806-150x150.jpg 150w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/5665291_57806-768x768.jpg 768w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/5665291_57806-1536x1536.jpg 1536w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/5665291_57806-2048x2048.jpg 2048w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/a><figcaption id=\"caption-attachment-10837\" class=\"wp-caption-text\">\u00a0<\/figcaption><\/figure>\n<h1>How to Reboot Your Server in Linux<\/h1>\n<p>Beyond kernel updates, there shouldn\u2019t really be much need to reboot your Linux <a href=\"https:\/\/www.trustedhosting.in\/cpanel-hosting.html\" target=\"_blank\" rel=\"noopener\">server<\/a> (we\u2019re not working with Windows after all), but it\u2019s still an important task to be able to carry out.<\/p>\n<p>There are a few ways to do it:<\/p>\n<div class=\"highlight-console notranslate\">\n<div class=\"highlight\">\n<pre><span class=\"go\">reboot<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<div class=\"highlight-console notranslate\">\n<div class=\"highlight\">\n<pre><span class=\"go\">shutdown -r now<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<p>Both those have the same effect on the system, the server will run through its shutdown scripts and then boot back up.<\/p>\n<p>A more traditional way would be to put the system into runlevel 6:<\/p>\n<div class=\"highlight-console notranslate\">\n<div class=\"highlight\">\n<pre><span class=\"go\">init 6<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<p>But there\u2019s really no reason to be using this method on modern systems above their built in reboot\/shutdown commands, you may miss out on some of the self-documenting features implemented by these commands.<\/p>\n<p>In some very niche situations, you may find that the above commands won\u2019t reboot your server. This is likely due you hitting a deadlock situation. In-depth explanations of this state are beyond the scope of a basic Linux reboot page, but there\u2019s a lot of good information in the book\u00a0Linux Kernel Development, Second Edition book\u00a0(Chapter 8)<\/p>\n<p>If you do find yourself in this situation, you can always send your server down for an immediate reboot with the following command:<\/p>\n<div class=\"admonition warning\">\n<blockquote><p>This is not a recommended course of action for rebooting your server. Nothing is synced or unmounted, it\u2019s fairly similar to tearing the power cable out. If you use this method, please make sure you\u2019re know what you\u2019re letting yourself in for.<\/p><\/blockquote>\n<\/div>\n<div class=\"highlight-console notranslate\">\n<div class=\"highlight\">\n<pre><span class=\"go\">echo b &gt; \/proc\/sysrq-trigger<\/span><\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to Reboot Your Server in Linux Beyond kernel updates, there shouldn\u2019t really be much need to reboot your Linux&hellip;<\/p>\n","protected":false},"author":1,"featured_media":10837,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-10835","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/10835","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/comments?post=10835"}],"version-history":[{"count":3,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/10835\/revisions"}],"predecessor-version":[{"id":10839,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/10835\/revisions\/10839"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media\/10837"}],"wp:attachment":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media?parent=10835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/categories?post=10835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/tags?post=10835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}