{"id":1608,"date":"2021-12-16T13:10:36","date_gmt":"2021-12-16T10:10:36","guid":{"rendered":"https:\/\/files2.tojikon.net\/files-cloud\/2021\/04\/16\/how-to-get-your-linux-mac-address\/https:\/\/files2.tojikon.net\/files-cloud\/2021\/04\/16\/how-to-get-your-linux-mac-address\/"},"modified":"2021-12-16T13:10:36","modified_gmt":"2021-12-16T10:10:36","slug":"how-to-get-your-linux-mac-address","status":"publish","type":"post","link":"https:\/\/tojikon.net\/en\/1608-how-to-get-your-linux-mac-address\/","title":{"rendered":"How to get your Linux MAC address"},"content":{"rendered":"<section id=\"related_posts\">\n<div class=\"block-head\">\n<h3>Related Articles<\/h3>\n<\/div>\n<\/section>\n<p>Need to find your Linux MAC address but can\u2019t figure it out? We can help! Follow along as we go over the different ways you can discover your network adapters\u2019 MAC address on Linux!\u00a0<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-399977 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-get-your-linux-mac-address.png\" alt=\"Linux MAC address\" width=\"1200\" height=\"340\"\/><\/p>\n<h2>Linux MAC address \u2013 IP Link Show<\/h2>\n<p>There are many ways to view your MAC address in Linux. That said, the easiest way to do it is in the terminal with IP LINK SHOW. This tool can show you all attached network devices on the system and IP address and MAC address information.<\/p>\n<p>To get started, open up a terminal window. To open up a terminal window on the Linux desktop, press the\u00a0<strong>Ctrl + Alt + T\u00a0<\/strong>keyboard combination. Alternatively, open up the app menu and search for \u201cTerminal,\u201d and launch the app that way.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-399977 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-get-your-linux-mac-address.png\" alt=\"\" width=\"1200\" height=\"340\"\/><\/p>\n<p>Once the terminal window is open and ready to go, you can use the\u00a0<strong>ip link show\u00a0<\/strong>command below to display all attached network devices.<\/p>\n<pre>\nip link show\n<\/pre>\n<p>From here, look through the command output for your network device. In this example, we\u2019ll use the \u201cwlan0\u201d network device. Your device will differ.\u00a0<\/p>\n<p>When you\u2019ve found your device in the command output, look for the \u201clink\/ether\u201d section. Next to \u201clink\/ether\u201d is your MAC address. If you\u2019d like to save this information for later, you can rerun the <strong>ip link show<\/strong> command\u00a0in combination with the &gt; redirect function.\u00a0<\/p>\n<pre>\nip link show &gt; ~\/my-mac-address-information.txt\n<\/pre>\n<p>At any time, if you wish to view the output of this text file, you can execute the following <strong>cat\u00a0<\/strong>command and view the \u2018my-mac-address-information.txt\u2019 file.\u00a0<\/p>\n<pre>\ncat ~\/my-mac-address-information.txt\n<\/pre>\n<p>Alternatively, open up the Linux file manager and double-click on the \u201cmy-mac-address-information.txt\u201d file in your home folder to launch the file in your favorite text editor.\u00a0<\/p>\n<h2>\u00a0Linux MAC address \u2013 \/sys<\/h2>\n<p>Aside from the IP LINK SHOW tool, you can view your MAC address information on Linux through the \/sys folder on Linux. This method isn\u2019t as simple as entering a command, but if you\u2019re not happy with using the first method we\u2019ve covered, this is a great way to get MAC address info.<\/p>\n<p>To start, open up a terminal window. To open up a terminal window on the Linux desktop, press\u00a0<strong>Ctrl + Alt + T\u00a0<\/strong> on the desktop. Alternatively, you can open up your app menu and search for \u201cTerminal,\u201d and launch the app that way.<\/p>\n<p>Once the terminal window is open on the Linux desktop, use the\u00a0<strong>CD\u00a0<\/strong>command to move into the \/sys folder.<\/p>\n<pre>\ncd \/sys\n<\/pre>\n<p>When you\u2019ve made it into the \/sys folder in the terminal window, execute the\u00a0<strong>ls\u00a0<\/strong>command to take a look at the contents of the folder.\u00a0<\/p>\n<pre>\nls\n<\/pre>\n<p>Look at the\u00a0<strong>ls\u00a0<\/strong>output. You should see the \u201cclass\u201d folder. If you do not see the \u201cclass\u201d folder, restart your Linux PC and try again. Once you\u2019ve located the \u201cclass\u201d folder, use the\u00a0<strong>CD\u00a0<\/strong>command to move into it.<\/p>\n<pre>\ncd class\n<\/pre>\n<p>Inside the \u201cclass\u201d folder, run the <strong>ls\u00a0<\/strong>command again and locate the \u201cnet\u201d folder. This folder holds all network adapter info.\u00a0<\/p>\n<pre>\nls\n<\/pre>\n<p>Using the\u00a0<strong>CD\u00a0<\/strong>command, move into the \u201cnet\u201d folder.<\/p>\n<pre>\ncd net\n<\/pre>\n<p>Inside the \u201cnet\u201d folder, run the <strong>ls\u00a0<\/strong>command. After running the\u00a0<strong>ls\u00a0<\/strong>command, you should see an output of every network device connected to your Linux PC. For example, you may see Enp5s0 (ethernet on some Linux systems), Wlan0 (WiFi on some Linux systems), and lo (standard loopback device on every Linux distribution.<\/p>\n<p>Determine what network device you need to find the MAC address for. Then, use the <strong>CD<\/strong> command to move into its folder. In this example, we\u2019ll use the \u201cwlan0\u201d folder.<\/p>\n<p>Once inside of the folder, execute the\u00a0<strong>cat\u00a0<\/strong>command to view your MAC address for the device.\u00a0<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-399988 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-get-your-linux-mac-address-1.png\" alt=\"\" width=\"1200\" height=\"316\"\/><\/p>\n<pre>\ncat address\n<\/pre>\n<p>Want to save your MAC address to a text file? Enter the following command.<\/p>\n<pre>\ncat address &gt; ~\/my-mac-address.txt\n<\/pre>\n<h2>Linux MAC address \u2013 Ifconfig<\/h2>\n<p>A third way you can view your network adapter\u2019s MAC address on Linux is with the Ifconfig<strong>\u00a0<\/strong>tool. Keep in mind, the Ifconfig tool is retired, and not many Linux operating systems ship it anymore. However, if you\u2019re on a Linux OS that still has Ifconfig, you can use it to find your MAC address. Here\u2019s how.<\/p>\n<p>First, open up a terminal window. Once the terminal window is open, use the\u00a0<strong>ifconfig\u00a0<\/strong>command below to view all attached network devices.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-399978 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-get-your-linux-mac-address-2.png\" alt=\"\" width=\"1200\" height=\"744\"\/><\/p>\n<pre>\nifconfig\n<\/pre>\n<p>After the\u00a0command is run, look for the network device you wish to find the MAC address of. In this example, we\u2019ll be looking for \u201cwlan0,\u201d the default WiFi device.\u00a0<\/p>\n<p>Under your network device, find \u201cether.\u201d Next to \u201cether\u201d is your MAC address.\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Related Articles Need to find your Linux MAC address but can\u2019t figure it out? We can help! Follow along as we go over the different ways you can discover your network adapters\u2019 MAC address on Linux!\u00a0 Linux MAC address \u2013 IP Link Show There are many ways to view your MAC address in Linux. That &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1609,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[33],"_links":{"self":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1608"}],"collection":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/comments?post=1608"}],"version-history":[{"count":0,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1608\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media\/1609"}],"wp:attachment":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media?parent=1608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/categories?post=1608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/tags?post=1608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}