Home  >  Article  >  Operation and Maintenance  >  Can linux modify static ip address?

Can linux modify static ip address?

WBOY
WBOYOriginal
2022-05-24 11:15:049073browse

Linux can modify the static ip address. The method is: 1. Use the ifconfig command to temporarily modify the syntax "ifconfig eth0..netmask.."; 2. Use "vi ifcfg-eth0 path" to modify the static IP information of the "ifcfg-eth0" file, and restart the network service. .

Can linux modify static ip address?

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

Can Linux modify the static IP address?

1. Effective immediately:

The example is as follows:

# ifconfig eth0 192.168.1.155 netmask 255.255.255.0

2 , restart to take effect

Modify /etc/sysconfig/network-scripts/ifcfg-eth0

The example is as follows:

Enter in the terminal: vi / etc/sysconfig/network-scripts/ifcfg-eth0

Can linux modify static ip address?

Start editing and fill in the ip address, subnet mask, gateway, DNS, etc. Among them, the "information in the red box" is a must.

Can linux modify static ip address?

After editing, save and exit.

Can linux modify static ip address?

Restart the network service. service network restart or /etc/init.d/network restart

Can linux modify static ip address?

ping the gateway and ping the external network for testing. If both can ping successfully, it means the network is normal.

Can linux modify static ip address?

Can linux modify static ip address?

Recommended learning: Linux video tutorial

The above is the detailed content of Can linux modify static ip address?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn