How do I find out the MAC address of my Linux or FreeBSD system?

How do I find out the MAC address of my Linux or FreeBSD system?

The MAC address (Media Access Control address) is a unique identifier assigned to a network interface (e.g., Ethernet, WiFi) that is used to identify the device on a network.

To find out the MAC address of your Linux or FreeBSD system, you can use one of the following methods:

  1. Use the "ifconfig" command: "ifconfig" is a command-line utility that allows you to view and configure the network interfaces of your system. To find out the MAC address of a network interface using "ifconfig", follow these steps:
    2. Open a terminal and type the following command: ``` sh ifconfig ```
    1. The output of the "ifconfig" command includes a list of network interfaces and their respective configurations. For example:
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.100  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::250:56ff:feaa:b5e5  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:aa:b5:e5  txqueuelen 1000  (Ethernet)
        RX packets 59500  bytes 64916837 (61.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 45772  bytes 4370697 (4.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 32  bytes 2912 (2.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 32  bytes 2912 (2.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    Sour‮.www:ec‬lautturi.com
    1. The "ether" line shows the MAC address of the network interface. In this example, the MAC address of the "eth0" interface is "00:50:56:aa:b5:e5".

    Use the "ip" command: "ip" is a command-line utility that allows you to view and manipulate the network settings of your system. To find out the MAC address of a network interface using "ip", follow these steps:

    1. Open a terminal and type the following command:
    ip link show DEVICE
    1. Replace "DEVICE" with the name of the network interface, such as "eth0" or "wlan0". For example:
    ip link show eth0
    1. The output of the "ip link" command includes the MAC address of the network interface. For example:
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
        link/ether 00:50:
Created Time:2017-10-28 21:38:55  Author:lautturi