Sometimes you need to get info about the Gnu/Linux where your application is running. For instance you need to know the linux distro, the core of the CPU, etc, to personalize the environment of your application during an installation process.
In a Gnu/Linux environment you can easly get system information using the following shell commands:
RAM (total memory):
grep MemTotal /proc/meminfo
CPU (model name):
grep "model name" /proc/cpuinfo
Kernel version:
uname -rs
Linux distro:
lsb_release -a
or in some distro like Fedora:
cat /etc/*release*