If you are overclocking your Raspberry Pi or you just curious how hot this little guy gets, there are two ways to get the internal temperature. Assuming you are running Raspbian as your operating system.

Method 1:

$ /opt/vc/bin/vcgencmd measure_temp

This gives you the temperate in in degrees Celsius: temp=54.1'C

Method 2:

If you need the temperature to be more precise (e.g. storing it in an database or for further processing) use the following command:

$ cat /sys/class/thermal/thermal_zone0/temp

This will give you the temperature in Millidegrees Celsius: 54072

From my personal experience the temperature ranges from about 50°C to 55°C and I have never seen my Raspberry Pi running over 58°C.

[Raspberry Pi CPU Temperature shown on the command line