How to configure the network in linux

How to configure the network in linux

Many people are all commands when they come into contact with the Linux system. If they are not equipped with a graphical interface, it is very unfriendly to the newcomers. If you want to connect Linux to your own windows system, and use xshell It is difficult to operate remotely.
Good start topic: Talk about how to configure static network ip in VMware Workstation. If you use dynamic dhcp, the ip address will change every time you boot or after a while, and then xshell will have to change the host name again, which is very troublesome . The static IP address configuration can solve this problem once and for all.

First of all, we must master a few commands
ip add to view network card information ifconfig to view network card information ip a to view network card information These three commands can be used whichever is available.

Step 1:
Click on the virtual machine -> then click on settings,
Insert picture description herethen click on edit to enter the virtual machine settings

Insert picture description hereThen select the network adapter and modify the network to NAT mode
Insert picture description here

Then select VMnet8 and cancel dhcp, and then click dhcp settings to
Insert picture description hereremember the ip address inside, and then we will configure it in the network card configuration file.
Insert picture description here
Next, we enter this command in the terminal
Insert picture description here
Insert picture description here

Then you can write the information we just checked in the configuration file, and we will set the ip to the same network segment
configuration information explanation
Insert picture description here

Then set VMnet8 in their own Windows ip address set just we configurations ip address of the same network segment as
Insert picture description hereInsert picture description here
well and then we restart the network services
Insert picture description here then ip address in Windows ping virtual machine
ip address in a virtual machine ping Windows is
if If you can ping each other, there is no problem, and xhsell can connect normally.

Guess you like

Origin blog.csdn.net/m0_46188681/article/details/109280233