this is a distro-specific question, since not all distros use the same packet management system (rpm,deb,tgz etc), so better provide some info about your distro.
Anyway in most cases you can also find this out by using the --version option in the executables
Code:
skalkoto@darkstar:~$ mysql --version
mysql Ver 14.12 Distrib 5.0.18, for slackware-linux-gnu (i486) using EditLine wrapper
What do you mean with linux?
linux is as a kernel or as a distro.
You can find out the kernel version with this command:
Code:
skalkoto@darkstar:~$ uname -r
2.6.15.3
skalkoto@darkstar:~$