How to start or stop a VBox virtual machine from the command line on Linux/Ubuntu/Windows hosts?

VirtualBox comes with a command line utility called VBoxManage to manage everything from the command line. Start or stop VMs and edit VM settings and so on. This guide will walk through the steps to start or stop VBox VMs from the command line and send them to the background process (no running windows or calling headlessly). This guide covers commands with examples for Ubuntu Linux hosts and Windows 11 VBox hosts.

Ubuntu Linux VirtualBox host

Linux / Ubuntu VirtualBox can start the VM command line headless, using the below command:

VBoxManage startvm "Your-VM-Name" --type headless

Linux / Ubuntu VirtualBox stop the VM from the command line headless, using the below command:

VBoxManage stopvm "Your-VM-Name"

Windows VBoxManage commands

In Windows Powershell or cmd window, you must go to VBox installation PATH first and then run the commands below. Alternatively, you can add this path to your PATH environment variables.

cd "C:\Program Files\Oracle\VirtualBox"
.\VBoxManage list vms

Windows VirtualBox can start the VM command line headless, using the below command:

.\VBoxManage startvm "Your-VM-Name" --type headless

Windows VirtualBox can stop the VM command line headless using the below command:

.\VBoxManage stopvm "Your-VM-Name"

Note:

The VM will run in the foreground if you are not using the –type headless parameters.

Related articles:

How to install VirtualBox on Windows 11 host

How to install VirtualBox on Ubuntu Linux

VirtualBox tips and tricks