Linux Login and exit system commands

Source: Internet
Author: User

User login system, in order to enable the system to identify their own must enter the user name and password after the system verified that the system can be entered.

Description
During system installation, you can create two kinds of accounts: Superuser account and ordinary user account, Linux users are generally ordinary users, and system administrators generally use Superuser account to complete some of the work of system management. If you only need to complete a few tasks that can be done by an ordinary user account, It is recommended that you do not use Superuser accounts to avoid inadvertent damage to the system.

User login is divided into two steps, the first step is to enter the user's login name, the system according to the login to identify users; the second step is to enter the user's password the password is the user's own choice of a string, for other users are confidential, is the system used to identify the true and false user's

1. Startup and Login System
Superuser's username is root, the password is set when the system is installed, and the following prompts are displayed on the screen after the system starts successfully:

localhost login:

Enter the super username "root" and type the ENTER key at this time, the user will see the prompt to enter the password on the screen:

localhost login:root
Password:

You need to enter a password, enter the password, the password will not be displayed on the screen, if the user entered the wrong password, you will see the following information on the screen.

Login incorrect.

You will need to re-enter it now. When the user enters the username and password correctly, he or she can enter the system legally. Screen display:

[Root@loclhost/root] #

This indicates that the user has logged into the system and is ready to operate. Here "#" is a super User's system prompt. Ordinary users can log in after they have established a common user account.

When a superuser or an ordinary user needs to exit the system, type the exit command at the shell prompt. There are other ways to exit the system, but the top one is the safest.

2. Reboot the system

You can restart the Linux system by executing the reboot command after logging on to the Linux operating system with root users:
[Root@loclhost/root] # reboot

3. Shut down the system

The shutdown command can safely shut down or restart the Linux system, prompting a warning message to all logged-in users on the system before the system shuts down. The command also allows the user to specify a time parameter, which can be a precise time. It can also be a time period from now on. The exact time format is "hh:mm", which represents hours and minutes, the time period is represented by "+" and minutes, and the data is automatically synchronized after the system executes the command, and the general format of the command is:

shutdown [options] [TIME] [warning message]

The meanings of the options in the command are:

-K does not really shut down but only sends a warning message to all users

-R reboot immediately after shutdown

-H do not reboot after shutdown

-F Skip fsck during fast shutdown reboot

-N Fast shutdown without init program

-C cancels an already running shutdown

Specifically, this command is only available to Superuser

Example 1 system shutdown in 10 minutes and reboot now

# Shutdown–r +10

Example 2 system shuts down immediately and does not reboot

# shutdown–h Now

Related Article

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.