Linux operating system basics
1. Introduction to Linux background
Linux
In fact, it is an operating system, andWindows
is in a "juxtaposed" relationship. In 2009, the first version was developed1991
by Finns ( ); compared with , its features : (1) You can view the source code; (2) It is based on the network; ( 3) The security is higher; (4) The hardware resources occupied by the system are smaller, and more resources are left for the program;Linus Benedict Torvalds
Linux
windows
Linux
2. Linux environment construction
(1) Construction method
If you want to learn
Linux
, you first needLinux
an environment. There are four main ways to build the environment. The characteristics are as follows:
- (1) Use a virtual machine;
VMWare
Due to the existence of some current virtual machine software (such as )bug
, it will cause various inexplicable problems in the environment, and it is inconvenient to use;
- (2) Installed directly on the physical machine;
Because the
Linux
desktop is not friendly to use, it is not used;
- (3) use
WSL
(Windows Subsystem for Linux
);
This method is a new function developed in
Windows
recent years, andWindows
one is integrated in the systemLinux
, but this technology is not mature enough at present;
- (4) Use cloud server;
This method is more convenient, you only need to buy a cloud server (Alibaba cloud, Tencent cloud any one),
此处使用该方式搭建环境
;
Three steps to build an environment with a cloud server:
- (1) Purchase a cloud server;
Tencent Cloud Official Website
Just choose 1, you need to authenticate;
- (2) Installation system
CentOS 7.6
Select the version ( ) of the operating system (mirror) when purchasing 没有选择这个,想更换也可以重装系统
;
After completion, you can view the ip
address and reset the password. The default account name is root
Don't care;
Notice:
- When resetting the password, click Shut Down first and then reset!
- The three information of account name, password and
ip
addressLinux
are ;
- (3) Remote connection and reuse
Connect through the client ( Xshell
), the following describes the Xshell
installation and use;
3. Terminal connection to Linux
(1) What is a terminal
Terminal software is a type of tool software that can establish a network connection with a remote host to perform some operations on the host. Common terminal software :
(1)XShell
(2)Putty
(3)MobaXTerm
(4)Iterm2
(5)SecureCRT
used hereXShell
;
(2) Install Terminal XShell
- Double click
.exe
the file to install
The following page appears, do not care;
(1) Click Next
(2) Click to accept the license agreement and the next step
(3) Modify the file installation location and click Next:
The location here is:E:\Program Files (x86)\NetSarang\Xshell 7
(4) Click to install:
Complete the installation:
the following page appears, indicating success:
(3) Use Xshell to log in to the host
Enter in XShell
Terminal :
ssh 服务器外网ip地址
ip
It is the external network seen in the Tencent Cloud background pageip
Prompt to enter the user account password : After entering the correct password, you can log in successfully ( 账号root,密码:重置之后的密码
)
The following page is displayed, indicating that the login is successful :
Notice: copy paste Xshell
under
Xshell
默认不支持复制、粘贴,更改如下所示
:
- (1) Tools -> Options -> Keyboard and Mouse, as shown below :
- (2) Step 1 has been completed above, in step 2, click Edit:
After entering Edit, select New :
Enter the key combination: Ctrl+c
, and press at the same time, another window will pop up, change as follows to complete the configuration :
Paste: Ctrl+v
also the same configuration method,Then you can Xshell
copy and paste it in ~;