Si está tratando de obtener su IP o los detalles de su red usando el comando ifconfig en Debian 10, encontrará el error 'ifconfig:comando no encontrado'.
-bash: ifconfig: command not found
El paquete ifconfig no está instalado por defecto en Debian. Es porque ifconfig está en desuso a favor del nuevo comando ip . Este comando ip ahora es responsable de modificar o mostrar enrutamiento, dispositivos de red, interfaces y túneles.
Si aún desea utilizar el antiguo comando ifconfig, deberá instalarlo explícitamente.
Instalando el comando ifconfig en Debian
Si intenta instalar el comando ifconfig directamente, su sistema Debian no encontrará este paquete.
[email protected]:~# apt install ifconfig
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ifconfig
Es porque ifconfig no es un paquete en sí mismo. Se instala con el paquete net-tools que tiene algunas herramientas de red adicionales.
Entonces, para obtener ifconfig, debe instalar un paquete de herramientas de red como este:
sudo apt install net-tools
Una vez instalado, utiliza el comando ifconfig:
[email protected]:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.124.55.175 netmask 255.255.255.0 broadcast 172.124.55.255
inet6 2400:8966::f03c:92ff:fe32:ffef prefixlen 64 scopeid 0x0<global>
inet6 fe80::f03c:99ff:fe32:ffef prefixlen 64 scopeid 0x20<link>
ether f2:3c:92:32:ff:df txqueuelen 1000 (Ethernet)
RX packets 1623 bytes 421318 (411.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 876 bytes 108871 (106.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Sin embargo, le recomiendo encarecidamente que comience a usar el comando IP. Tarde o temprano, las herramientas de red quedarán completamente obsoletas y no podrá instalarlas.