Is there a way to tell from Bash what distro version # I'm running and also what Kernel version is included?
3 Answers
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 - Is
uname -rreally 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?thomasa88– thomasa882014-01-06 09:04:52 +00:00Commented Jan 6, 2014 at 9:04 - For just distribution checking
lsb_release -iworks quite well, but that include "ensure thatlsb_releaseis 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)Gert van den Berg– Gert van den Berg2015-02-04 15:07:02 +00:00Commented Feb 4, 2015 at 15:07
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...
- 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?citronic– citronic2012-01-13 00:14:18 +00:00Commented Jan 13, 2012 at 0:14
- 2By "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)totaam– totaam2012-01-17 10:42:42 +00:00Commented Jan 17, 2012 at 10:42
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.
- Please don't post just links as answers. As soon as that blog disappears/changes CMS engine/URL schemes, your answer will become useless.Mat– Mat2012-01-12 11:49:39 +00:00Commented Jan 12, 2012 at 11:49
- 2That's a good point. I edited my post to include the solution referred in the blog.neuron34– neuron342012-01-12 14:42:26 +00:00Commented Jan 12, 2012 at 14:42
uname -a.