Ifconfig

ifconfig (short for "interface config") is a system administration utility in Unix-like operating systems for network interface configuration.
The utility is a command-line interface tool and is also used in the system startup scripts of many operating systems. It has features for configuring, controlling, and querying TCP/IP network interface parameters. Ifconfig originally appeared in 4.2BSD as part of the BSD TCP/IP suite.
Usage.
Common uses for ifconfig include setting the IP address and netmask of a network interface and disabling or enabling an interface. At boot time, many Unix-like operating systems initialize their network interfaces with shell scripts that call ifconfig. As an interactive tool, system administrators routinely use the utility to display and analyze network interface parameters. The following two examples show the output of the tool when querying the state of a single active interface each on a Linux-based host (interface eth0) and the ural0 interface on an OpenBSD installation.
Medium access control functions.
ifconfig is also commonly used to change the medium access control (MAC) address of an interface. In this process, the network interface is first disabled (set "down") with the ifconfig command, followed by a MAC change command:
 ifconfig wlan0 down
 ifconfig wlan0 hw ether 13:11:20:33:49:66
 ifconfig wlan0 up
Release status.
The Berkeley Software Distribution UNIX operating systems (e.g., NetBSD, OpenBSD, and FreeBSD) continue active development of ifconfig and extension of its functionality to cover the configuration of wireless networking interfaces, VLAN trunking, controlling hardware features such as TSO or hardware checksumming or setting up bridge and tunnel interfaces. Solaris has historically used ifconfig for all network interface configuration, but as of Solaris 10 introduced dladm to perform data-link (OSI model layer 2) configuration, reducing ifconfig's purview to IP configuration.
In older Linux distributions, ifconfig, in conjunction with the utility route, was used to connect a computer to a network, and to define routes between networks. ifconfig for Linux is part of the package "net-tools", released as the latest version 2.10 on 7 January 2021.
Many Linux distributions have deprecated the use of ifconfig and route in favor of the software suite iproute2, such as ArchLinux or RHEL since version 7, which has been available since 1999 for Linux 2.2. iproute2 includes support for all common functions of ifconfig(8), route(8), arp(8) and netstat(1). It also includes multicast configuration support, tunnel and virtual link management, traffic control, and low-level IPsec configuration, among other features.
Related tools.
Another higher-level Linux command line tool is ifup (including ifdown and ifquery). In addition to controlling the interfaces, it also provides control of other aspects of the network such as specifying the DNS servers to use. The command is configured using the file "/etc/network/interfaces", which contains "stanzas" for each interface.
Network Manager is a Linux daemon that automatically reconfigures the network in dynamic environments, such as moving between WiFi hotspots. It is usually used in conjunction with a graphical front-end such as GNOME Shell.
Versions of Microsoft Windows from Windows 95 to Windows Me used winipcfg to give a graphical display of current IP information. ipconfig, a command similar to ifconfig, comes with Microsoft operating-systems based on the Windows NT kernel. ipconfig also controls the Windows DHCP client.
In macOS, the ifconfig command functions as a wrapper to the IPConfiguration agent, and can control the BootP and DHCP clients from the command-line. Use of ifconfig to modify network settings in Mac OS X is discouraged, because ifconfig operates below the level of the system frameworks which help manage network configuration.
iwconfig, a component of Wireless tools for Linux, which took its name from ifconfig, manages wireless network interfaces outside the original scope of Linux's ifconfig. iwconfig sets such specialized settings as a wireless network's SSID and WEP keys, and functions in tandem with iwlist. Linux also features iwspy, to read the signal, noise and quality of a wireless connection.
Other related tools for configuring Ethernet adapters are: ethtool, mii-tool, and mii-diag in Linux and the command "dladm show-link" in Solaris.