Installing QEMU on Mac or Linux
Learn how to set up QEMU on Mac or Linux
Installing QEMU on Mac and Linux
QEMU is an open-source machine emulator and virtualizer. Here is how you install QEMU on Mac (using Homebrew or MacPorts) and Linux.
Installing QEMU on Mac
Using Homebrew
Homebrew is a popular package manager for macOS. Follow these steps to install QEMU using Homebrew:
-
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install QEMU:
brew install qemu
-
Verify the installation:
qemu-system-x86_64 --version
Using MacPorts
MacPorts is another package manager for macOS. Follow these steps to install QEMU using MacPorts:
-
Install MacPorts (if not already installed): Follow the instructions on the MacPorts installation page.
-
Update MacPorts:
sudo port selfupdate
-
Install QEMU:
sudo port install qemu
-
Verify the installation:
qemu-system-x86_64 --version
Installing QEMU on Linux
Using Homebrew
Homebrew is also available for Linux. Follow these steps to install QEMU using Homebrew:
-
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install QEMU:
brew install qemu
-
Verify the installation:
qemu-system-x86_64 --version
Using Linuxbrew
Linuxbrew is a fork of Homebrew for Linux. Follow these steps to install QEMU using Linuxbrew:
-
Install Linuxbrew (if not already installed):
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
-
Add Linuxbrew to your PATH:
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv) test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
-
Install QEMU:
brew install qemu
-
Verify the installation:
qemu-system-x86_64 --version