ifconfig: see and make changes to network interfaces

Ifconfig allows us to make changes to our connection to the network through Linux. Today, we are going to show you how to list network interfaces on your computer and make changes to them.


At this point, you will need to have a basic understanding of networking concepts such as IP subnets and addresses. From here, we are going to execute this command to bring up all available interfaces:

sudo ifconfig

There are 2 network interfaces listed. Depending on how many are physically available on your computer, more will appear pre-configured. The lo interface refers to the local loopback interface within the Linux system. Traffic between software on the local system goes through here.

Also, not all interface naming schemes are the same, as they’re dependent on the manufacturer. You may find one adapter with the name eth0 or another with ens33(as pictured above).

Now we are going to change the address of our network interface. To do so, type:

sudo ifconfig ens33 netmask broadcast

You will want to substitute the ens33 with the name of your active network interface. The will be the new IP address identified on the network. Netmask should correlate to the /24 subnet that we are currently using which translates to The broadcast address should also be

Note: If your network uses a different subnet/addresses such as or, then configure your network interface accordingly.

Run ifconfig again to see your interfaces. They have been changed according to the command that was executed earlier.


Try to ping to check for connectivity:

sudo ping

There may not be any internet connectivity. That’s because the route to your network has been wiped from your Linux system. They will need to be added again, but to reflect the changes made to your network interface. In most cases it is the same as before.

Run the following commands:

sudo ip route add dev ens33 && sudo ip route add default via dev ens33

We are now using the ip program to add new routes to the network. First, we need to tell Linux to route all traffic to our LAN via Next, we want all traffic(including internet) to be routed through our router at Again, if your addresses are different then adjust accordingly.

Ping once more. It should now be working.

Do note that the changes applied through ifconfig are temporary and will be overwritten by either running ifconfig ens33 up && ifconfig ens33 down or on next reboot. You will need to make permanent changes through your Linux distribution’s network configuration file.

10 thoughts on “ifconfig: see and make changes to network interfaces”

  1. Pingback: sealine-products.no

  2. Pingback: golden teacher mushroom house sweatshirt,

  3. Pingback: semenax

  4. Pingback: mysbobet

  5. Pingback: qiuqiu99 link

  6. Pingback: ข่าวกีฬา

  7. Pingback: lawyer phuket

  8. Pingback: Hunter898

  9. Pingback: fryd carts for sale

  10. Pingback: click for info

Comments are closed.