ifconfig Command Does Not Show IPv4 Address on Linux

ifconfig command does not show IP address on my Linux based laptop computer. How do I fix this problem?

You need to configure your networking. Here are some tips to solve this problem under Linux operating system.

Find out if network interface such as eth0/wlan0 detected or not…

Is your network card detected by Linux? Run the ifconfig command or ip command and make sure you can see eth0 or wlan0 or actual interface on Linux:
ip a show
Also run the lspci command to list your current wireless and Ethernet devices using the egrep command/grep command or more command as filter:
lspci | more
lspci | egrep -i 'eth|wifi|wireless'

ifconfig Command Does Not Show IPv4 Address on Linux

Click to enlarge image

If you do not see your wifi/network card, you need to install the network card driver.

ifconfig Command Does Not Show IPv4 Address on Linux for wifi

You need to connect wifi. Here are some steps for connecting to a wireless network on Linux:

  1. Open the system menu from the right side of the top bar.
  2. Select Wi-Fi Not Connected. The Wi-Fi section of the menu will expand.
  3. Click Select Network.
  4. Click the name of the network you want, then click Connect.
  5. If the name of the network is not in the list, try clicking More to see if the network is further down the list. If you still do not see the network, you may be out of range, or the network might be hidden.
  6. If the network is protected by a password (encryption key), enter the password when prompted and click Connect.
  7. If you do not know the key, you may have to ask the person who administers the wireless network.
  8. The network icon will change appearance as the computer attempts to connect to the network.
  9. If the connection is successful, the icon will change to a dot with several curved bars above it. More bars indicate a stronger connection to the network. Fewer bars mean the connection is weaker and might not be very reliable.
Linux wifi networking connection info

GUI Tools

Networking on Linux can be painful, especially in comparison to other operating systems. You can use NetworkManager to configure your wireless or ethernet cards. NetworkManager is configured through graphical interfaces, which are available for GNOME and KDE.

How Do I Use NetworkManager?

You will see applet (computer icon) in the notification area / system tray. Left-click this icon to present the nm-applet pop-up menu. You can see neighboring wireless networks with a broadcasted SSID. You can right click and edit the settings.

A note about the Internet connection…

Is your Internet connection working? Most router will give you an IP address when connected to the Internet via DHCP server. Make sure eth0 or wlan is configured to obtain address automatically using DHCP.

Linux Network Setting Wireless To Auto DHCP

Fig.01: DHCP settings

Another option is to set IP address manually:

Linux GUI Networking Setting IP Address / Netmask / Gateway Manually

Fig.02: IPv4 manual settings

Connect to a wired (Ethernet) network

To set up most wired network connections, all you need to do is plug in a network cable. The wired network icon is displayed on the top bar with three dots while the connection is being established. The dots disappear when you are connected.

If this does not happen, you should first of all make sure that your network cable is plugged in. One end of the cable should be plugged into the rectangular Ethernet (network) port on your computer, and the other end should be plugged into a switch, router, network wall socket or similar (depending on the network setup you have). Sometimes, a light beside the Ethernet port will indicate that it is plugged in and active.

How do I configure networking manually?

See the following tutorial for more information:

  1. Debian Linux Configure Network Interface Cards IP address and Netmasks
  2. RHEL / Red Hat / CentOS Linux Network Configuration

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 3 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
3 comments… add one
  • venkatesh Nov 23, 2013 @ 6:56

    my static ipv4 address is not showing on etho but it is showing on ifconfig… what is the issue…

  • Devin May 7, 2014 @ 22:05

    hello i m devin i have wired broadband internet connection so can i use backtrack
    if yes what r the possible configuration i have to make .Please send the answer on my email

  • Ted Jul 7, 2015 @ 20:56

    How do you solve this for Windows 7 ?

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum