Install Cubic
Ubuntu (Snap)
sudo snap install cubic && \
sudo snap connect cubic:kvm
The second command connects the KVM interface, which lets VM instances use hardware acceleration. The package is on the Snap Store.
macOS (Homebrew)
brew install cubic-vm/cubic/cubic
The formula lives in the Homebrew tap and also installs on Linux.
Windows (winget)
winget install cubic-vm.cubic
QEMU is installed automatically as a dependency of the winget package.
Others (Cargo)
Cubic needs QEMU and its UEFI firmware on the host. Install them with your package manager:
# Debian/Ubuntu
sudo apt install qemu-system qemu-utils ovmf qemu-efi-aarch64
# Fedora/RHEL
sudo dnf install qemu-system-x86 qemu-img edk2-ovmf edk2-aarch64
# Arch Linux
sudo pacman -S qemu-full edk2-ovmf edk2-armvirt
# openSUSE
sudo zypper install qemu qemu-tools qemu-ovmf-x86_64 qemu-uefi-aarch64
# macOS
brew install qemu
# Windows
winget install SoftwareFreedomConservancy.QEMU
Install the Rust toolchain and then build Cubic:
rustup toolchain install stable
cargo install cubic
Add the Cargo bin directory to your PATH on Linux:
echo 'export PATH="$PATH:$HOME/.cargo/bin"' >> ~/.profile
source ~/.profile
On Linux, add your user to the kvm group for hardware acceleration. The
change becomes active after the next login:
sudo usermod -a -G kvm $USER
Verify the Install
cubic --help
Shell Completions
Cubic generates completion scripts for Bash, Zsh, Fish and PowerShell. Regenerate the script after an update so it matches the installed commands and options.
Bash
mkdir -p ~/.local/share/cubic
cubic completions bash > ~/.local/share/cubic/cubic.bash
echo 'source ~/.local/share/cubic/cubic.bash' >> ~/.bashrc
Zsh
mkdir -p ~/.zfunc
cubic completions zsh > ~/.zfunc/_cubic
Add fpath=(~/.zfunc $fpath) to ~/.zshrc before its compinit call.
Fish
mkdir -p ~/.config/fish/completions
cubic completions fish > ~/.config/fish/completions/cubic.fish
PowerShell
cubic completions powershell > $HOME\cubic.ps1
Add this line to the profile that $PROFILE names:
. $HOME\cubic.ps1
Start a new shell, type cubic and press Tab to check the setup.
Next Steps
Continue with Getting Started and create your first virtual machine.