In every distribute it has difference files so I write most common ones:
---- CentOS Linux distro
`cat /proc/version`
---- Debian Linux distro
`cat /etc/debian_version`
---- Redhat Linux distro
`cat /etc/redhat-release`
---- Ubuntu Linux distro
`cat /etc/issue` or `cat /etc/lsb-release`
in last one /etc/issue didn't exist so I tried the second one and it returned the right answer