Is there a clear command to show the latest installed kernel on the system?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I'm looking for a command that lists me the latest kernel installed on a (Debian) system. For example grub-mkconfig "somehow" knows what the latest kernel version is. How does it achieve that? I know I can see it by looking but is there a command that can interpret the versions correctly?







share|improve this question


























    up vote
    3
    down vote

    favorite












    I'm looking for a command that lists me the latest kernel installed on a (Debian) system. For example grub-mkconfig "somehow" knows what the latest kernel version is. How does it achieve that? I know I can see it by looking but is there a command that can interpret the versions correctly?







    share|improve this question
























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I'm looking for a command that lists me the latest kernel installed on a (Debian) system. For example grub-mkconfig "somehow" knows what the latest kernel version is. How does it achieve that? I know I can see it by looking but is there a command that can interpret the versions correctly?







      share|improve this question














      I'm looking for a command that lists me the latest kernel installed on a (Debian) system. For example grub-mkconfig "somehow" knows what the latest kernel version is. How does it achieve that? I know I can see it by looking but is there a command that can interpret the versions correctly?









      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 1 at 0:21









      Jeff Schaller

      31.4k846105




      31.4k846105










      asked Jan 31 at 21:23









      Ben

      233




      233




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          5
          down vote



          accepted










          You can use sort -V which is commonly available on Linux systems; it sorts version numbers:



          ls /boot/vmlinuz-* | sort -V


          or even



          ls -v /boot/vmlinuz-*


          if your ls supports that.



          To only see the latest, keep the last line only:



          ls -v /boot/vmlinuz-* | tail -n 1


          That’s pretty much how grub-mkconfig goes about it; see /usr/lib/grub/grub-mkconfig_lib for the details.






          share|improve this answer






















          • amazing! thanks
            – Ben
            Feb 5 at 19:04










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f421091%2fis-there-a-clear-command-to-show-the-latest-installed-kernel-on-the-system%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          5
          down vote



          accepted










          You can use sort -V which is commonly available on Linux systems; it sorts version numbers:



          ls /boot/vmlinuz-* | sort -V


          or even



          ls -v /boot/vmlinuz-*


          if your ls supports that.



          To only see the latest, keep the last line only:



          ls -v /boot/vmlinuz-* | tail -n 1


          That’s pretty much how grub-mkconfig goes about it; see /usr/lib/grub/grub-mkconfig_lib for the details.






          share|improve this answer






















          • amazing! thanks
            – Ben
            Feb 5 at 19:04














          up vote
          5
          down vote



          accepted










          You can use sort -V which is commonly available on Linux systems; it sorts version numbers:



          ls /boot/vmlinuz-* | sort -V


          or even



          ls -v /boot/vmlinuz-*


          if your ls supports that.



          To only see the latest, keep the last line only:



          ls -v /boot/vmlinuz-* | tail -n 1


          That’s pretty much how grub-mkconfig goes about it; see /usr/lib/grub/grub-mkconfig_lib for the details.






          share|improve this answer






















          • amazing! thanks
            – Ben
            Feb 5 at 19:04












          up vote
          5
          down vote



          accepted







          up vote
          5
          down vote



          accepted






          You can use sort -V which is commonly available on Linux systems; it sorts version numbers:



          ls /boot/vmlinuz-* | sort -V


          or even



          ls -v /boot/vmlinuz-*


          if your ls supports that.



          To only see the latest, keep the last line only:



          ls -v /boot/vmlinuz-* | tail -n 1


          That’s pretty much how grub-mkconfig goes about it; see /usr/lib/grub/grub-mkconfig_lib for the details.






          share|improve this answer














          You can use sort -V which is commonly available on Linux systems; it sorts version numbers:



          ls /boot/vmlinuz-* | sort -V


          or even



          ls -v /boot/vmlinuz-*


          if your ls supports that.



          To only see the latest, keep the last line only:



          ls -v /boot/vmlinuz-* | tail -n 1


          That’s pretty much how grub-mkconfig goes about it; see /usr/lib/grub/grub-mkconfig_lib for the details.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 1 at 8:21

























          answered Jan 31 at 22:12









          Stephen Kitt

          142k22308370




          142k22308370











          • amazing! thanks
            – Ben
            Feb 5 at 19:04
















          • amazing! thanks
            – Ben
            Feb 5 at 19:04















          amazing! thanks
          – Ben
          Feb 5 at 19:04




          amazing! thanks
          – Ben
          Feb 5 at 19:04












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f421091%2fis-there-a-clear-command-to-show-the-latest-installed-kernel-on-the-system%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?