这是一条Linux系统IP地址配置命令。具体含义是:
This is a Linux IP address configuration command. This means:
设置系统的IP地址为192.168.0.2;子网掩码为24,也就是255.255.255.0;广播地址为192.168.0.255;网卡设备名称为eth0。
The IP address setting up the system is 192.168.0.2; the subnet mask is 24, or 255.255/0; the broadcast address is 192.168.0.255; and the network card device is named eth0.
网络中的计算机都必须设置唯一的IP地址,才能正常通信。由于有这种唯一的地址,才保证了用户在联网的计算机上操作时,能够高效而且方便地从千千万万台计算机中选出自己所需的对象来。
Computers in the network have to have the only IP address to be able to communicate properly. This unique address ensures that users can efficiently and easily select their own objects from tens of millions of computers when operating on a networked computer.
IP地址就像是我们的家庭住址一样,如果你要写信给一个人,你就要知道他(她)的地址,这样邮递员才能把信送到。计算机发送信息就好比是邮递员,它必须知道唯一的“家庭地址”才能不至于把信送错人家。只不过我们的地址是用文字来表示的,计算机的地址用二进制数字表示。
The IP address is like our home address. If you want to write to a person, you need to know his or her address so that the mailman can deliver it. The computer sends the message like a mailman, and it has to know the only “family address” in order not to send it to the wrong person. Our address is only in words, and the computer's address is in binary numbers.
eth0是系统为网卡设置的名称。如果有双网卡或者多块网卡,就会有类似于eth1,eth2这样的名称。名称是可以人为设置的。它是当前计算机系统中网卡的唯一名称。
Eth0 is the name that the system sets for the net card. If you have a double or multiple card, you have a name like Eth1, Eth2. The name can be artificially set. It is the only name for the network card in the current computer system.
修改完成后可以用ifconfig命令查看是否修改成功。
When a change is completed, you can use the ifconfig command to see if the change has been successful.
这条命令是临时配置系统IP,也就是说重启系统后IP地址会失效。想要配置永久IP地址请在终端编辑文件。命令:vi /etc/sysconfig/network-scripts/ifcfg-eth0 This command is the temporary configuration system IP, which means that the IP address will expire after the system is restarted. To configure the permanent IP address, edit the file at the terminal. Command: vi/ etc/sysconfig/network-scripts/ifcfg-eth0
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论