While viruses fall under the malware banner, they earn their infamous reputation because of the potential damage they can do to an infected device. The easiest way to avoid viruses is to use antivirus software to catch any you may miss. Regularly update antivirus software and perform scans at least every couple of weeks, paying particular attention to manually scanning any downloaded files or email attachments from unknown sources.
Email attachments can be a source of viruses and ransomware, which is why it’s important to carefully scrutinise any attachments before opening them. You should absolutely trust when your email provider puts a file in the junk folder. There may be false-positive emails there, but you can manually check each email safely in the junk folder without downloading any files or clicking on links.
It's also important to keep your applicable operating systems, software, and apps up to date. These updates may only include quality-of-life updates, but patches also tend to include applicable security updates to help protect against the latest vulnerabilities. Getting into the habit of regularly updating also means you’re more likely to download hotfixes, which may address vulnerabilities that are occasionally introduced in updates.
With billions of websites online, a whole lot of them are not worth discovering. Learn to spot questionable websites to avoid accidentally or automatically downloading viruses and malware. If you’re uncertain, use a search engine to query whether a website is okay to visit by adding “is it safe” after the website address. Similarly, pirated software (including games) is a big no-no, not just from a legal standpoint, but because they have a reputation for including viruses or other malware.
If everything goes wrong and you’ve got an infected device (we’ve got a guide for cleansing infected devices), it’s okay to start over and either format or factory reset your device. To make this less stressful for losing critical data, it’s important to have a backup process, ideally an automatic one. External hard drives are a great tool for setting up an automated backup for computers, while cloud storage means you can back up critical files across devices if you need to reset a device without the stress of losing your data.