Math-Linux.com

Knowledge base dedicated to Linux and applied mathematics.

Home > Linux > Bash > Fast and easy way to get mac address on Linux

Fast and easy way to get mac address on Linux

All the versions of this article: <English> <français>

VARIABLE="$(cat /sys/class/net/$IFACE/address)"

where IFACE variable is the name of the interface currently defined by ifup or ifdown.

Also in this section

  1. Back to previous directory in shell cd,$OLDPWD
  2. How to Get or Extract filename and extension in bash
  3. Disable the usage of history using HISTSIZE,HISTFILE
  4. How to check exit status of a command line in BASH ?
  5. Error "standard in must be a tty" when doing ssh username@server ’sudo command’
  6. Fast and easy way to get mac address on Linux