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

How to solve the problem of ifconfig without output

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces "how to solve ifconfig without output". In daily operation, I believe many people have doubts about how to solve ifconfig without output. Xiaobian consulted all kinds of information and sorted out simple and easy operation methods. I hope to help you answer the doubts of "ifconfig without output"! Next, please follow the small series to learn together!

Linux ifconfig command is used to display or set network devices, ifconfig can set the status of network devices, or display the current settings, there are some small partners in the use of ifconfig command encountered no input situation.

problem

Executing ifconfig command without any errors and without any output messages

[root@linuxprobe ~]# ifconfig[root@linuxprobe ~]#Mistake 1. Check PATH variable [root@linuxprobe ~]# echo $PATH/usr/local/bin: /usr/local/sbin: /usr/sbin:/bin:/sbin:/root/bin

If the path/sbin is not in the PATH variable, execute the following command to add it.

export PATH=$PATH:/sbin

Note: PATH variable is normal in this example

2. Check/sbin/ifconfig

Under normal circumstances, if ifconfig is displayed, but there is no information about a certain item (such as not identifying the network card), you can first check whether the configuration file under/etc/sysconfig/network-scripts/is correct. However, in this case, since the execution of ifconfig and/sbin/ifconfig does not produce any output, the following/sbin/ifconfig file is checked first. The following errors were found:

[root@linuxprobe ~]# ls -la /sbin/ifconfig-rwxr-xr-x 1 root root 0 Apr 5 14:56 /sbin/ifconfig[root@linuxprobe ~]# file /sbin/ifconfig/sbin/ifconfig: empty3. solution

copy a copy of/sbin/ifconfig to this machine from another machine on the local area network using the scp command

[root@yezi ~]# scp /sbin/ifconfig root@192.168.10.10:/sbinThe authenticity of host '192.168.10.10 (192.168.10.10)' can't be established.ECDSA key fingerprint is b2:e4:20:20:ae:ae:2e:20:ce:49:76:05:bd:c4:42:39.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added '192.168.10.10' (ECDSA) to the list of known hosts.root@192.168.10.10's password:ifconfig 100% 80KB 80.1KB/s 00:00

If you run ifconfig again, you can display it normally.

[root@linuxprobe ~]# file /sbin/ifconfig/sbin/ifconfig: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x64131021c4fd2c38cf37a9ed9a20bdc52e9bdf33, stripped[root@linuxprobe ~]# ls -al /sbin/ifconfig-rwxr-xr-x. 1 root root 81976 Feb 14 2014 /sbin/ifconfig[root@linuxprobe ~]# ifconfigeno16777736: flags=4163 mtu 1500 inet 192.168.10.10 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::20c:29ff:fe97:5c27 prefixlen 64 scopeid 0x20 ether 00:0c:29:97:5c:27 txqueuelen 1000 (Ethernet) RX packets 153 bytes 16477 (16.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 166 bytes 144357 (140.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 0 (Local Loopback) RX packets 1431 bytes 114546 (111.8 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1431 bytes 114546 (111.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 Here, the study of "ifconfig has no output how to solve" is over, I hope to solve everyone's doubts Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

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