Home  >  Article  >  Operation and Maintenance  >  How to set ip in linux

How to set ip in linux

(*-*)浩
(*-*)浩Original
2019-12-28 13:45:235314browse

How to set ip in linux

1. Open the Linux terminal system and enter the following code in the system.                                                                                                                               (Recommended learning: linux tutorial)

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

How to set ip in linux

2. Then start filling in the ip address, subnet mask, gateway, etc. The command code is as shown in the figure.

How to set ip in linux

3. After filling in the terminal, save and exit.

How to set ip in linux

4. Then restart the network service. The code in the red box is the code for restarting.

How to set ip in linux

5. Then ping the gateway and test it on the external network. If it passes normally, it will be OK.

How to set ip in linux

The above is the detailed content of How to set ip in linux. 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