How To Install linux-kvm on Ubuntu 20.04
Introduction
In this tutorial we learn how to install linux-kvm
on Ubuntu 20.04.
What is linux-kvm
linux-kvm is:
This package will always depend on the latest complete Linux kernel available for virtual systems.
Package: linux-kvm Architecture: amd64 Version: 5.4.0.1009.9 Priority: optional Section: metapackages Source: linux-meta-kvm Origin: Ubuntu Maintainer: Ubuntu Kernel Team [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 11 Provides: kernel-testing–linux-kvm–full–kvm, kernel-testing–linux-kvm–full–preferred Depends: linux-image-kvm (= 5.4.0.1009.9), linux-headers-kvm (= 5.4.0.1009.9) Filename: pool/main/l/linux-meta-kvm/linux-kvm_5.4.0.1009.9_amd64.deb Size: 1904 MD5sum: 515935f054847440ba5c1bfa35efbf03 SHA1: 23e5841e25f28c48485d458e9940863a6bf5e68a SHA256: 285eb3610ab4346a0222499f52571d2740d57ef1f9fb6ed0139c9d7a290c976d Description-en: Complete Linux kernel for virtual systems. This package will always depend on the latest complete Linux kernel available for virtual systems.
There are three methods to install linux-kvm
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install linux-kvm Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install linux-kvm
using apt-get
by running the following command:
sudo apt-get -y install linux-kvm
Install linux-kvm Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install linux-kvm
using apt
by running the following command:
sudo apt -y install linux-kvm
Install linux-kvm Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install linux-kvm
using aptitude
by running the following command:
sudo aptitude -y install linux-kvm
How To Uninstall linux-kvm on Ubuntu 20.04
To uninstall only the linux-kvm
package we can use the following command:
sudo apt-get remove linux-kvm
Uninstall linux-kvm And Its Dependencies
To uninstall linux-kvm
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove linux-kvm
Remove linux-kvm Configurations and Data
To remove linux-kvm
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge linux-kvm
Remove linux-kvm configuration, data, and all of its dependencies
We can use the following command to remove linux-kvm
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge linux-kvm
References
Summary
In this tutorial we learn how to install linux-kvm
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.