Ubuntu ipconfig

What is ipconfig?

ipconfig stands for "Internet Protocol Configuration". It is a program of console application of a few computer OSes that shows every current value of TCP/IP network configuration and refreshes DNS (Domain Name System) and DHCP (Dynamic Host Configuration Protocol) settings. The ipconfig command shows IPv4 (Internet Protocol version 4) and IPv6 addresses, the default gateway for every adapter, and the subnet mask if applied without parameters.

Implementations of ipconfig

The command is present in Apple macOS, ReactOS, and Microsoft Windows. The ReactOS release was developed upon the GPL license by Ged Murphy.

Apple macOS

In Mac OS X, ipconfig serves as a cover to the IPConfiguration agent and could be used for controlling the DHCP and Bootstrap Protocol client through the command-line interface. Also, Mac OS X applies ifconfig for direct control on network interfaces like configuring static IP addresses like almost all Unix-based OSes. In Linux, the command, i.e., ifconfig has been substituted by the IP command.

Microsoft Windows and ReactOS

The command, i.e., ipconfig supports the /all command-line switch. This outcome is more comprehensive information as compared to ipconfig alone.

The ipconfig command contains an additional important feature where it forces refreshing the host computer's DHCP IP address to request a distinct IP address. It is done with two different commands in order. The first command is ipconfig /release which runs for forcing the client to immediately stop its lease by transferring the server a release notification of DHCP which updates the status information of the server and marks the IP address of an old client as "available".

The second command is ipconfig /renew which runs for requesting a fresh IP address. In which a system is linked to a DSL modem or cable, it may need to be directly plugged into the modem network port for bypassing the router, before turning off the power and using ipconfig /release for a period, to make sure that the previous IP address is taken by other computers.

The parameter, i.e., /flushdns can be used for clearing the DNS (Domain Name System) cache for ensuring future requests apply new DNS information by pushing hostnames to be fixed from scratch again.

Parameters of ipconfig

Some parameters of the ipconfig command are listed and mentioned below:

S. No.ParameterDescription
1./allIt shows the complete TCP/IP configuration for every adapter. An adapter can indicate physical interfaces logical interfaces (dial-up connections) or installed network adapters.
2./flushdnsIt flushes and reloads the information of the DNS client resolver cache. We can apply this procedure for discarding negative cache entries through the cache and other entries that dynamically have been added at the time of DNS troubleshooting.
3./displaydnsIt shows the subject of the DNS client resolver cache that contains both entries preloaded through the local Hosts file and recently accessed resource logs for name queries fixed by the system. The client service of DNS applies this information for resolving frequently queried names before querying its DNS servers.
4./renew [<adapter>]It refreshes the DHCP configuration for every adapter or a particular adapter if the parameter, i.e., adapter is added. This parameter is only available on systems with adapters that are built to automatically get an IP address. We need to enter the adapter name that occurs when we use the ipconfig command without parameters for specifying an adapter name.
5./release [<adapter>]It sends a message, i.e., DHCPRELEASE to the DHCP server to publish the ongoing DHCP configuration and eliminate the configuration of the IP address for either every adapter or for a particular adapter if the parameter, i.e., adapter is included.
This parameter immobilizes TCP/IP for configured adapters to automatically get an IP address. We need to enter the adapter name that occurs when we use the ipconfig command without parameters for specifying an adapter name.
6./registerdnsIt manually initiates dynamic registration for the IP addresses and DNS names that are configured in a system. We can apply this parameter for troubleshooting an unsuccessful DNS name registration or fix a dynamic update issue between the DNS server and a client without restarting the client system. In the advanced properties, the DNS settings of the TCP/IP protocol decide which names are certified in DNS.
7./?It shows the Help option at the command prompt.
8./release6 [<adapter>]It sends a message, i.e., DHCPRELEASE to the DHCPv6 server to publish the ongoing DHCP configuration and eliminate the configuration of the IPv6 address for either every adapter or for a particular adapter if the parameter, i.e., adapter is included.
This parameter immobilizes TCP/IP for configured adapters to automatically get an IP address. We need to enter the adapter name that occurs when we use the ipconfig command without parameters for specifying an adapter name.
9./renew6 [<adapter>]It refreshes the DHCPv6 configuration for every adapter or for a particular adapter if the parameter, i.e., adapter is added. This parameter is only available on systems with adapters that are built to automatically get an IPv6 address. We need to enter the adapter name that occurs when we use the ipconfig command without parameters for specifying an adapter name.
10./setclassid <adapter> [<classID>]It configures the class ID of DHCP for a described adaptor. We can use the asterisk wildcard character (*) for setting the class ID of DHCP for every adaptor in place of adaptor. It is only available on systems with adaptor that are already configured to automatically get an IP address. The ongoing class ID is deleted if a class ID of DHCP is not specified.
11./showclassid <adapter>It shows the class ID of DHCP for a described adaptor. We can use the asterisk wildcard character (*) for seeing the class ID of DHCP for every adaptor in place of adaptor. It is only available on systems with adaptor that are already configured to automatically get an IP address.

How to apply ipconfig and options?

ipconfig is used for displaying details of our network configuration and refreshing the DNS and DHCP settings. The ipconfig command by default shows our IP address, default gateway, and subnet mask but we can get several details using this command with correct parameters.

So, let's begin with something easier:

  • First of all, we need to open our terminal window by searching "Terminal" in the application window.
  • Then, we need to enter the ipconfig command and press the enter

Ubuntu ipconfig
  • It will display us the basic information of our network from our network adapters.
  • The command will return details about all network adapters on our system as we can see in the above screenshot. We have the Ethernet adaptor and a wireless network adaptor in this case.
  • Also, it will be listed as any network adaptor if we are utilizing a VPN client.

ipconfig /all

The command displays only the basic information of our network without using any parameter. But information about the DHCP and DNS servers is not shown by default. To display every detail of our network adaptor, we will need to enter the parameter, i.e., /all.


Ubuntu ipconfig

The above command will return the below information for all network adaptors in our device:

  • Physical Address
    It is the Mac address of our network adaptor.
  • IPv4 Address
    It displays the IP address of our system.
  • DHCP Enabled
    It represents if the network connection is utilizing a static or DHCP IP address.
  • DHCP Server
    It represents a router/server that hands out many IP addresses in our network.
  • Default Gateway
    It represents the router to which our system is connected.
  • DNS Servers
    It represents the servers that are used for translating domain names into IP addresses.
  • Link-Local IPv6 Address
    It displays the IPv6 address of our system.
  • Lease Obtained
    It shows the date-time when our system got the IP address.

The command, i.e., ipconfig /all is often used for troubleshooting network connectivity issues. If we properly check out the outcomes of the ipconfig /all command, we can see 4 items that are essential and mentioned below:

  • IPv4 Address
    It is our IP address.
  • DHCP Enabled
    In most cases, it requires to be Yes. 'No' means that we have entered the IP address manually.
  • DNS servers
    It is used for translating domain names into IP addresses.
  • Default Gateway
    It represents the modem or router to which our network package is sent.

ipconfig /release

The ipconfig command does not only display our information about our network settings, but it can also be used for resetting or refreshing our network settings. We can claim a new IP address through the DHCP server when we have enabled DHCP on our network card.

The initial step to do it is to publish the current IP address. It means that we will alert the DHCP server that we do not no longer wish to apply the assigned IP address.


Ubuntu ipconfig

The above command will by default publish the IP Addresses for every network adapter. Also, we can specify an individual network adapter. To do so, we will need to type the adapter name that we find here inside the ipconfig results.

For example, if we wish to publish only the IP address of our wireless network adaptor, we can enter the following command:

It will publish the IP address of every adaptor in which the name begins with "Wireless".

ipconfig /renew

After we have published the IP address, we will need to claim a fresh one through the DHCP server. By using the command, i.e., ipconfig /renew, we can do it:


Ubuntu ipconfig

We will find a similar result as ipconfig command, gateway, subnet mask, and an overview of our new IP address when the renew command was successfully run.

We can again specify an individual network adaptor by providing the adaptor name.

ipconfig /displaydns

Our computer stores a local cache of every DNS record that it has visited. This cache is used for quickly translating the domain names into the correct IP address. In this way, our computer does not need to every time negotiate with the DNS server. For example, when we visit Google.com.

We can run the following command in the terminal window for viewing the DNS cache content:


Ubuntu ipconfig

It will display all DNS records in our DNS cache.

Often, we do not need to check the records, but we will discuss some important terms:

  • Records Type: In this term, the number represents if it is an A (1) record.
  • Record Name: The name of the DNS of the records.
  • Time to Live: It displays the time in secs that the records are accurate. The records are then purged.
  • Section: It can be Additional or Answer. The latter is related to answers that our computer didn't ask but is provided anyway via the DNS server.
  • Date Length: In our memory, it shows the length of the records in bytes.
  • Record: It indicates the actual record value.

Flush DNS

Sometimes, our DNS cache includes outdated records which can give DNS-related errors (for example unable to reach websites), we can solve it by applying the command which is mentioned as follows:


Ubuntu ipconfig

The above command will clear out our DNS cache. We can do it without any risk, our computer will simply claim an up-to-date and new DNS record through the DNS servers.

ipconfig on Ubuntu

The ifconfig command is equivalent to the ipconfig command. The ifconfig command will display us the basic information of the network of our adapters in Ubuntu.

The command is as follows:


Ubuntu ipconfig
Next TopicUbuntu Packages




Latest Courses