Your script function is to terminate all gnome-terminal sessions on each machine where it is run if the mac address is valid. (either due to missing driver support or bad/mis-identified hardware) check dmesg to confirm that 'eth0' is detected by the system at all. that means the device is not detected in the machine. The MAC address will be listed next to HWaddr. At the prompt, simply type ip link and push enter. Open a Command Prompt -> type ipconfig /all and press Enter-> The Physical Address is the MAC address. As you want to run your code on multiple systems, you could use an associative array to store the MAC addresses of the systems where the script is to be run declare -A valid_mac 4 Answers Sorted by: 14 if there is no entry in ifconfig -a. macOS Windows Linux Open a terminal and use the ifconfig command. Method 1: Find MAC Address Numbers with ip link.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |