Linux Basics - Remote Login

Generally speaking, there are three ways for users to log in:

(1) Command line login

(2) ssh login

(3) GUI login

For graphical users with run level 5, their login is through a graphical login interface. After successful login, you can directly enter window managers such as KDE and Gnome.

And this article mainly talks about the situation of logging in by text: when we see the login interface of mingetty, we can enter the user name and password to log in to the system.

The account verification program of Linux is login, and login will receive the user name from mingetty as the user name parameter.

Then login will analyze the user name: if the user name is not root, and the /etc/nologin file exists, login will output the content of the nologin file, and then exit.

This is usually used to prevent non-root users from logging in during system maintenance. Only the terminals registered in /etc/securetty allow the root user to log in. If this file does not exist, the root user can log in on any terminal.

The /etc/usertty file is used to make additional access restrictions on users. If this file does not exist, there are no other restrictions.

How to switch between graphics mode and text mode

The Linux default provides six command window terminals for us to log in.

By default, we log in to the first window, which is tty1. The six windows are tty1, tty2 ... tty6,

You can press Ctrl + Alt + F1 ~ F6 to toggle them.

If you have installed a graphical interface, by default you enter the graphical interface,

At this point you can press Ctrl + Alt + F1 ~ F6 to enter one of the command window interfaces.

When you enter the command window interface and then return to the graphical interface, just press Ctrl + Alt + F7 to return.

If you use a vmware virtual machine, the shortcut keys for command window switching are Alt + Space + F1~F6.

If you are in the graphical interface, please press Alt + Shift + Ctrl + F1~F6 to switch to the command window.

Guess you like

Origin blog.csdn.net/shangyuanzhai/article/details/130360327