Re: Check the linux type?



On Mar 30, 5:22 am, ibupro...@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin) wrote:
On 29 Mar 2007, in the Usenet newsgroup alt.os.linux, in article

<1175167247.049377.216...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, SamG wrote:
How do i check what linux type am i using from a script.

No guaranteed standard way. Many distributions include a release or
version file in /etc/ - so you can look for /etc/*release and then
/etc/*version. If the distribution is following the Linux System
Base standard, there should be a command 'lsb_release'

lsb_release -- print distribution specific information

Like ubuntu

Debian derivative - has a useless /etc/debian-version file but the real
information is available from the 'lsb_release' command

or suse

cat /etc/SuSE-release

or fedora.

/etc/fedora-release (also has or had /etc/redhat-release)

Old guy


Thanks for such an overwhelming respnonse just one more question to
add to this... on rpm based systems, like fedora or suse you could
find the packages installed and its version by doing...

rpm -q <packahe name>

on deb based systems like ubuntu how do you do that....????

.



Relevant Pages

  • Re: Check the linux type?
    ... , SamG wrote: ... No guaranteed standard way. ... If the distribution is following the Linux System ... there should be a command 'lsb_release' ...
    (alt.os.linux)
  • Re: rpm uninstall
    ... Depends on which distribution you are running and if you want to do it ... at the command line or use the gui interface. ... man rpm ...
    (comp.os.linux.misc)
  • Re: Java on Linux
    ... > The correct procedure depends on your distribution. ... > If it is RedHat or another distribution that uses rpm (or can handle it ... install the rpm file in the usual manner. ... I have tried installing Java from the 8.3 distro disks but do not get ...
    (comp.lang.java.programmer)
  • Re: how to find all transactions in a queue
    ... I am familiar with an architecture of replication for many years already on ... What i think is that one has to be able to browse queue generaly and see the ... I will try the command you gave me. ... the log that is then delivered to the subscriber by the distribution agent. ...
    (microsoft.public.sqlserver.replication)
  • Re: Book for Linux
    ... Beginning the Linux Command Line ... IMHO books tend to be quite distribution bound and I wouldn't be ... You do have quite a lot of documentation installed on your Linux as it ...
    (alt.os.linux)