Identify a physical NIC from the Linux CLI with ‘ethtool’

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, December 24, 2015

Follow me on Twitter as @mattiasgeniar

If you ever need to, you can use a linux tool called ethtool to have the physical NICs on a server blink to identify it. This is especially useful in a remote-hands scenario when you aren’t physically behind the server.

To identify a NIC, use the -p or --identify option. Here’s how the manpage describes it.

$ man ethtool
...

-p --identify
Initiates adapter-specific action intended to enable an operator to easily
identify the adapter by sight.  Typically this involves blinking one or more
LEDs  on  the  specific  network port.

To use it, add the network interface to the command.

$ ethtool -p eth0

If the command succeeds, it’ll keep the terminal busy and you can CTRL+C to exit it. If you’re testing this on a virtual NIC (VMware, Xen, …), you’ll be prompted that the feature is – logically – unavailable.

$ ethtool -p eth0
Cannot identify NIC: Operation not supported

Handy little tool!



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.