How do I tell what version of Gentoo & Linux is running?

18,583

Solution 1

Basic commands will be the following:

# cat /etc/gentoo-release 
Gentoo Base System release 2.1

# uname -r
3.1.6-gentoo

Also you can obtain this information in a "gentoo-way" using app-portage/gentoolkit package utils:

# equery list baselayout
 * Searching for baselayout ...
[IP-] [  ] sys-apps/baselayout-2.1:0

# eselect kernel list
Available kernel symlink targets:
  [1]   linux-3.1.4-gentoo
  [2]   linux-3.1.5-gentoo
  [3]   linux-3.1.6-gentoo *
  [4]   linux-3.1.7-gentoo
  [5]   linux-3.2.0-gentoo
  [6]   linux-3.2.0-gentoo-r1

Solution 2

Gentoo is a rolling release, so although the information posted above is correct and relevant, there is another very important piece of the puzzle:

eselect profile list

It makes a lot more difference on the system than say the exact kernel release...

Solution 3

To check your Linux distribution name and version (not the kernel version):

cat /etc/issue

or

cat /etc/*-release

or

lsb_release -a

Source: http://www.dogruel.com/?p=36.

Share:
18,583

Related videos on Youtube

newSpringer
Author by

newSpringer

Updated on September 18, 2022

Comments

  • newSpringer
    newSpringer over 1 year

    Is there a way to tell from Bash what distro version # I'm running and also what Kernel version is included?

    • Kevin
      Kevin over 12 years
      try uname -a.
  • Mat
    Mat over 12 years
    Please don't post just links as answers. As soon as that blog disappears/changes CMS engine/URL schemes, your answer will become useless.
  • neuron34
    neuron34 over 12 years
    That's a good point. I edited my post to include the solution referred in the blog.
  • newSpringer
    newSpringer over 12 years
    I take it you mean because the profile sets things like default USE flags? How does that impact what versions of software are running? And also by rolling release are you referring to the method by which portage updates the tree with overlays or something else?
  • totaam
    totaam over 12 years
    By "rolling release" I mean that gentoo is constantly updated and actual "releases" with pretty numbers aren't quite as important as with other distros. Yes, the USE flags are important, but profiles change more than just USE flags and will may also have an impact on which version of packages are installed (package masks etc)
  • thomasa88
    thomasa88 over 10 years
    Is uname -r really reliable for distribution checking? Will this not change if the user enters a custom string somewhere in the kernel or if he uses another kernel than the one provided with gentoo-sources?
  • Gert van den Berg
    Gert van den Berg about 9 years
    For just distribution checking lsb_release -i works quite well, but that include "ensure that lsb_release is installed" in the instructions... This user seem to have asked about the kernel and Gentoo version, rather than identifying the distribution. (Although "distro version #" isn't the clearest phrashing)