0

What is the difference between updating just the kernel (downloading and compiling) and sudo apt dist-upgrade?

I've read this, but I mean what if I just install the new kernel? (Download kernel 5 from here and install it on my Xubuntu 16.04). Will programs and GUI work as well? Or I need to wait for the 19.10 update?

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
Mohammad Kholghi
  • 881
  • 1
  • 14
  • 31
  • What is the reason for upgrading the kernel? – Pilot6 Sep 09 '19 at 11:04
  • @Pilot6 no need, just learning. I want to know if I can install kernel 5 on `Xubuntu 16.04`? – Mohammad Kholghi Sep 09 '19 at 11:08
  • You CAN install kernel 5 to Xubuntu 16.04. The easiest way is to use UKUU. But there may be glitches of any sort. And there is nothing really different in "kernel 5". Kernel versions are not feature driven. 5.0 is simply the next after 4.19. – Pilot6 Sep 09 '19 at 11:09
  • Another way is to download binaries from https://kernel.ubuntu.com/~kernel-ppa/mainline/ – Pilot6 Sep 09 '19 at 11:11
  • @Pilot6 So if I can install any kernel, what is the difference between `18.04` and `16.04`? – Mohammad Kholghi Sep 09 '19 at 11:15
  • These are different releases. With lots of different packages, features, etc. Kernel is the least noticable in most cases. – Pilot6 Sep 09 '19 at 11:16
  • Why don't you upgrade the release to 18.04? It has 5.0.x kernel as hwe. – Pilot6 Sep 09 '19 at 11:17
  • 1
    @Pilot6 Once, I think when it was released, I upgraded. It had lots of bugs and made me to reinstall 16.04 again. I had to install my all packages and configure them again. – Mohammad Kholghi Sep 09 '19 at 11:20
  • then I suggest to leave the system as is. Later you can do a fresh install of a newer LTS release like 18.04 or 20.04. Upgrades are not always smooth. – Pilot6 Sep 09 '19 at 11:24
  • @Pilot6 How about the packages? E.g. in Windows, we can install same `program.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
  • Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/98451/discussion-between-mohammad-kholghi-and-pilot6). – Mohammad Kholghi Sep 09 '19 at 11:25

2 Answers2

1

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.

Pilot6
  • 88,764
  • 91
  • 205
  • 313
  • So, installing a new kernel is different from packages, meaning I can have my current Xubuntu with a new kernel, am I right? – Mohammad Kholghi Sep 09 '19 at 11:11
  • 2
    That's correct. But a new kernel may not be quite compatible with your old system. And you need to know that Ubuntu kernels are not quite same as mainline ones. – Pilot6 Sep 09 '19 at 11:12
0

You usually encounter no problems changing Linux kernels whenever you like, either newer or slightly older:

If you want a new GUI though you have to upgrade Ubuntu.

WinEunuuchs2Unix
  • 99,709
  • 34
  • 237
  • 401