Get detailed info about distro

echo /etc/*_ver* /etc/*-rel*; cat /etc/*_ver* /etc/*-rel*

July 18, 2023harsszeg


echo /etc/*_ver* /etc/*-rel* will print the names of all of the files in the /etc directory that contain _ver or -rel.

cat /etc/*_ver* /etc/*-rel* will print the contents of all of the files that were listed by the first command.

For example, if you have a file called /etc/version and a file called /etc/release, the first command will print:


The second command will then print the contents of both of those files.

This command can be useful for finding and viewing the version and release information for your Linux distribution.

Here is an explanation of the commands:

  • echo is a command that prints text to the console.
  • * is a wildcard that matches any number of characters.
  • _ver and -rel are patterns that match files that end with those strings.
  • cat is a command that prints the contents of a file to the console.