Skip to content

Using network locations in macOS Ventura

Update: macOS 13.1 brings the Locations feature back to macOS Ventura, so you can ignore this blog post. To use locations, open the Network section of System Settings, then tap the ellipsis with the down arrow at the bottom of the window:

While this is still a bit hidden, it's much more usable than having to visit Terminal. I don't know why they vanished, but I'm glad Locations have returned from their brief hiatus.

This weekend, I finally migrated my 2019 5K iMac from Mojave to Ventura. There were many reasons for remaining on Mojave, starting with the fact that I liked the OS and it worked very well for me. But I also had a couple 32-bit apps I relied on, as well as a number of 32-bit games I enjoyed playing now and then. As time went on, though, there were more and more current apps that I couldn't update to the latest versions, as they all required something newer than Mojave.

(I wasn't a complete macOS luddite—my 14" MacBook Pro runs Ventura, and that's what I use when supporting Many Tricks customers.)

After the update, I remembered one of the bugaboos about Ventura: Apple, in their infinite wisdom, removed the Locations feature from the Network System Settings panel.

I use locations a lot, as they make it easy to switch between various network configurations. In my case, I have locations created that enable or disable my ad blocker, change my settings for when I'm on my VPN, one I need to use to set up my mesh router, and another for when I'm traveling. All of that seemingly gone.

The good news, sort of, is that they're not really gone. If you had existing locations before installing macOS Ventura, you'll find them listed in a sub-menu in the Apple menu. (Note that they've been in the Apple menu a long time; I just never knew about it!)

This location for Locations makes a lot more sense, as it's much easier to get to. However, if you didn't have any locations, or you want to add, delete, or modify your locations, it appears you're out of luck, as there's no GUI to do any of that. But we do still have Terminal, and the locations code itself is still in macOS.

(I found the following in this post on Apple's discussion forum, but I'm replicating the key bits here in case that post ever vanishes.)

The key command is networksetup, and here are the relevant options from the man page:

 -listlocations
         List all network locations.

 -getcurrentlocation
         Display the name of the current set.

 -createlocation location [populate]
         Create a set with the user-defined-name name and optionally populate it with the default services.

 -deletelocation location
         Delete the set.

 -switchtolocation location
         Make the specified set the current set.

At this point, I haven't actually used any of these commands yet. From what I can tell, if you want to create a new location, you'd first use the createlocation option—if you include the populate bit, it will be created with default network settings, otherwise, it will be completely empty.

You'd then use the Locations entry in the Apple menu to select the new location, then open System Settings > Network and configure that location. I'm assuming that when you click OK and close the Network panel that all your changes are then saved with that location, but as noted, I haven't yet played around with this to see exactly how it works.

13 thoughts on “Using network locations in macOS Ventura”

  1. I'm pretty sure that the Apple menu locations entry has been there for many years now (10.9+ certainly), but as you identified its content has always been manipulated via the pref panes.

    I've found networksetup to be fantastically useful in scripts over the years, including toggling the WiFi sub-system totally off/on via -setairportpower, which proved very useful while remote troubleshooting many flakey router/repeaters.

    1. I've confirmed that the Locations submenu is in the Apple Menu in 12.6.1 (when you have multiple locations configured). My memory, confirmed by the Wikipedia image, is that the Location submenu was there from the very first (re)appearance of the Apple menu in Mac OS X 10.0. The same functionality was in a control strip module in Mac OS 9, as I was reminded by John Siracusa's review of 10.0.

      https://en.wikipedia.org/wiki/Mac_OS_X_10.0#/media/File:MacOSX10-0screenshot.png

      1. Funny - I just spent the last hour getting SheepShaver to run, so that I could check where it was in Mac OS 9. I thought I remembered it being in the Apple menu, but so far I only see it in the control strip.

  2. For my computer labs, I setup locations entirely by the command line. We want Ethernet only, no Wi-Fi, so I don't use the populate option. We are also setting fixed IP addresses. So my shell script looks something like this (suitably redacted):
    networksetup -createlocation FixedIP
    networksetup -switchtolocation FixedIP
    networksetup -createnetworkservice Ethernet en0
    networksetup -setmanual Ethernet 10.20.30.101 255.255.255.0 10.20.30.1
    networksetup -setdnsservers Ethernet 10.20.30.4 10.20.30.44
    networksetup -setsearchdomains Ethernet x.example.com

    The good news is that this command sequence does not touch the "Automatic" location which is there by default, so as soon as I add this location, Apple Menu > Locations becomes visible.

    1. Huh, you mean you've seen it in the 13.1 beta and can confirm that it offers switching options as it did pre-13? That saves me from starting a little prefpane project on my own (BTW, can we still write custom prefpanes, or is that also not possible any more?)

  3. Great stuff. Thank you, so glad it is all back in 13.1.
    Are you aware of any easy way to show, dump, or export the actual config settings of any existing network location?

Leave a Reply to Rob Griffiths Cancel reply

Your email address will not be published. Required fields are marked *