Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the ways to configure ip addresses in linux

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

What are the methods of configuring ip addresses in linux, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, hope you can gain something.

(1) Ifconfig command

The first uses the ifconfig command to configure the ip address of the network card. This command is usually used for 00:00 testing, after the computer starts

The configuration of the ip address will automatically fail. The specific usage is as follows. Ipconfig ethx ipadd netmask x.x.x.x .

The x in ethx represents the fast Ethernet card, and the default first block is 0.ipadd, which represents the ip address. X.x.x..x is the subnet mask. For example, the ip address configured for the network card eth0 is 192.168.1.1 with a subnet mask of 255.255.255.0. As shown in the following figure

Note (the ip address configured by this method will fail after the computer restarts)

(2) neat command

Neat command = configure ip address under redhat-config-network drawing

Double-click the part under the picture that draws a red line

After double-clicking the underlined section, the following figure appears: configure the relevant information according to the requirements

Double-click ok to complete the configuration. Restart the service after configuration and check the configuration ip address.

Note (the ip address configured by this method is still valid after the computer is rebooted)

(3) netconfig command

After entering netconfig, it will appear as shown in the following figure. Click the yes button.

Ok exits after relevant configuration.

Note (the ip address configured by this method is still valid after the computer is rebooted)

(4) vi / etc/sysconfig/network-scripts/ifcfg-ethx

Restart the service after configuration, and the p address will be configured. In fact, the configuration methods of the first three finally changed the configuration file under / etc/sysconfig/network-scripts/ifcfg-ethx.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report