I have installed HWE kernel in my ubuntu 16.04 LTS machine but
uname -a shows
4.13.0-39-generic kernel is being used.
How do I find out if the HWE kernel I have installed is being used or not ?
HWE isn't a specific type of kernel, but is instead a metapackage that references a kernel track for a newer Ubuntu release. HWE is a way of switching to a newer major kernel version than your release started with.
You can find more about this on the Ubuntu Wiki: https://wiki.ubuntu.com/Kernel/RollingLTSEnablementStack https://wiki.ubuntu.com/Kernel/LTSEnablementStack
In your example, 16.04 shipped with kernel 4.4.x making 4.4 the "16.04 General Availability (GA) kernel". When 16.10 was released, its GA kernel was 4.8 which was made available on 16.04 as an HWE kernel and so on for each major release.
When you install the
linux-generic-hwe-16.04 package you are installing the latest stable release's kernel.
Verify this by checking the metapackage's dependencies with
sudo apt-cache depends linux-generic-hwe-16.04.
user@demo:~$ sudo apt-cache depends linux-generic-hwe-16.04 linux-generic-hwe-16.04 Depends: linux-image-generic-hwe-16.04 Depends: linux-headers-generic-hwe-16.04
Here we see
linux-image-generic-hwe-16.04 which is another metapackage, so:
user@demo:~$ sudo apt-cache depends linux-image-generic-hwe-16.04 linux-image-generic-hwe-16.04 Depends: linux-image-4.15.0-29-generic Depends: linux-modules-extra-4.15.0-29-generic Depends: linux-firmware Depends: intel-microcode Depends: amd64-microcode Recommends: thermald
You can see here that this package currently points to kernel
4.15.0-29-generic, the 18.04 GA kernel (4.15) which is now available on 16.04 through HWE.
So, to finally answer your question, you are running an HWE kernel (because the GA kernel for 16.04 is 4.4) but there is a newer HWE kernel available for 16.04.