Uname
From FreeBSDwiki
The uname command writes information about the name, OS, and hardware of the machine to standard output. Typically, you'll want to use the -a flag with this command, in order to get all possible information out of it; if for some reason you want less information there are specific flags to only get the precise info you want.
hostname# uname -a FreeBSD hostname.domain.tld 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:42:56 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386