Linux command login command

  

login

1. Function

The role of login is to log in to the system, its usage rights are all users.

2.Format

login [name][-p ][-h hostname]

3. Main parameters

-p: notification login Maintain current environmental parameters.

-h: Used to transfer usernames between remote logins.

If you choose to log in to Linux with command line mode, then the first Linux command you see is login:.

The general interface is this:

Manddrake Linux release 9.1(Bamboo) for i586

renrel 2.4.21-0.13mdk on i686 /tty1

localhost login:root

password:

The first line is the Linux distribution number, the second line is the kernel version number and the login virtual console. We enter the login name in the third line, press the "Enter" key to enter the account password after the password, you can log in to the system. . For security reasons, characters are not echoed on the screen when the account password is entered, and the cursor does not move.

After logging in, you will see the following interface (take superuser as an example):

[root@localhost root]#

last login:Tue ,Nov 18 10: 00:55 on vc/1

The above shows the login day, month, day, time and virtual console used.

4. Application Tips

Linux is a true multi-user operating system that can accept multiple users to log in at the same time, and allows one user to log in multiple times. This is because Linux, like many versions of Unix, provides access to the virtual console, allowing users to log in multiple times at the same time from the console (the system's console is the monitor and keyboard directly connected to the system). Each virtual console can be thought of as a separate workstation that can be switched between workbenches. Virtual console switching can be done by pressing the Alt key and a function key, usually using F1-F6.

For example, after the user logs in, click the "Alt+ F2" button and the user can see The "login:" prompt appears above, indicating that the user saw the second virtual console. Then just press the "Alt+ F1" button to go back to the first virtual console. A newly installed Linux system allows users to access the first six virtual consoles using the "Alt+F1" to "Alt+F6" keys. The most useful thing about the virtual console is that when a program error causes the system to deadlock, you can switch to another virtual console to work and close the program.

Copyright © Windows knowledge All Rights Reserved