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 is the method of using ifconfig for mini in CentOS7

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces the relevant knowledge of "what is the method of mini using ifconfig in CentOS7". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "what is the method of mini using ifconfig in CentOS7" can help you solve the problem.

Commands for CentOS version 7 systems to view network information

CentOS 7 minimizes the system, using the "ip addr" and "ip link" commands to find Nic details. For statistics, you can use "ip-s link".

To see the details of the network card: ip addr [root@linuxprobe ~] # ip addr1: lo: mtu 16436 qdisc noqueue state UNKNOWN link/loopback qdisc noqueue state UNKNOWN link/loopback 0000 qdisc noqueue state UNKNOWN link/void inet 0000 brd 0000 brd 0000VlV 0000Rd 0000 inet 127.0.0.1 8 scope host lo inet6:: 1scope host valid_lft forever preferred_lft forever2: venet0: mtu 1500 qdisc noqueue state UNKNOWN link/void inet 127.0.0.1Universe 32 scope host venet0 inet 192 .168.1.101 / 32 brd 192.168.1.101 scope global venet0:0 to view network interface statistics: ip link [root@linuxprobe ~] # ip link1: lo: mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00lv 0000lv 0000lv 00lv 0000lv 00 brd 00lv 00lv 00lv 0000lv 002: venet0: mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT link/void

Or use: ip-s link

[root@linuxprobe ~] # ip-s link1: lo: mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00 TX: bytes packets errors dropped carrier collsns 00 00 00 TX: bytes packets errors dropped carrier collsns 00 00 00 2: venet0: mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT link/void RX: bytes packets errors dropped overrun mcast 8515667 6667 00 TX: bytes packets errors dropped carrier collsns 300403 4249 00 00 enable the "ifconfig" command in the CentOS 7 minimized server version

If you don't know where to find the ifconfig command, follow these simple steps to find it.

First, let's find out which package provides the ifconfig command: [root@linuxprobe ~] # yum provides ifconfigLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile* base: centos.aol.in* extras: centos.aol.in* updates: centos.aol.innet-tools-2.0-0.17.20131004git.el7.x86_64: Basic networking toolsRepo: @ baseMatched from:Filename: / usr/sbin/ifconfig

Or you can use the following command

Yum whatprovides ifconfig

Here, the "provides" or "whatprovides" switches are used to find out that a package provides certain functions or files.

The ifconfig command is provided in the net-tools package. Therefore, you can also use the ifconfig command to install the net-tools package.

Install net-tools package yum install net-tools

Now you can use the ifconfig command as usual.

[root@linuxprobe] # ifconfig-alo: flags=73 mtu 16436 inet 127.0.0.1 netmask 255.0.0.0 inet6:: 1 prefixlen 128 scopeid 0x10 loop txqueuelen 0 (Local Loopback) RX packets 0 bytes 0 (0.0B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0venet0: flags=211 mtu 1500 inet 127.0 .0.1 netmask 255.255.255.255 broadcast 0.0.0.0 destination 127.0.0.1 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 0 (UNSPEC) RX packets 7073 bytes 8549159 (8.1 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4611 bytes 359201 (350.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0venet0:0: flags=211 mtu 1500 inet 192.168.1.101 netmask 255.255.255.255 broadcast 192.168.1.101 destination 192.168.1.101 unspec 00-00-00-00-00-00-00 txqueuelen 0 (UNSPEC) about "what is the method of mini using ifconfig in CentOS7" Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

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

Development

Wechat

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

12
Report