This is simply a list of handy commands that can be run from the terminal of a Mac and will save you (and me) a few mouse clicks. Note: It may be necessary to run most of these commands with sudo. Feel free to make suggestions for inclusion.
dhclient -r – This will release your DHCP obtained IP address
dhclient – This will request a new IP address from a DHCP server
ifconfig <interface> <ip address> netmask <mask> – This will manually set your IP address on the specified interface
The following commands will disable the firewall:
launchctl unload /System/Library/LaunchAgents/com.apple.alf.useragent.plist
launchctl unload /System/Library/LaunchDaemons/com.apple.alf.agent.plist
The following commands will re-enable the firewall:
launchctl load /System/Library/LaunchDaemons/com.apple.alf.agent.plist
launchctl load /System/Library/LaunchAgents/com.apple.alf.useragent.plist
id – This simple command will display your user ID and the IDs of all the groups to which your account belongs
groups – This command will display the group names to which your account belongs
sudo launchctl list – This command will list the services that are running on the machine
route add -n <network/mask> <gateway> – This command will temporarily add a static route to the machine
/bin/launchctl load -w /System/Library/LaunchDaemons/ftp.plist – Will turn on the FTP server if it is not already running.
/bin/launchctl unload -w /System/Library/LaunchDaemons/ftp.plist – Will turn off the FTP server