![]() Ifmaxaddr 0 port 6 priority 0 path cost 0Īnd yes, that can seem like a daunting wall of gibberish, but basically look for the items like en0: and then look for the inet connected to that. ![]() Root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0 Maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200 Id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0 Inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 Now how would you know your interface name? Easy! Just run ifconfig without any parameters like this: ifconfigĪnd the output would be something like this: lo0: flags=804 Which is nicer to use and read in scripts. The output would be a clean IP address like this: 123.456.789.1 If you know the interface name of the connection you need an IP address from you can just run this command let’s assume you want en0 which is the main Ethernet port on my Mac Mini: ipconfig getifaddr en0 The first address of 127.0.0.1 is the localhost loopback address, 123.456.789.1 is the address connected to en0 on my Mac Mini (aka: the main Ethernet port) and the 192.168.56.1 is vboxnet0 which is connected to my local install of VirtualBox.īut that can be confusing if you definitely just want a clean IP address. While your question implies the usage of a mouse in a GUI to get the IP address, an easy way from the terminal/command line is to use a combo of ifconfig and grep like this note I am showing my actual output but changing IP addresses connected to me to 123.456.789.1 for this example: ifconfig | grep "inet "Īnd that would return something like this: inet 127.0.0.1 netmask 0xff000000 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |