How to enter the CentOS character interface and window mode

Source: Internet
Author: User

How to enter the CentOS character interface and window mode in the CentOS interface switch problem, many people may be used to entering the character work mode for operations. So how do I switch to the character working mode? Next, we will introduce three methods to enter the character working mode: Enable the terminal window to enter the character working mode in the graphic environment. After the system starts, it directly enters the character working mode. Use remote login (Te lne t or SSH) to enter the character working mode. The virtual console provides multiple (6 by default) virtual consoles after you directly enter the character working mode when the system starts. Each virtual console can be used independently without affecting each other. You can use Alt + F1 ~ Alt + F6 switch between multiple virtual consoles. If you use the startx command to start the graphical environment on the CentOS page, you can use C trl + Alt + F1 ~ C trl + Alt + F6 switch character virtual terminal, use C trl + Alt + F7 to switch to the graphic interface. Local logon and logout: Enter the user name (such as root) and password (pwd) on the logon terminal. Log out: You can enter the logout command on the current logon terminal or use the + shortcut key. Log on to a remote Linux System Using ssh in a Linux environment. The ssh command in Linux is the client program of O pe nSSH. To log on to the remote Linux system, make sure that the O pe nSSH server is started on the remote Linux system. The command format for logging on to the remote O pe nSSH server using ssh commands is: $ username on the ssh remote host @ IP address or FQDN of the remote host enter the CentOS page of the character and enter the Linux system from the system running level to the specified running level at any time, in addition, different running-level programs and services are different, and the work to be done and the purpose to be achieved are different. Centos sets the running level as shown in the following table, and the system can switch between these running levels to complete different tasks. Running level indicates that all processes of 0 will be terminated, and machines will be stopped in an orderly manner. When the system is shut down, it is in this running level 1 single user mode. It is used for system maintenance. Only a few processes run, and all services do not start the two-user mode. Like running level 3, the Network File System (NFS) service is not started in 3 multi-user mode. Allow multiple users to log on to the system. The default startup Level 4 is reserved for the User-Defined running level 5 Multi-user mode, and X-Window is run after the system is started, A graphical logon window is provided. 6. All processes are terminated and the system restarts. if you enter the character logon CentOS page after the system starts, the default running level is 3. If you enter the graphical logon CentOS page after the system starts, the default running level is 5. 2. if you have enabled the CentOS page, you can run the following command to access the CentOS page: $ startx & run-level viewing and switching users can use the following command to view the Run-level runlevel of the current system users can use the following command to switch the Run-level init [0123456Ss], that is, after the init command one parameter, this parameter is the code of the running level to be switched to. For example, if you use the init 0 command to switch to the running level 0, shutdown the system and use the init 1 command to switch to the running level 1, in single-user running mode, use the init 6 command to switch to the running Level 6, that is, restart or use the te linit command. In CentOS, the te linit command is the symbolic link of the init command. The following example shows how to use the runle ve l and init commands: ## display the current running level of the system # runlevelN 3 # The current running level of the system is "3 ", no previous running level (represented by "N) # init 2 # after the "init 2" command is executed, the system console displays the corresponding stop service information # runlevel3 2 # the current system running level is "2 ", the last running level is "3". If the conversion operation level is successful, you can go to the CentOS page to shut down and restart the command system. In fact, you can switch the running level. You can use the init command to shut down and restart the instance. The init command is used to immediately shut down or restart the instance. However, in a multi-user system, if you want to send a shutdown warning to each user to complete their work and log out, you must use commands such as shutdown, halt, and re boot. In a multi-user environment, the shutdown command is usually used to close and restart the system. The shutdown command can shut down the system in a safer way. All users logging on to the system will be notified that the system will be shut down, and new Login operations will be blocked; at the same time, all processes will be notified that the system will shut down, so that some programs, such as vi, will be able to save the files edited by the user in time and exit. The format of the shutdown command is: shutdown [parameter] time [warning-message] Where: time: specifies the time after which the shutdown command is executed. The following formats can be used: hh: mm: specify the absolute time, hh is used to specify the hour, m is used to specify the minute + m: Specify the relative time, m is a number, the unit is minute now: do now, equivalent to + 0warning-message: common parameters used to set the warning information to be sent to the user CentOS interface switch are as follows:-t sec: How many seconds between sending the warning information and deleting the information to notify init to execute the Run-level switch-k: not really close the system, just send a warning message to each user-r: Shut down and restart the system-h: Shut down and then stop the system-f: Do not use fsck to check disk-F: after the disk is restarted, force fsck to check the disk. For example: # warning all user systems will restart the System in 5 minutes # shutdown-r + 5 "System will be reboot in 5 minites, please save your work. "## immediately shut down the system # shutdown-h now # immediately restart the system and force the fsck to check the disk after the restart # shutdown-h-F now

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.