How to Use Sophos On Linux To Scan For Viruses

Install the app and run on-demand scans from your favorite shell

Image of Matrix-like glyphs and hands.

Pixabay

 

Sophos offers a well-developed antivirus solution for Linux. Once installed, it runs continuously in the background, checking for potentially harmful files.

Installing Sophos

Installing Sophos is done entirely from a shell prompt.

  1. Download the Sophos installer and save the file in your Downloads directory.

  2. Open a terminal window and change into the Downloads directory with the command cd ~/Downloads.

  3. Extract the downloaded file with the command tar xvzf sav-linux-free-9.tgz.

    The name of the file may change as the program's version increases with subsequent updates.

    Screenshot of extracting the downloaded file.
  4. Change into the newly created directory with the command cd sophos-av.

  5. Run the installer with the command sudo ./install.sh.

    Screenshot of the SOPHOS installer command.
  6. Answer the installer's questions.

When the installation completes, Sophos automatically launches.

How To Run an On-Demand Scan

Run an on-demand scan of a specific file from the shell prompt.

  1. Open a terminal window.

  2. Change into the Downloads directory with the command cd ~/Downloads. If the file resides elsewhere, open that location instead.

  3. Scan the file with the command savscan filename.

    Screenshot of the savscan command.
  4. Read the results of the report.

    Screenshot of the scan results.
  5. Close the terminal window.

About Linux Antivirus Solutions

Very few viruses affect Linux. Ubuntu, in fact, says that the average Linux desktop consumer can safely dispense with anti-virus products altogether.

One good use for Linux anti-virus is to check for Windows viruses before you transmit suspect files to colleagues running Microsoft's venerable operating system.