How can i test my hdd in ubuntu

Can some one help me. I am new at (ubuntu) linux.How can i test my hdd if is ok or have bad blocks.Is there a command or program for testing a hdd?

The best way to test a hard

The best way to test a hard drive is whit the manufacturer software in DOS mode.A boot cd called UBCD have them all http://www.ultimatebootcd.com/