Q. Can you tell me how can I find out MAC address under Linux or FreeBSD server?
Like with almost everything on the Linux command line, there is more than one way to find MAC address data. At the prompt, type ifconfig -a grep HWaddr and then push enter. If this command is long and you’d like to copy it from this article, then remember that you’ll need to paste from the Edit menu in your terminal window. In Windows, Linux, and other operating systems, the command line utility arp shows local MAC address information stored in the ARP cache. However, it only works within the small group of computers on a local area network (LAN), not across the internet.
A. A mac address is acronym for media access control address, is a unique address assigned to almost all-networking hardware such as Ethernet cards, router etc. Most layer 2 network protocols use one of three numbering spaces managed by the IEEE: MAC-48, EUI-48, and EUI-64, which are designed to be globally unique. (see mac address at wikipedia for more information).
Following command work with Linux and other UNIX oses:
ifconfig command
Ifconfig is used to configure the kernel-resident network interfaces.
In order to find out MAC address of system you can use ifconfig command as follows:$ /sbin/ifconfig grep HWaddr
Output:
OR
OR as a root user type following command:
FreeBSD example
# ifconfig
Output:
See also:
Below are the steps on how you can find your MAC address for your network devices.
NoteBecause of the potential of tracking wireless devices by using a MAC address, many manufacturers (e.g., Apple, Google, and Microsoft) generate random MAC addresses.
Finding a MAC address in Microsoft Windows
- Press the Windows key, type Control Panel, and then press Enter.
- Under the Network and Internet section, select View network status and tasks.
- On the left side of the screen, select Change adapter settings.
- Right-click on your computer icon.
- Select Status from the drop-down menu that appears, then click the Details button.
- Your MAC address appears in the new window.
You can also follow the steps below to view the MAC address from the command line.
Finding the MAC from MS-DOS or Windows command line
- Open the Windows command prompt.
- Type ipconfig /all and press Enter.
- This command lists all your computer adapters, and the MAC address is the Physical address in this list (shown below).
Finding a MAC address in Linux
If you are running Linux and Unix or a variant, you can determine the MAC address or hardware address using the ifconfig command. After running 'ifconfig' from the command line, you get output similar to the example below. In the below output, the MAC address is the hardware address (HWaddr) as highlighted below.
Finding a MAC address in an Apple computer
- Open the Apple Menu.
- Click System Preferences.
- Select Network.
- Click the adapter (if wireless, select Airport).
- Click Advanced.
- At the bottom, the MAC address is listed as the Airport ID or MAC ID is listed.
Finding a MAC address in an Apple iPhone and iPad
- TapSettings.
- Tap General.
- Tap About.
- The MAC address is listed as WiFi Address.
Finding a MAC address in an Android smartphone and tablet
- Tap Apps
- Tap Settings. Note: Make sure it is 'Settings' and not 'Google Settings.'
- Scroll down and tap About, About Tablet, or About device.
- Tap Status.
- The MAC address is listed as the WiFi MAC address.
Finding a MAC address in a router
A MAC address can also be found on for any device connected to your network. Accessing your router for this information is easier than trying to find the address on each device.
To find the MAC addresses from a router, access your router setup or console and view the list of devices connected to the network.