假设本机在局域网中的原本地址是 10.20.0.102 , 现在想修改本地主机IP地址为192.168.1.102
通过指令修改IP
sudo ifconfig eth0 192.168.1.102
手动修改IP
Network Connections --> Add --> Editing Ethernet connection 1 --> IPv4 Settings --> Method: Manual --> Address --> Add -->
Address | Netmask | Gateway |
---|---|---|
192.169.1.102 | 24 | 192.168.1.1 |
--> Save
退出后,回到 Network Connections 里,改连接新的网口