Linux server configuration static IP address

1. Open the virtual machine on the server with VMware and enter the linux command interface

2. Check the network card name, such as ens160

ip addr

3. Modify the network card configuration file:

cd etc/sysconfig/network-scripts
vi ifcfg-ens160

The following interface appears, press the "i" key to enter the editing, add the last four lines, change BOOTPROTO to "static", change ONBOOT to "yes", press "esc" to exit editing, and enter ":wq" to save:
Insert picture description here

4. Restart the network

Type:

service network restart

5. View Ip

ip addr

Insert picture description here

6. At this time, you can remotely connect to the server locally, and you can download "MobaXterm" to connect in the local windows environment.

Session -> SSH -> enter IP and username -> OK

Guess you like

Origin blog.csdn.net/weixin_45281949/article/details/109532955