In a script or in a terminal, you can get some informations with the command : uname.
To know the name of your computer, you can use :
uname -n
You can print the kernel name with :
uname -s
In general, the result is “Linux”, but the result will be different if you use other UNIX systems, such as SunOS for instance.
Besides, you can display the kernel release :
uname -r
All these informations are displayed with the command :
uname -a
For other informations about this command, as usual, the manual page is well-documented.