Error “ifconfig: command not found” Debian 9

The command ifconfig is used in operating systems on Linux network configuration or view information about it. Debian 9 she also previously was present, but later it was decided to replace this tool with others that are more suitable for this procedure utilities. However, now nothing prevents you to return this command to the system and continue to use it, you need only carry out the procedure of a conventional installation of this component.

Fix the error “ifconfig: command not found”

If when you try to activate command in the”Terminal” you encounter the error “ifconfig: command not found”, then the software responsible for this command was missing from the system. Today we would like to show not only a way to fix this problem, but to talk about a new alternative that replaces ifconfig. Let’s start with the step-by-step analysis of the first method.

Method 1: add the ifconfig utility

Those users who used to use this command, this method will seem optimal. The tool ifconfig was not removed at all, he’s just missing in a standard application set, you can add it by following these instructions:

  • For a start, we encourage you to make sure that ifconfig is not available. Run classic terminal any convenient option.
  • Give permanent root access by writing to su -.
  • Enter the password from root access and wait for the emergence of a new line of input.
  • Here just type ifconfig and press Enter.
  • If you still receive the notification about the lack of teams in the system, set the component set net-toolsby typing apt install net-tools.
  • Wait for it to complete add and configure new libraries.
  • When the installation is re-run ifconfigto make sure the success of the operation.
  • Find out more information about the rules used by the utilities will help line ifconfig --help.
  • Now you are familiar with method of repayment of earlier standard tools in Debian OS 9. However, it is understood that she replaced with a more convenient tool, which makes sense to deal with him and leave old habits.

    Method 2: using the command ip

    There are a number of reasons, the command ifconfig was replaced by ip in the standard OS on the Linux kernel. First, it is not allowed to configure the system of traffic control did not work correctly with some devices did not show their hardware address and is not allowed to generate a network device TUN/TAP. All these flaws were corrected and refined, but are already included in the functionality of the ip. For example, to view basic information on the interface by entering the ip a.

    The results in the”Terminal” after activating the command above will match that which would be shown in ifconfig, but with some additional data. For more information on the IPv4 Protocol are obtained through ip -4 a, and the IPv6 ip -6 a. Still has the ability to obtain data for a specific interface, this is entered ip a show wlan0, and the list of working interfaces is displayed after ip link ls up.

    One of the main tasks when setting up a network has always been considered the procedure of assigning a specific local address to a specific interface. Using the old utility seemed the input line like this: ifconfig eth0 192.168.1.101, but in the new version the user will need to enter ip a add 192.168.1.101/255.255.255.0 dev eth0, be sure to specify the subnet mask. Attention should be paid and the possible reduction to a ip add 192.168.1.101/24 dev eth0.

    If the need for assigning interface IP addresses have disappeared, the chain easily enough removed. You just need to specify the ip a del 192.168.1.101/24 eth0, and if necessary, cleaning the whole list of relationships it is better to use directly the ip -s-s a f to 192.168.1.0/24.

    Team ip also controls the routing tables. The routing table is called a list of network paths that are designed to determine the best forwarding path of a network packet. Read all available tables allows string ip r.

    In situations when you want to manually redirect traffic, Cycling is also better team ip with defined arguments. Then the string will find, for example ip route add 192.168.5.0/24 dev eth0. The set route also can be easily removed using the ip route del 192.168.5.0/24 dev eth0.

    Thanks to the two above ways you now know how you can not only restore the command ifconfig in the operating system Debian 9, but what is a worthy alternative to this outdated utility. Whether to use a new tool or go back to the old one is up to you.

    Source: lumpics.ru

    (Visited 180 times, 1 visits today)