see address in use macos code example
Example 1: check laptop mac address
type on command -> ipconfig/all
Example 2: running ports in mac
sudo lsof -PiTCP -sTCP:LISTEN
type on command -> ipconfig/all
sudo lsof -PiTCP -sTCP:LISTEN