raw cheat sheet

OSX Network Cheat Sheet

Robert Eisele

Set up static IP address

A not recommended way of setting a static IP address is

sudo ifconfig en4 inet 192.168.110.1 netmask 255.255.255.0

Since OSX has its own config in /Library/Preferences/SystemConfiguration/*, the better way of setting a static IP permanently is

networksetup -setmanual "Ethernet" 192.168.110.1 255.255.255.0 192.168.110.1

Set MAC address of interface

sudo ifconfig en0 ether aa:bb:cc:dd:ee:ff

Reset DNS Cache

sudo killall -HUP mDNSResponder

Show routing table

netstat -nr

Show ARP table

arp -a

Scan Wifi Networks

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s