qemu-system-x86_64 command not found

In this troubleshooting guide we learn how to fix qemu-system-x86_64 command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

qemu-system-x86_64: command not found

or when using sudo you get the following error message

sudo: qemu-system-x86_64: command not found

Solutions to qemu-system-x86_64: command not found

How To Fix qemu-system-x86_64: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu qemu-system-x86_64 is provided by qemu-system-x86-xen package.

qemu-system-x86-xen is:

QEMU is a fast processor emulator: currently the package supports i386 and x86-64 emulation. By using dynamic translation it achieves reasonable speed while being easy to port on new host CPUs.

This package provides the full system emulation binaries to emulate the following x86 hardware: .

In comparison to the main qemu-system-x86 this package has xen support enabled, but is only maintained as universe package. Qemu with xen support is needed to run Xen in HVM mode. For any other use case you should install and use qemu-system-x86 instead.

To fix this problem, we can install more using the command below.

sudo apt-get -y install qemu-system-x86-xen

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install qemu-system-x86-xen.

sudo apt -y install qemu-system-x86-xen

Or if you have aptitude installed you can use the following command.

sudo aptitude install qemu-system-x86-xen

Summary

In this tutorial we learn how to fix qemu-system-x86_64 command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.