Start our Linux system on the virtual machine for the first time

Time:2021-10-28

In the last article, we learned how to build our own linux learning environment in the local environment, and officially entered our linux learning journey from today. Today, we try to start the Linux system for the first time. In order to ensure the smooth operation of the virtual machine, it is recommended to set the resolution to 800×600.

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

Start our Linux system on the virtual machine for the first time

2. After entering the next interface, the users you started and logged in for the first time and unlisted users will be displayed. By default, the users created when installing Linux will be displayed.

Start our Linux system on the virtual machine for the first time

3. If you want to log in as the root user of the administrator, click “not listed” and enter the user nameroot, the password is the root user password set when installing the system.

Start our Linux system on the virtual machine for the first time

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

Start our Linux system on the virtual machine for the first time

5. After the initialization setting 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 do we switch to the terminal interface in our learning environment? Click “activity > > Terminal” in the upper left corner to enter the command line terminal.

Start our Linux system on the virtual machine for the first time

Then enter the command in the terminal:

init 3

Press 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.

Start our Linux system on the virtual machine for the first time

After logging in successfully, you can see a window in front of the flashing cursor$Symbol or#number. What’s the difference between the two symbols?

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

The symbol represents the root user with the highest permissions.

So how do we switch login users? Just enter the commandexit, exit the current logged in user, and then log in again with another user account.

Start our Linux system on the virtual machine for the first time

After logging in the account, use init 5 to switch back to the graphical interface

6. Next, let’s learn about the login shell, which can also be called the terminal. The terminal has three ways:

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

7. Directory structure commonly used in Linux

  • /root directory
  • /rootDirectory of root user
  • /home/usernameDirectory of ordinary users
  • /etcProfile directory
  • /binThe command directory is usually used to store all user executable commands
  • /usr/bin /usr/sbinOther commands pre installed in the system,/usr/binIs to put all user executable commands,usr/sbinPut commands executable by root user
  • /sbinManagement command directory, commands executable by root user

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

ls /

Start our Linux system on the virtual machine for the first time

8. How to shut down Linux system

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

init 0

The above is how we start the Linux system for the first time today, as well as the most basic knowledge related to Linux. Starting with the next article, we will step by step explain the common commands of Linux.

Start our Linux system on the virtual machine for the first time

Recommended Today

Swift advanced (XV) extension

The extension in swift is somewhat similar to the category in OC Extension can beenumeration、structural morphology、class、agreementAdd new features□ you can add methods, calculation attributes, subscripts, (convenient) initializers, nested types, protocols, etc What extensions can’t do:□ original functions cannot be overwritten□ you cannot add storage attributes or add attribute observers to existing attributes□ cannot add parent […]