Browse the docs

Start

Commands

The hangar command line works on the same VMs as the app. Every command has help: hangar help <command>.

Everyday commands

Do this Run
See your VMs hangar list
Start / shut down hangar run <vm> (or --background) / hangar stop <vm>
Open a shell ssh <user>@$(hangar ip <vm>)
Watch its traffic hangar traffic <vm> --follow
Allow only some hosts hangar policy <vm> --mode allowlist --allow github.com
Isolate it from the network hangar policy <vm> --isolate on
Snapshot it hangar snapshot take <vm> <name>
Change its settings hangar set <vm> --memory 8 --cpu 4

All commands

Command Description
list List VMs
create <name> Create a VM
run <vm>… Start a VM in a window, or VMs in the background with --background
stop [<names>…] Shut down VMs (--force, --all)
pause, resume <name> Pause or resume a VM
autostart Start the VMs set to --autostart on
stats CPU, memory and disk use of running VMs
ip <name> Print a running VM's IP address
info <name> Show a VM's configuration
set <name> Change CPU, memory, disk, display, network, ISO, Rosetta, audio, clipboard sharing, autostart…
share add, share remove Manage shared folders
setup <name> Show how to install or update Hangar's guest agent in a running VM
drop <name> <files> Copy files into a VM, like dropping them on its window
traffic <name> Show a VM's network traffic
policy <name> Show or change a VM's traffic rules
snapshot take, list, restore, delete Manage snapshots
clone <source> <name> Clone a VM, or one of its snapshots with --snapshot
export <vm> <registry/repo:tag> Push a macOS, Linux or Windows VM, or one of its snapshots, to a registry as an image, or save it to a .tar file
login <registry>, logout <registry> Sign in to a registry (the token goes to your Keychain), or forget it
rename, delete Rename or delete VMs
prune Delete downloads not used for a while (--older-than <days>, --space-budget <gb>)
network status, stop, set Manage Hangar's network (used by Hangar Managed VMs)
ipsw Show the latest macOS restore image for this Mac