Mac Command Cheat Sheet



Command Line Cheat Sheet Our cheat sheet explains the essential tasks on the command line. Download it for free. For many, the command line belongs to long gone days: when computers were controlled by typing mystical commands into a black window; when the mouse possessed no power. Related that happens locally on your computer. This cheat sheet features the most important and commonly used Git commands for easy reference. INSTALLATION & GUIS With platform speciļ¬c installers for Git, GitHub also provides the ease of staying up-to-date with the latest releases of the command.

ipconfig

  1. get ip address

  2. get subnet mask

  3. get dns server

  4. get info about how en0 got its dhcp on

ifconfig

  1. get network info

  2. set ip address and netmask

  3. renew dhcp leases

networksetup

  1. get a list of location on the computer

  2. get active location

  3. config manual static ip address

  4. config dns server

  5. get dns server

firewall

  1. stop the application layer firewall

  2. start the application layer firewall

  3. allow an app to communicate outside through the application layer firewall

route

  1. routing table

  2. add a route

  3. delete a route

netstat

  1. view info on all sockets

  2. network info for ipv6

  3. per protocol network statistics

  4. statistics for a specific network protocol

  5. statistics for network interfaces

  6. view network info as it happens

Mac Command Cheat SheetMac Command Cheat Sheet

ping

  1. put a delay in pings

  2. ping hostname 5 times and then stop

  3. flood ping the host

  4. set packet size during ping

  5. customize source ip during ping

trace

  1. trace the path packets go through

  2. without looking up names

  3. in debug mode

nc

  1. establish a network connection

  2. establish a network connection over port 2195

  3. establish a network connection only allowing ipv4

  4. setup a network listener on port 2196 for testing

tcpdump

  1. capture some packets

  2. capture all packets

  3. capture packets for port

  4. capture all packets for a given port going to destination 192.168.1.160

  5. capture packets as above but dump to a pcap file

  6. read tcpdump (cap) files and make them human readable

other

Sheet
  1. flush the dns cache

  2. clear arp cache

  3. what binaries have what ports and in what states are those ports

  4. make an alias for looking at what has a listener open, called ports

  5. edit hosts file

Mac Os Terminal Command

references