For the first time, we started our Linux system in a virtual machine

Time:2021-4-21

In the last article, we learned how to build our own linux learning environment in the local environment. From today, we will officially enter our linux learning journey. Today, we try to start the Linux system for the first time. To ensure the smooth operation of the virtual machine, we suggest setting the resolution to 800×600.

1. After starting Linux for the first time, enter the initialization settings, we agree to license, and then click “end configuration”.

image

2. After entering the next interface, the user you first started and logged in and the user not listed will be displayed. The default display is the user created when installing Linux.

image

3. If you want to use the administrator’s root user to log in, click “not listed” and enter the user nameroot, the password is the root password set at the time of installing the system.

image

4. After successful login, enter the graphical desktop system, select Chinese and click forward.

image

5. After the initialization is completed, the default entry is the graphical interface of the Linux system. However, when the Linux system is actually used on the server, there is no graphical interface, but a character terminal. How can we switch to the terminal interface in our learning environment? Click “activity > > Terminal” in the upper left corner to enter the command line terminal.

image

Then enter the command in the terminal:

init 3

Enter to enter our terminal interface. In the terminal interfacelocalhost login:Enter the user name of the system, such asroot, then enter the password and click enter to log in.

image

After successful login, you can see a flash in front of the cursor$Symbol or#number. What’s the difference between the two symbols?

The $symbol indicates that the login is an ordinary user, which has certain restrictions on permissions and file operation.

The symbol represents the root user with the highest authority.

So how do we switch login users? Just enter the commandexit, log out of the current login user, and then log in again with other user accounts.

image

After logging in the account, you can switch back to the graphical interface with init 5

6. Next, let’s learn about the login shell, which we can also call a terminal. There are three ways for a terminal:

  • Graphical terminal: when we start Linux system for the first time in virtual machine, the graphical interface we see is graphical terminal
  • Command line terminal: input commandinit 3Enter the command line terminal
  • Remote terminal (SSH, VNC): in the actual work, we use the remote terminal

7. Common directory structure in Linux

  • /root directory
  • /rootThe directory of the root user
  • /home/usernameGeneral user directory
  • /etcProfile directory
  • /binThe command directory is usually used to put all the commands that can be executed by users
  • /usr/bin /usr/sbinOther commands pre installed in the system,/usr/binIt is a command that can be executed by all users,usr/sbinPut the command that root can execute
  • /sbinThe management command directory is the command that root can execute

At the command line terminal, we can enter the following command to see some common directories just mentioned:

ls /

image

8. How to shut down Linux system

In our practical application, the Linux server does not need to be shut down. However, if we need to shut down the learning environment, we can enter the following command at the command line terminal:

init 0

That’s how we start Linux for the first time today, and the most basic knowledge about Linux. At the beginning of the next article, we’ll step through the common linux commands.

image

Recommended Today

SQL server stored procedure application 2: paging query data and dynamic splicing where conditions

preface In the development, the query function runs through the full text. We use stored procedure paging query one by one, and support dynamic splicing where condition. Key points:Support dynamic splicing where condition Students who have questions about the use of stored procedures【Creation and use of SQL server stored procedure】Make up lessons. As for whether […]