Title says it all. If you want to check (or set) your ethernet NIC configuration or status in Linux, people used to use mii-tools. But there’s a lot more powerful and modern tool that obsoletes it: ethtool
You can install it with your favourite package manager, if it’s not already present in your system.
In Debian/Ubuntu, you can issue
# aptitude install ethtool
Here it is an example:
# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
Advertised auto-negotiation: Yes
Port: Twisted Pair
Supports Wake-on: g
Current message level: 0x000000ff (255)
Link detected: yes
8 thoughts on “mii-tool is deprecated, use ethtool”
Its probably worth mentioning that mii-tool has been deprecated in RHEL since version 3 atleast.
Yeah, but I still see too many people using or suggesting to use mii-tool, hence this post :)
I beat my head against mii-tool the other day for a long while before I found this post (or, it could have been some other one, but I found this one today by looking for “mii-tool deprecated). mii-tool doesn’t seem to know about gigabit connections, so even though the machine was doing gigabit, I couldn’t tell with mii-tool.
Yep Jay, this is one of the worst limitations of mii-tool and it makes me a little sad that Debian as of Lenny still installs by default mii-tool and not ethtool
Looks like neither will simply print out a list of all interfaces:
e1000g0 link: unknown speed: 100 Mbps duplex: full
e1000g1 link: up speed: 100 Mbps duplex: full
e1000g2 link: unknown speed: 0 Mbps duplex: half
e1000g3 link: unknown speed: 0 Mbps duplex: half
is this Linux?
Is what Linux? Antecedent, man! The use of mii-tool and ethtool? Yeah. dladm of course is Solaris 10.
Jay: I had the same experience. I ran mii-tool because Sun’s ILOM had it and as far as I knew it was the tool for all Linuxes. As we struggle to deploy RHEL I keep running into this mindless duplication — there seem to be at least FIVE separate tools to manipulate the anachronistic MS-DOS-style disk partitions. If mii-tool is deprecated, it should bloody well say so when run, or — better yet — be removed.
[…] https://anothersysadmin.wordpress.com/2008/11/13/mii-tools-is-deprecated-use-ethtool/ […]