As it is the case with almost all the computers today, mine comes with sensors to monitor its temperature. Ubuntu does not setup those sensors, but it is possible to enable them.
First, we need to install the libraries that allow Linux to read the sensors. Type the following command in a Terminal to install the libraries for the motherboard:
sudo apt-get install lm-sensors
To install the libraries for the hard-disk sensors, type the following command:
sudo apt-get install hddtemp
The installation program will ask you a few question. First, it wil ask you if it should run as a daemon.

Answer ‘yes’.
It will then ask which interfaces it should listen to. I put 0.0.0.0 to listen to all.

The next screen is related to the port: leave the default value.
The libraries are now installed and we are going to detect the sensors. Type the following command in a Terminal:
sudo sensors-detect
Answer “YES” to all the question. Be careful not to just hit enter, but to type YES (because the default answer for the last question is No, and we want to answer Yes to that one as well).
The sensor modules are going to be automatically loaded by default the next time we start up the comptuer. So let’s just do that.
We can now check if it works by trying to monitor the sensors. Type the following command:
sensors
It should display the temperatures for the hardware items for which sensors have been detected.

We are now going to add a graphical interface for the sensors. Type this command in a Terminal:
sudo apt-get install sensors-applet
Add the applet by doing a right click on the desktop panel, and select “Add to Panel”

Select the applet called “Hardware Sensors Monitor” in the System & Hardware section, and click on add.

You should now have the sensors displayed on the panel.
You can right click on any of the applets and select Preferences.
The first tab is for general settings, and the options are easy to understand.

For update intervall, choose a value between two and ten.

The second tab allows you to select the sensors you want to enable.