Command: network
Manage network interfaces and locations on macOS.
Usage
Usage: m network [OPTIONS]
Description: Manage network interfaces and locations on macOS.
Options:
--help Show this help message and exit
--list List all network interfaces and their IP addresses
--location <info|list|create|delete|switch> NAME Manage network locations (info & list don't require NAME)
Options
--list
Lists all hardware ports (network interfaces) on your system, such as Wi-Fi and Ethernet, and displays their assigned IP addresses if active.
Example:
m network --list
--location <subcommand> [NAME]
Manages network locations, which are saved sets of network settings. This is useful for quickly switching between different network configurations (e.g., home, office, public Wi-Fi).
info
: Shows the currently active network location.list
: Lists all available network locations.create NAME
: Creates a new network location with the given name.delete NAME
: Deletes a network location.switch NAME
: Switches to the specified network location.
Examples:
# See all available locations
m network --location list
# Create a new location for the office
m network --location create Office
# Switch to the 'Office' location
m network --location switch Office