If I’ve understood this correctly then pacman -Q linux-lts gives me the version of the linux-lts kernel that I have installed locally on Manjaro? If it’s possible I would like a CLI or bash script command that would tell me if there was a newer suggested lts version of Manjaro/Linux Kernel available to install by using sudo pacman -S linux-lts
pacman -Q | grep linux[0-9][0*-9*][" "*] | awk ‘{print $1}’ gives me the list of any kernel versions currently installed but I’m trying to find a way of checking if there’s a new one available to be installed before needing to sign in with sudo:
$ sudo pacman -S linux-lts
[sudo] password for $USER:
warning: linux-lts-1:5.4-4 is up to date – reinstalling
resolving dependencies…
looking for conflicting packages…
Packages (1) linux-lts-1:5.4-4
:: Proceed with installation? [Y/n]
It seems a bit cumbersome to go through re-installing to check for an update. I’m assuming there is a better way of doing this somewhere but I’m not quite sure how to go about finding it.
Not a Bash script, however Manjaro has the ability to do what you want out of the box with Manjaro Settings Manager Notifier. Open Manjaro Notifier Settings from the applications menu to customize what notifications you want to receive.
$ sudo mhwd-kernel -r linux419
checking dependencies...
Packages (3) linux419-4.19.167-1 linux419-headers-4.19.167-1 linux419-nvidia-460.32.03-3
Total Removed Size: 190.69 MiB
:: Do you want to remove these packages? [Y/n]
:: Running pre-transaction hooks...
(1/1) Removing linux initcpios...
:: Processing package changes...
(1/3) removing linux419-nvidia [----------------------------------------------------------------------------------] 100%
(2/3) removing linux419-headers [----------------------------------------------------------------------------------] 100%
(3/3) removing linux419 [----------------------------------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Updating Grub-Bootmenu
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/Stylish/theme.txt
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done
For more info:
$ sudo mhwd-kernel -h
Usage: mhwd-kernel [option]
-h --help Show this help message
-i --install Install a new kernel [kernel(s)] [optional: rmc = remove current kernel]
-l --list List all available kernels
-li --listinstalled List installed kernels
-r --remove Remove a kernel [kernel(s)]
The official longterm supported kernel is decided by the kernel developers at kernel.org.
Ubuntu has a fixed schedule where the fourth month of every even year designates an Ubuntu long term support release - but the kernel is not always the official LTS kernel.
Arch and Manjaro usually follows the definitions assigned by the upstream kernel developers.
The only reasonable method to locate the latest LTS would therefore be to parse their release feed found at