Whether it is to patch recently discovered security vulnerabilities or to benefit from software improvements, updating the kernel is a very common part of a server's life.
Checking your kernel version#
You can easily check the current version of your kernel using the command "uname -a"
Linux HelpDesk 4.15.17-1 #1 SMP 4.15.17-9 (Wed, 9 May 2018 13:31:43 +0200) x86_64 GNU/Linux```
In this example, the kernel version is therefore 4.15.17-1
## Updating your kernel
#### LXC or OpenVZ VPS:
The kernel cannot be updated on these types of VPS (this is a limitation of the technologies). The kernels of these VPS are managed directly by the hosts that host the VPS, and therefore by our teams. They are constantly kept up to date thanks to the Kernel care technology. As soon as a new kernel/patch is available, a patch is deployed within 4 hours on the host that hosts your VPS. It then takes effect immediately, with no restart required.
#### KVM VPS or Dedicated Server
KVM VPS and dedicated servers manage their kernel independently, like any Linux server. Updating it is done with a single command:
##### On Debian/Ubuntu
``` root@HelpDesk:~# apt-get update && apt-get dist-upgrade```
##### On Centos/Redhat[root@HelpDesk ~]# yum update
##### On Archlinux[root@HelpDesk ~]# pacman -Syu
Once the update is complete, the new kernel is not used immediately. To do so, you need to restart the server in question:[root@HelpDesk ~]# reboot