[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
howtos:misc:checking_a_slackware_version [2019/12/26 14:04 (UTC)] – created slackjeffhowtos:misc:checking_a_slackware_version [2020/02/25 18:48 (UTC)] (current) – [Slackware Version file] added '+' for -current (development) version exaga
Line 1: Line 1:
 ====== Checking a Slackware Version ====== ====== Checking a Slackware Version ======
  
-To check which version of Slackware we have two means that are widely used and practical, the first is to read the slackware-version file, which is located in the ''/etc/directory''. For this you can run the cat command indicating the input file, or simply open it with your favorite editor.+To check which version of Slackware you are running, we have two means that are widely used and practical, the first is to read the ''slackware-version'' file, which is located in the ''/etc/'' directory. For this you can run the '''cat''' command indicating the input file, or simply open it with your favorite editor.
  
-===== Slackware Version Archive =====+===== Slackware Version file =====
  
 <code> <code>
Line 11: Line 11:
  
  
-The slackware-version file will also be updated if you upgrade your version. Sure.+The ''slackware-version'' file will also be updated if you upgrade your Slackware, since it is part of the "aaa_base" package
  
-===== os-release Archive =====+If the ''slackware-version'' output is appended by a '+' it means that the system is running the Slackware -current (development) version.
  
-The second method is the most complete, there is a file that is present in practically all Linux distributions, say it is a POSIX standard to have this file indicating a lot of basic system information.+<code> 
 +$ cat /etc/slackware-version 
 +Slackware 14.2+ 
 +</code> 
 + 
 +===== os-release file===== 
 + 
 +The second method is the most complete. There is a file containing a lot of basic system information which is present in practically all Linux distributions. IT was first introduced by //systemd//.
  
-This file is called os-release and is also located in ''/etc/''. To make your reading you can use the same methods as above with the cat command or your favorite editor.+This file is called ''os-release'' and is also located in ''/etc/''. To view it, you can use the same methods as above with the cat command or your favorite editor.
  
 <code> <code>
Line 35: Line 42:
 <note> <note>
 There is a lot of very valuable information in this file. There is a lot of very valuable information in this file.
-They can be easily used in your Shell script using the source command orto upload this information.+This information can be easily used in your Shell script using the ''source'' command (also known as the 'dot' command ".").
 A very simple example using bash: A very simple example using bash:
 </note> </note>
Line 41: Line 48:
 <code> <code>
 $ source /etc/os-release $ source /etc/os-release
-$ echo "Distribuição: $NAME" +$ echo "Distribution: $NAME" 
-Distribuição: Slackware +Distribution: Slackware 
-$ echo "Versão: $VERSION" +$ echo "Version: $VERSION" 
-Versão: 14.2+Version: 14.2
 $ echo "URL SITE: $HOME_URL" $ echo "URL SITE: $HOME_URL"
 URL SITE: http://slackware.com/ URL SITE: http://slackware.com/
Line 52: Line 59:
  
 Or you can use a more UNIX way of handling things using old rice and beans ... So you can also collect the necessary data. Or you can use a more UNIX way of handling things using old rice and beans ... So you can also collect the necessary data.
-For this we execute a pipeline line storing inside a variable called version as an example.+For this we execute a pipeline command storing the result inside a variable called ''version'' as an example.
  
 <code> <code>
Line 65: Line 72:
   * Originally written by [[wiki:user:slackjeff | Slackjeff]]   * Originally written by [[wiki:user:slackjeff | Slackjeff]]
  
-{{tag>howtos template}}+{{tag>howtos misc slackware_version checking author_slackjeff}}
 howtos:misc:checking_a_slackware_version ()