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
1 | ip -c link show |
With any luck, this should be enough. You’ll get something that looks like this:
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:
1 | sudo lshw -class network -short |
The output from this will look similar to this:
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:
1 2 3 4 5 | ip -br -c link show ifconfig -a ip a ip addr ip link show |
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.