I would like to show the user some help with specific operations in my form program:
Type "apt-get install foobar" to install the foobar function.
Is there anything that can be done, or should I leave it to the user and suggest options from Red Hat, Suse, Debian / Ubuntu, Mandriva, Slackware, Gentoo ....
cat / etc / lsb-release
root@pierr-desktop:~# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=8.10 DISTRIB_CODENAME=intrepid DISTRIB_DESCRIPTION="Ubuntu 8.10"
lsb_release -a can help on debian and coined.
, , Linux .
lsb_release, Linux. , , LSB- , LSB. (, , FritzBox, .)
lsb_release
, LSB, LSB-? , , LSB.
cat /etc/issue
, Linux , , , , , . lsb, LSB, .
/etc/dist -release. , /etc/arch -release, .
:
uname -a
, , . Arch Linux Arch, , Gentoo "Gentoo Linux".
, apt-get, rpm, emerge, .
You can do this for most well-known distributions (Redhat, Fedaora, Gentoo, Suse, Debian, Ubuntu), they have special files for identifying the distribution and version. those. /etc/debian_version.
/etc/debian_version
But it would be a tedious task for you to list the entire package and everything, but if you really want to be friendly
try with cat:
cat / proc / version
but with uname it might be better:
Source: https://habr.com/ru/post/1721956/More articles:Can I install the installation for WebService? - c #Is a list containing only one child element really a list? Is this false semantics? - xhtmlBoost Your Spirit and Forward Statements - c ++how to turn a given line left or right in C? - cКак воспроизводить видео (.flv) без отображения загружаемого изображения для буферизации во время воспроизведения? - htmlJQuery callback scope - scopeHow do you process multiple textures in an indexed array of OpenGL buffers for use with a data shader? - coordinatesIs there a way to compare the look and / or source HTML from two browser tabs? - comparisonHow to use DoMouseWheel to scroll a line at a time? - delphiЛегкий веб-сервер разработки с поддержкой PHP v2 - phpAll Articles