[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.
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
howtos:misc:checking_a_slackware_version [2019/12/26 14:04 (UTC)] – created slackjeff | howtos: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 ''/ | + | To check which version of Slackware |
- | ===== Slackware Version | + | ===== Slackware Version |
< | < | ||
Line 11: | Line 11: | ||
- | The slackware-version file will also be updated if you upgrade your version. Sure. | + | The '' |
- | ===== os-release Archive ===== | + | If the '' |
- | 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. | + | < |
+ | $ cat / | ||
+ | Slackware 14.2+ | ||
+ | </ | ||
+ | |||
+ | ===== 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 ''/ | + | This file is called |
< | < | ||
Line 35: | Line 42: | ||
< | < | ||
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 | + | This information |
A very simple example using bash: | A very simple example using bash: | ||
</ | </ | ||
Line 41: | Line 48: | ||
< | < | ||
$ source / | $ source / | ||
- | $ 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:// | URL SITE: http:// | ||
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 | + | For this we execute a pipeline |
< | < | ||
Line 65: | Line 72: | ||
* Originally written by [[wiki: | * Originally written by [[wiki: | ||
- | {{tag> | + | {{tag> |