


The MAC Address will be displayed in the form of 00-02-2D-11-55-4D. These commands are safe to run without changing anything. Before I show you how to change Mac address in Linux, let’s first discuss why would you change it in the first place. (If the information scrolls off the screen you can type 'ipconfig /allmore') Find the network adapter you want to know the MAC address of,locate the number next to Physical Address. Here are 3 methods to get the MAC address.

The following command lists the interface names on the left and the associated MAC addresses on the right. From the command prompt type 'ipconfig /all'. Link/ether 70:ca:9b:ce:67:ae brd ff:ff:ff:ff:ff:ff This command will list the interface status, MAC address, MTU size, etc.ġ: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 The number next to link/ether is the MAC address. The second way to find MAC address is using “ ip link show” command. CentOS 5. The MAC Address will be displayed in the form of 00 0D 93 13 51 1A. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0ĭevice memory 0xb1960000-b197ffff Find MAC address with ip link show command in Linux Locate the number next to the Hardware Address. In this way, we can extract the MAC address of a computer. From that information file, we have to access only the physical address. The system() command gathers the information from the configuration file ( ipconfig file). So that this value will be taken as the permanent MAC address of the network interface. Add MACADDR directive and specify the required MAC address to the /etc/sysconfig/network-scripts/ifcfg-ethX network configuration. It is also known as a physical address, an Ethernet hardware address, and a hardware address.Įxample:- 14-F6-D7-88-3E-29 How to get MAC address using system command in PHP If you are not trying to rename your Rhel 7 network devices to ethX style, please see below resolution. A MAC address is a unique id of a device in the network interface controller (NIC). In this article, we will learn how to get the MAC address or physical address of a system using PHP.įirst of all, let me clear the concept of the MAC address.
