Check Your NIC Speed In The Terminal

Today’s exercise is a nice and simple exercise where we check your NIC speed in the terminal. Anyone can do this, but it’s less useful for you if you don’t use a NIC and rely on wireless. If you’re using a wireless controller, this isn’t the article for you.

I’ll make this article short.

What is a NIC?

computer NIC
An example of what a NIC might look like.

NIC stands for Network Interface Card and is how you connect to a wired internet connection. They come in various speeds with gigabit being a fairly common speed these days. There are a number of reasons to use a wired connection, including security and maximum speeds.

The tool we’ll be using is ‘ethtool’. We will also use the ‘ip’ command. If you don’t have ethtool available immediately, you must install it. The ‘ip’ command works by default (unless your system is rather old).

ethtool:

As I said, if you don’t have ethtool you’ll need to install it. I just checked a couple of distros and it appears to be a fairly common application, installed by default. If you check the man page, you’ll see this:

ethtool – query or control network driver and hardware settings

So, if we want to check your NIC speed in the terminal this is a good tool for the job. We will use another command along the way…

ip:

There’s another command we’ll be using. This will be available by default in a modern system. This is, of course, the ‘ip’ command. We’ll just use the ip command to identify our NIC. If you check the man page, you’ll see this:

ip – show / manipulate routing, network devices, interfaces and tunnels

That’s exactly what we need to do! So, this is the correct tool for identifying your NIC. You used to be able to just assume that it was eth0 but those days are no more. Now it’s a longer string of characters.

Check Your NIC Speed:

As mentioned above, this is a terminal-based article. You’ll need an open terminal, of course. You can usually press CTRL + ALT + T and your default terminal will open. Try that before checking in your application menu. It’s not quite a standard but it’s pretty common.

With your terminal open, we first identify our NIC. In this case, we’ll use the following command to show our network devices:

From there, find your NIC’s name. It’s probably going to start with enp and then be followed by some letters and numbers. Mine is enp0s31f6 for example. 

You then take that information and use it with the ethtool command. This command requires elevated permissions, so we’ll be using sudo. The syntax is as follows:

Then, you’re looking for ‘Speed:’, which will tell you the currently connected speed. There’s additional information that will tell you things like supported speeds, but this section tells you the current speed. 

I suppose you could use grep for this…

Or, using my case as an example:

Which looks like this:

That’s it. That’s all you need to know for this article…

Closure:

Well, if you ever need to know your NIC’s speed you can refer back to this article. I don’t expect you’ll need to check your NIC speed often enough to commit this one to memory, though it is relatively short and easy. If you don’t remember it, you’ll know where to find it. There’s that…

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

A Couple More Ways To Find Your Network Interfaces

Today’s article is mostly just for fun, as we examine a couple more ways to find your network interfaces! I’ve shown you a variety of ways at this point, but this is Linux. If you just want to have some fun finding your network interfaces, read on – ’cause this article is meant for those who like to travel a different path!

One of the things that make Linux so awesome is the myriad choices we have. There are so many different ways to accomplish the same goal. In fact, we sometimes get defensive about ‘our way’ of accomplishing things. It can make for some amusing (and sometimes a bit heated) discussions. 

Anyhow, I’ve covered this before. I’ve even covered it recently, which is why this is still fresh in my memory. You can start with this article if you want:

How To: Show Your Network Interfaces

Just to touch on it, a network interface is a device that your computer uses to communicate over the network. In most folks’ cases, you’ll locally use your network interface to connect to the Internet, perhaps first to your router or modem. These networking devices have names.

It’s important to be able to point to a specific networking interface, which is why they have names. If you want to issue commands, you want to send them to the right networking interface. If you want to monitor a connection, you need to know the correct name for the network interface.

So, these network interfaces have names. These names should be unique in your system, meaning you shouldn’t have more than one device per name. The names should not be shared among the devices and each working networking interface should have a name of its own.

If you want to know the network interface names, this article’s for you…

Find Your Network Interfaces Continued:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal now open, we’re going to show you a couple of new ways to find your network interfaces. It’ll be fun!

For starters, and probably one I should have already covered, we’ll use a command we’ve covered here and here. We’ll use the ‘netstat’ command, and the ‘netstat’ command you need to find your network interfaces is simply:

(If you don’t have ‘netstat’ available, install the ‘net-tools’ package from your distro’s repositories. It’s almost certainly available.) The output is nice and clear and will show you the names of your network interfaces.

The next command we’ll use is one we’ve used many times before. It’s just a two-letter command, so trying to search for it (on this site) is neigh on impossible – but you can be certain that we’ve used it before. (We’ve at least covered sorting and formatting the output from the ‘ls’ command.)

Anyhow, the command we’ll use to list the network interfaces is pretty simple, it’s just this simple command:

That ‘ls’ command should spit out a list of your network interfaces all nice and easy. If there’s going to be one command that’ll work on any system, it might be this one.

Speaking of which, as this is Linux, there are all sorts of ways to accomplish goals. Because of this, that also means they’ll not always work on every system. You may need to try multiple commands to get the output you’re after – but both of today’s commands should result in you getting the names of your network interfaces (even if you have to install ‘net-tools’ to do so).

Closure:

There you have it, another easy article. Ugh… I do wish I was feeling a bit more up to snuff. Meh… At least I’m writing and writing this sort of stuff. In this case, it’s another article that’ll show you how to find your network interfaces. It’s information worth having. They’re tools that will go well in your growing toolkit of Linux tools.

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: 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.

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.