![mac command line shortcuts mac command line shortcuts](https://media.idownloadblog.com/wp-content/uploads/2019/04/Open-Terminal-from-Finder-Applications-Utilties.jpg)
Ipconfig set en1 BOOTP & ipconfig set en1 DHCPĮcho "add State:/Network/Interface/en0/RefreshConfiguration temporary" | sudo scutil Set the interface called Wi-Fi to obtain it if it isn’t already Networksetup -ordernetworkservices “Wi-Fi” “USB Ethernet” Networksetup -setnetworkserviceenabled offĬhange the order of your network services: Networksetup -renamenetworkservice Ethernet Wired Rename the network service called Ethernet to the word Wired: List all of the network interfaces on the system: Switch the active location to a location called Work, but also show the GUID of that location so we can make scripties with it laters: Switch the active location to a location called Work: Networksetup -createlocation Work populate
![mac command line shortcuts mac command line shortcuts](https://macmost.com/images/posts/MacMostKeyboardShortcutsLion.jpg)
Obtain the active location the system is using:Ĭreate a network location called Work and populate it with information from the active network connection: Show a list of locations on the computer: Get information about how en0 got its dhcp on: Ipconfig getoption en0 domain_name_server Same thing, but setting and echoing a variable:
![mac command line shortcuts mac command line shortcuts](https://www.intego.com/mac-security-blog/wp-content/uploads/2017/06/make-keyboard-shortcuts-textedit-1024x679.jpg)
After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place.