A quick update on the last post – but for OS X!
The OS X terminal is more comfortable than the Windows CLI for route/switch guys like me. Here’s how I make quick IP changes in OS X.
You can create command aliases just like in Cisco IOS by adding them to the profile that terminal loads when you open the app. Just open terminal, and type “open .profile”. Here I’ve done just that, and you can see my terminal profile:
If you’ve never messed with the terminal profile, it will likely be empty. But the basic syntax is straightforward. Save the file and close/reopen terminal for the aliases to become available.
Here are a couple of my examples:
- “setair 126.96.36.199 255.255.255.0” will statically set my Wi-Fi adapter address
- “setethdhcp” will revert my ethernet NIC to DHCP
- “shair” is like ipconfig in Windows, or a simpler version of ifconfig for OS X:
Note that any commands running SUDO will prompt you for your elevated password.