Skip to content

How do I find ipconfig in Linux

5 February 2024
How to find ipconfig in linux

In Linux, the ipconfig command is not available. Instead, you can use the ifconfig command to display network interface configuration information. However, the ifconfig command has been deprecated on many Linux distributions in favor of the ip command, which provides more features and is more powerful.

To view network interface information using ifconfig, you can simply open a terminal and type:

ifconfig

If ifconfig is not installed or deprecated on your system, you can use the ip command instead:

ip addr show

This command will display similar information to ifconfig, showing the IP addresses and network interfaces on your system.

Using hostname command: To simply view the IP address of your machine, you can use the hostname command with the -I option. This command displays all assigned IP addresses of the local host:

hostname -I

These commands should help you gather network configuration information in Linux. Depending on your distribution and system configuration, you may need administrative privileges (sudo) to run some of these commands.

Understanding the Output:

Regardless of whether you use ifconfig or ip, the output will contain information about your network interfaces, including:

  • Interface Name (eth0, wlan0, etc.): Identifies the network interface.
  • IPv4 and IPv6 Addresses: Displays the assigned IP addresses for communication.
  • MAC Address: Shows the hardware address of the network interface.
  • RX and TX: Indicates the amount of data received (RX) and transmitted (TX) through the interface.

Choose the method that suits your preferences or the specific requirements of your Linux distribution. While ifconfig remains available on many systems, the ip command is recommended for its richer feature set and is considered the modern replacement.