get name and information about operating system (o) and kernel-release(r)
> uname -or 2.6.32-220.el6.x86_64 GNU/Linux
more info on all (kernal, machine, operating system, processor etc...)
> uname -a Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
another way... get the Linux Standards Base (LSB) status of the distribution. Works on Centos 6 but not Red Hat
> lsb_release -a LSB Version: core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.2 (Final) Release: 6.2 Codename: Final
from file
> cat /etc/redhat-release > cat /etc/centos-release CentOS release 6.2 (Final)
from command line
php -i php -v
in PHP program phpinfo() provides large amount of information about the current state of PHP, including information about PHP compilation options and extensions, the PHP version, server information and environment, the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License.
<?php phpinfo() ?>
from linux command line
> mysql --version mysql Ver 14.14 Distrib 5.5.43, for Linux (x86_64) using readline 5.1
From inside mysql command line console
> SELECT VERSION(); +----------------+ | VERSION() | +----------------+ | 5.5.43-cll-lve | +----------------+ 1 row in set (0.00 sec)
apachectl with -V provides version information
> apachectl -V: Server version: Apache/2.2.15 (Unix) Server built: Oct 16 2014 14:48:21 Server's Module Magic Number: 20051115:25 Server loaded: APR 1.3.9, APR-Util 1.3.9 ...
> openssl version -a OpenSSL 1.0.1e-fips 11 Feb 2013 built on: Wed Apr 1 13:25:30 UTC 2015 platform: linux-x86_64 options: bn(64,64) md2(int) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx) compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -m64 -DL_ENDIAN -DTERMIO -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wa,--noexecstack -DPURIFY -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM OPENSSLDIR: "/etc/pki/tls" engines: dynamic