Fix /dev/kvm is Not Found and Device Permission Denied Errors on Linux/Ubuntu 20.04/19.04
When working with Android SDK and Android Studio to develop mobile apps on your Linux Ubuntu 20.04, you often need to use emulators to test your apps. In this case, you will need to use an AVD (Android Virtual Device) to create a new device, but sometimes, you’ll encouter problems when creating new virtual devices with the
/dev/kvm is not found and
/dev/kvm device permission denied error messages.
What’s KVM and How to Enable It?
KVM stands for Kernel-based Virtual Machine and it’s a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).
/dev/kvm is not found Error
You need to enable KVM, from the BIOS by pressing
F1 key before the system boot. Next, go to the
Security tab and enable
Intel Virtualization Technology and
Intel VT-d Feature. Save the new settings by pressing
F10. Finally, exit and restart your computer.
/dev/kvm device permission denied Error
After enabling KVM, you’ll likely have another error message that says
/dev/kvm device permission denied
To fix this error. you need to install
qemu-kvm and add your username to the
Head over to your terminal and run the following command to install
sudo apt install qemu-kvm
Next, you need to add the user
your-username to the kvm group using the following command:
sudo adduser username kvm
Next, in some cases, you also need to run the following command:
sudo chown username /dev/kvm
You can get your username using the following command:
Now, you can verify if your username is added to
kvm group using the following command:
grep kvm /etc/group
If your user name is added. Finish by restarting your Ubuntu 20 system.
Next, follow the steps tp create a new AVD, to start using your Android emulator.
Latest Questions and Answers
How to add Bootstrap 4 to my Angular 9 app?
What’s the use of TypeScript 3.8/ECMAScript Private Fields?
How to update/Upgrade Angular 8 to Angular 9 by CLI ng update?
How to Install and Use jQuery with Angular 9?
How to Upload Image Files with Laravel 7 and Angular 9?
What Is Angular 9 ivy?
What’s Alpine.js vs, React, Vue.js and Angular?
How to Use HttpClient Module and Service to Send Ajax/Http Requests in Angular 9?
How to Create a New Angular 9 Project Using npm?