{"id":995,"date":"2013-01-24T04:59:25","date_gmt":"2013-01-24T10:59:25","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=995"},"modified":"2019-10-25T00:35:06","modified_gmt":"2019-10-25T06:35:06","slug":"run-levels-in-linux","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/run-levels-in-linux\/","title":{"rendered":"Runlevels in Linux"},"content":{"rendered":"<p>Runlevel is a preset operating state on a Unix-like operating system. A run-level is a software configuration of the system that allows only a selected group of processes to exist. A system can be booted into (i.e., started up into) any of several run-levels, each of which is represented by a single-digit integer. Each run-level designates a different system configuration and allows access to a different combination of processes (i.e., instances of executing programs).<\/p>\n<p><!--more--><strong>Different Runlevels in Linux<\/strong><\/p>\n<p><a class=\"lightbox\" href=\"https:\/\/www.supportpro.com\/blog\/basic-linux-commands\/\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-4070 alignright\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2013\/01\/linux-154544_960_720-248x300.png\" alt=\"A penguin working on a computer\" width=\"273\" height=\"330\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2013\/01\/linux-154544_960_720-248x300.png 248w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2013\/01\/linux-154544_960_720.png 594w\" sizes=\"(max-width: 273px) 100vw, 273px\" \/><\/a>Init can run the system in one of seven run-levels. These run-levels are 0-6 and S or s. The system runs in only one of these run-levels at a time. Typically these Runlevels are used for different purposes. Run-levels 0, 1, and 6 are reserved. For Redhat Linux version 6, the run-levels are:<\/p>\n<p>0 &#8211; halt<br \/>\n1 &#8211; Single user mode<br \/>\n2 &#8211; Multiuser, without NFS (The same as 3, if you don&#8217;t have networking)<br \/>\n3 &#8211; Full multiuser mode<br \/>\n4 &#8211; unused<br \/>\n5 &#8211; X11<br \/>\n6 &#8211; Reboot<\/p>\n<p>Commands to check current run level :<\/p>\n<blockquote><p>#who -r<\/p><\/blockquote>\n<p>To change the run level :<\/p>\n<blockquote><p># init (runlevel number)<\/p><\/blockquote>\n<p>eg: init 1<br \/>\nwill run the single-user mode<\/p>\n<p>To change the default run level, edit \/etc\/inittab file, and edit entry initdefault:<\/p>\n<blockquote><p># vi \/etc\/inittab<\/p><\/blockquote>\n<p>Set initdefault to 5, so that you can boot to X11 mode next time when Linux comes up:<\/p>\n<p>id:5:initdefault:<\/p>\n<p>Save and close the file. Reboot the system to see changes:<\/p>\n<blockquote><p># reboot<\/p><\/blockquote>\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin <\/a><\/p>\n<p style=\"text-align: center;\"><!--HubSpot Call-to-Action Code --><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><!-- [if lte IE 8]><\/p>\n\n\n\n\n\n<div id=\"hs-cta-ie-element\"><\/div>\n\n\n<![endif]--><a href=\"https:\/\/www.supportpro.com\/requestquote.php\"><img decoding=\"async\" id=\"hs-cta-img-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-img\" style=\"border-width: 0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b.png\" alt=\"Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value\" \/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '9d590242-d641-4383-94b4-8cfd62f0af6b', {}); <\/script><\/span><!-- end HubSpot Call-to-Action Code --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Runlevel is a preset operating state on a Unix-like operating system. A run-level is a software configuration of the system that allows only a selected group of processes to exist.&hellip;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-995","post","type-post","status-publish","format-standard","hentry","category-linux-basics"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=995"}],"version-history":[{"count":15,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/995\/revisions"}],"predecessor-version":[{"id":4270,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/995\/revisions\/4270"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}