GNU/Linux >> Tutoriels Linux >  >> Linux

Comment installer ifconfig sur Debian

Si vous essayez d'obtenir les détails de votre adresse IP ou de votre réseau à l'aide de la commande ifconfig dans Debian 10, vous rencontrerez l'erreur "ifconfig :commande introuvable".

-bash: ifconfig: command not found

Le paquet ifconfig n'est pas installé par défaut sur Debian. C'est parce que ifconfig est obsolète au profit de la nouvelle commande ip . Cette commande ip est désormais chargée de modifier ou d'afficher le routage, les périphériques réseau, les interfaces et les tunnels.

Si vous souhaitez toujours utiliser la bonne vieille commande ifconfig, vous devrez l'installer explicitement.

Installation de la commande ifconfig dans Debian

Si vous essayez d'installer directement la commande ifconfig, votre système Debian ne trouvera pas ce paquet.

[email protected]:~# apt install ifconfig
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package ifconfig

C'est parce que ifconfig n'est pas un paquet en soi. Il est installé avec le package net-tools qui contient des outils réseau supplémentaires.

Donc, pour obtenir ifconfig, vous devez installer le package net-tools comme ceci :

sudo apt install net-tools

Une fois installé, vous utilisez la commande 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

Cependant, je vous conseille fortement de commencer à utiliser la commande IP. Tôt ou tard, net-tools sera complètement obsolète et vous ne pourrez plus l'installer.


Linux
  1. Comment installer R sur Debian 9

  2. Comment installer R sur Debian 10

  3. Comment installer Nextcloud sur Debian 11

  4. Comment installer PrestaShop sur Debian 9

  5. Comment installer Java 17 dans Debian 11

Comment installer PowerShell sur Debian 11 Bullseye

Comment installer VSCodium sur Debian 11 Bullseye

Comment installer Go sur Debian 10

Comment installer Tomcat 9 sur Debian 11

Comment installer Apache sur Debian 11

Comment installer Go sur Debian