Upgrading the system is not upgrading a kernel. In most cases you don't compile kernels for Ubuntu because Ubuntu kernels and mainline kernels are available as binaries. You need to compile a kernel only if you want to change something in the sources.
Mainline kernels can be installed using UKUU. Ubuntu kernels for LTS releases are provided by HWE mechanism.
Generally it is not recommended to install another major kernel version without a specific reason.
sudo apt dist-upgrade
doesn't upgrade Ubuntu release. It upgrades all packages including kernel to the latest version for the current release.
Kernel 5.x are available in Ubuntu releases for 18.04 and others.
If you install a mainline 5.x kernel to Xubuntu 16.04 all may work well, or not. that is not guaranteed. The latest major kernel release supported for 16.04 is 4.15.
Xubuntu 16.04
? – Mohammad Kholghi Sep 09 '19 at 11:0818.04
and16.04
? – Mohammad Kholghi Sep 09 '19 at 11:15program.exe
on Windows 10, 8, 7, ... . In 18.04 I should install everything again? Or it has just some additional packages and doesn't touch my files and packages? – Mohammad Kholghi Sep 09 '19 at 11:24