How to set the network card IP address under Linux

王林
Release: 2019-12-02 15:04:12
Original
11849 people have browsed it

How to set the network card IP address under Linux

Method 1: Use the ifconfig command to configure the IP address of the network card

This command is usually used for temporary testing. After the computer is started, the IP The configuration of the address will be automatically invalidated.

The specific usage is as follows:

Ipconfig  ethx   ipadd    netmask      x.x.x.x
Copy after login

The x in ethx represents the fastest Ethernet card. The default first block is 0.ipadd represents the ip address and x.x.x..x is the subnet mask.

For example: the IP address configured for the network card eth0 is 192.168.1.1 and the subnet mask is 255.255.255.0.

As shown below:

How to set the network card IP address under Linux

Note: The IP address configured by this method will become invalid after the computer is restarted!

Online learning video sharing: linux video tutorial

Method 2: Use neat command

Neat command= Configure the ip address under the redhat-config-network graph

How to set the network card IP address under Linux

Double-click the red line under the graph

How to set the network card IP address under Linux

Double-click the underlined part and the following picture will appear: Configure relevant information as required

How to set the network card IP address under Linux

Double-click ok to complete the configuration. After configuration, restart the service and check the configured ip address

How to set the network card IP address under Linux

Method 3: Use the netconfig command

will appear after entering netconfig As shown in the picture below, click the yes button

How to set the network card IP address under Linux

to make relevant configurations and then exit with ok

How to set the network card IP address under Linux

Note: The IP address configured by this method is still valid after the computer is restarted!

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of How to set the network card IP address under Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!