How To: Show Your Network Interfaces

Today’s article will be fairly simple, where we learn a couple of ways how to show your network interfaces. It won’t be a very long article, nor will it be all that complicated. Like almost always, today’s article will involve the terminal. So, if you want to learn how to show your network interfaces, read on!

A network interface is what’s used to connect your computer to a network. Depending on your configuration, you may have both real and virtual network interfaces. The real network interfaces will be things like your ethernet (the wired connection to the network) and a wireless device (a radio-controlled network interface).

There are times when you’ll want to know your network interface, be it for debugging or monitoring. For example, you’ll probably want to know about your network interfaces if you’re playing around with VNStat.

We’ve probably touched on this subject in a few articles. However, we might as well have an article specifically answering the question of how to show your network interfaces. Well, then, that’s what this article will cover.

Show Your Network Interfaces:

As mentioned in the intro, we’re going to be using the terminal. If you’re a regular reader, you’re probably used to it and a little tired of the same old text. Not all my readers are going to be as proficient, so they should know that they can just press CTRL + ALT + T and your default terminal should open.

With your terminal now open, your next step mostly depends on your chosen distro and the age of the default installed tools. If you’re using an older distro, you can go with this command:

If you’re using a distro with more current tools, you will likely find that ‘ifconfig’ has been deprecated, that is no longer current and in use. For you folks, you’ll need a slightly longer command:

So, if you want to show your network interfaces, one of those two commands will likely get you there. You should check the information carefully, to make sure you’re using the correct information, such as when you want to use a network interface name for another command.

Closure:

There you have it… You have another article! This time, we’ve decided to spend some time learning how to show your network interfaces. It’s nothing complicated, but it’s still useful information. It is indeed a fairly short and simple article, but that means newer users can follow along – which is a good thing. I’m sure there are other ways to gather this information, but one of those two commands should do the trick!

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Find Your Network Interface Name

There are all sorts of reasons why you might want to know your network interface name. It comes in handy with things like ‘vnstat‘, for example. In fact, I wrote an article about changing the network interface name. (There’s sometimes a reason why I write articles in the order I write ’em!)

Like I said, you may want to know this information for other purposes. In your general day-to-day computing, the network interface name is entirely unimportant. As you’ve seen from previous articles, it may come to pass that you need to know the name and this article will explain how to find that.

Anyhow, this one is quick and easy. I’m just going to show you some easy ways to find your network interface name. This should be pretty brief and simple enough.

Your Network Interface Name:

Like oh so many articles, this too requires an open terminal. Sure, there are GUI methods to find your network interface name, but we might as well do it in the terminal. So, use your keyboard and press CTRL + ALT + T. With your terminal open, you can start with:

With any luck, this should be enough. You’ll get something that looks like this:

network interface name
See the handy arrow? That’ll help! That’s the network interface that’s up and connected.

As you can see by the arrow, that’ll clue you into which connection is in use at the time. If that doesn’t work, you can also try this command:

The output from this will look similar to this:

lshw showing network interface names
A keen eye will note that there are multiple devices listed!

As you can see, that’s from a different device with a different operating system. It also relies on ‘lshw’ which you may or may not have access to.

You can also try:

Some of those commands will show the ‘lo’ connection, which is just a loopback connection and immaterial for this purpose. You can safely ignore that.

Anyhow, those will show you your network interface names. If you have more than one, it’ll happily show them all – and give you a clue as to which one is up. If you have both connected, say wireless and wired, then it will say both are up. This information isn’t very useful by itself, but it is useful for other purposes.

There are other ways, so feel free to leave a comment showing how you find your network interface name.

Closure:

See? I told you this one would be quick and easy. There’s not much to it, but it’s a useful bit of information to know and now you know that this is how you find your network interface name. It’s not much of an article, but it’s yet another in what’s hopefully a long list of ’em! They can’t all be huge pieces!

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

‘traceroute’ in Linux, Let’s Take a Closer Look!

This article will explain a little about ‘traceroute’ as a network diagnostic application. We’ll give a few traceroute examples, enabling you to figure out some networking issues.

Whenever I find myself unable to connect to a networked device, including websites online via the internet, one of the first tools I reach for is called ‘traceroute’. It’s not exclusive to Linux and you may know of the tool ‘tracert’ in Windows that does the same thing.

traceroute defines itself as this:

traceroute – print the route packets trace to network host

More realistically, it shows you the hops (devices) you go through in order to make a connection. See, when you connect to a different computer over the network, you don’t generally do so without going through other devices. Your data will travel through multiple devices to reach the source device and all those hops along the way are potential points of failure.

Sometimes those devices are under your control and you can actually do something about it. Other times, it’s just informative and all you can do is wait, or inform someone else and hope they fix it. If nothing else, you’ll know where your packets stopped or slowed down to the point of uselessness.

For example, there 13 hops (devices) between me and linux-tips.us.

traceroute in action
See? There are 13 hops to reach my destination. 

So, while that picture should explain it well enough, let’s get a little deeper.

Using traceroute:

You may find that traceroute isn’t already installed. If it isn’t, it’s absolutely in your default repositories. However you would normally install software is how you install this. If you look, traceroute is sure to be in there. So, go ahead and install it if it’s not already installed. For example:

Just adjust that to your package management system and it’ll be in there. It’s that important a tool that I’m sure it’s in there. In fact, I’m a bit surprised that it’s not always installed by default, but it isn’t.

Now, the most basic usage is just like you saw in the image above.

So long as you’re within 30 hops and use 60 or fewer packets, that’s going to work well enough. The information it spits out is what devices it has traveled through (their hostname and IP address) and RTT – Round Trip Times. There are three of them because three packets are sent. Ideally, you’ll see your destination listed last. If not, you’ll see the closest you got to your destination.

If you see an asterisk, that means the device didn’t respond as expected. Frequently, this means the device is blocking ICMP. You can try to get around this by using ICMP ECHO (-I) or TCP (-T) packets. However, both of those will require elevated permissions, or the use of sudo.

All of this is mostly informative – unless you’re in control of the network and devices.

When it’s a network and devices under your control, you can use this information to troubleshoot. You can see the device names and time taken for packet transit, narrowing down your choices for troubleshooting.

When you’re using this over the public internet, you’re subject to other people who control the devices. If you find a break along the way, about all you can do is wait – or maybe use the data to contact your ISP (or hosting provider, if it’s your site that you’re trying to reach).

There are other options with traceroute. You can change the port you use, you can send more or fewer packets, you can not resolve hostnames, and more. To see the rest of the traceroute options:

That will fill you in with the many other choices you have. I find I don’t really need the advanced options, but system admins may need some of the features. As a regular user, I just use it to troubleshoot my own connections on my private network or when I am having web hosting/connectivity issues.

Closure:

And there you have it. Another article is in the books, and this time it’s just a nice easy article about the venerable traceroute. If you don’t already have this tool in your toolbox, it’d be worth adding and adding a basic familiarity to your mental toolbox.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Rename Your Network Adapters in Ubuntu

For whimsy, or for whatever reasons you dream up, you may want to rename your network adapters in Linux. Well, you can. This article will explain how to rename your network adapters, from perhaps eth0 to whatever you want.

I can only be certain that this works in current Ubuntu LTS – 20.04, I didn’t test with any other distros. It’s pretty safe to assume that it will work with most distros out there.

Notably, I am just pulling this from my notes. I forgot why this is in my notes and I really can’t think of too many reasons why you’d need to rename your network adapters. Still, there’s at least one person who needed to know this information, else it’d probably have not been in my notes. It’ll almost certainly work with Debian, Mint, Pop!_OS, and others in that family of operating systems.

This article should be fairly short and will suggest the use of ‘inxi‘. As this article is based around Ubuntu, you can go ahead and install it with:

It’s a lightweight application that spits out a ton of information. I think it should be installed by default, but not all distros do. If you’re trying this with a non-Ubuntu distro, and one without apt, just adjust the installation method for your package management system. It’s almost certainly in your default repositories.

Rename Your Network Adapters:

The first thing you’re going to need to do is open your terminal. If you just installed inxi, you may well have your terminal already open. If not, you can open it with your keyboard. Just press CTRL + ALT + T and it should pop right open.

Once you have the terminal open, we’re going to use ‘inxi’ to get some information. The command you’re looking for is:

Specifically, you’re looking for the networking section. It should look a little something like this picture:

network information
Note the arrows. You need those two pieces of information.

You’re looking for the name of the adapter and the MAC address. You’ll want both of those bits of information, so you might as well keep that terminal open and open up another one. That’ll be easiest, as you can then just copy and paste the data in the next step.

Now, you need to create and edit a file. We can more or less do this with a single step. In the 2nd terminal, use this command:

Once that is open, you want to add some text to it. This is the template:

Now, to use that template, you insert the MAC address that you got from the inxi command where you see <mac_address>.

The <device_name> is a bit more tricky. It’s usually the first three letters – and don’t forget to leave the asterisk there. So, if you use my image above, you’ll see it’s wlo1. To change it, you’d just use ‘wlo*’. If it’s ‘eth0’ for your network adapter then you’d change it to ‘eth*’ being careful in all instances to keep the asterisk.

The last field to change is the name. You can stick anything you want in that field. So, for me, the command will look like this:

Yes, yes I really did name it booger. I’m pretty much a giant five year old.

When you’re done, save it. Just press CTRL + X, then Y, and then ENTER to save it with nano. As it’s creating a new file, it may ask if you want to create said file and you should (of course) say yes.

That’s it! Just reboot and you should see that you managed to successfully rename your network adapter. If it doesn’t work, double-check to make sure you got the device name and MAC address correct and reboot again. Done successfully, it looks like this:

renamed network adapter
Yes, yes I really did name it ‘booger’ – but only in a virtual machine.

See? It works!

Closure:

Again, I’ve only tested it in Ubuntu – so it’ll likely work with any Ubuntu derivative, should work for Debian, and will probably work with any other mainstream distro. I forget why it was in my notes, but I’m sure it was useful for someone. Maybe they just needed a name they could recall a bit easier, perhaps for their wireless connection and they wanted to connect to it in the terminal instead of keeping it always connected? I dunno… It was in my notes, it’s now online.

Either way, there’s another article. Thanks for reading! If you want to help, you can donate, register, write an article, or buy cheap hosting. When you scroll down, you can comment, vote for the article, or sign up for the newsletter. Should you sign up for the newsletter, I won’t share your information with anyone else and I won’t send you any spam.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.