CentOS modifies the default running level and disables Linux

Source: Internet
Author: User


Modify the default running level of CentOS, disable Linux [1], and modify the default running level. By default, only the command line interface is enabled, saving the following resources: Modify the default startup level in the inittab file, change from 5 to 3. (Note: Do not set the default running level to 0 or 6) the meaning of each start level of www.2cto.com is as follows: 0 is stopped, and the machine is disabled. The single-user mode is similar to the security mode in Win9x. 2-user mode, but not supported by NFS. 3. The complete multi-user mode is a standard operation level. 4 reserved. If no 5 is used, X11 is used. It enters the X Window System. 6. Restart the init 6 server. [Root @ localhost ~] # Vim/etc/inittab # inittab is only used by upstart for the default runlevel. # adding other configuration here will have no effect on your system. # System initialization is started by/etc/init/rcS. conf ## Individual runlevels are started by/etc/init/rc. conf # Ctrl-Alt-Delete is handled by/etc/init/control-alt-delete.conf # Terminal gettys are handled by/etc/init/tty. conf and/etc/init/serial. c Onf, # with configuration in/etc/sysconfig/init. # For information on how to write upstart event handlers, or how # upstart works, see init (5), init (8), and initctl (8 ). # www.2cto.com # Default runlevel. the runlevels used are: #0-halt (Do NOT set initdefault to this) #1-Single user mode #2-Multiuser, without NFS (The same as 3, if you do not have networking) #3-Full multiuser mode #4-unus Ed #5-X11 #6-reboot (Do NOT set initdefault to this) # id: 3: initdefault: [2] disable SELinux [root @ localhost ~] # Vi/etc/sysconfig/selinux www.2cto.com # This file controls the state of SELinux on the system. # SELINUX = can take one of these three values: # enforcing-SELinux security policy is enforced. # permissive-SELinux prints warnings instead of enforcing. # disabled-No SELinux policy is loaded. SELINUX = disabled # SELINUXTYPE = can take one of these two values: # targeted-Targeted processes are protected, # mls-Multi Level Security protection. SELINUXTYPE = targeted after modification, restart Linux or use the setenforce 0 command to disable SELinux in real time

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.