Viruses are now written in Java or Adobe/Flash exploits. These are (for the most part) OS independent. Other than those, most of viruses are written for Windows and don’t run on Linux. Google “rootkits” if you want to read more about Linux viruses.
To protect yourself on Linux:
1. Disable scripts in your web browser or only allow trusted sites. Your browser should have settings which you can control. A quick google will tell you what you need to know. NoScript works well if you use Firefox.
2. Disbale Flash in your web browser or only allow trusted sites. Your browser should have settings which you can control. A quick google will tell you what you need to know. Flashblock works well if you use Firefox.
3. Keep Adobe Reader up to date. They send out security updates frequently. Another option is not to use Adobe Reader at all. Just use something else to view PDFs.
4. Enable your Firewall. Ubuntu ships with UFW (Uncomplicated Firewall). The setup is easy. Start here: https://wiki.ubuntu.com/UncomplicatedFirewall. Be sure to set it up so everything is blocked by default, then enable what you want.
5. Enable your router’s firewall. Google the security settings for your firewall and beef up your security. Again, disable access by default and enable whatever you want to use.
6. Scan for rootkits every so often. Rootkit Remover works well. Don’t install it on the Linux machine since any good rootkit will look for it and either get rid of it or reconfigure it so it won’t be of much use. A Linux Live CD comes in handy here.
7. Encrypt your data. Ubuntu allows you to encrypt your home directory (which is where most people store their documents, etc.) easily. Take advantage of that.
8. Change your passwords at least a few times each year. Don’t use the same password for everything.
9. Some sites allow you to see the IP addresses/login times which you account is used from. Check info from time to time. Some sites have a setting to email you if your account is accessed from an unknown IP.
10. If you are still worried, run an anti-virus program. AVG works well and is free.
See here: https://wiki.ubuntu.com/Security/Features for more info.