How to verify that downloaded files such as Ubuntu, BitcoinQT, Armory, and Electrum have not been tampered with?
It all depends on the security mechanisms of your operating system. On Ubuntu, packages are signed, and the installer checks the signature. So, a man in the middle, or a rogue mirror site could not have modified the copy of Electrum that I installed.

The safety of your bitcoins on your machine does not depend only on your bitcoin applications. If the operating system itself is compromised, it can steal your bitcoins (using a keylogger to find the possible passwords) so pay attention to use a safe operating system, with security updates and so on.