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. Disable the usage of history using HISTSIZE,HISTFILE
  3. Error "standard in must be a tty" when doing ssh username@server ’sudo command’
  4. Fast and easy way to get mac address on Linux
  5. How to check exit status of a command line in BASH ?
  6. How to Get or Extract filename and extension in bash