Using Clamav Antivirus In Ubuntu
Overview
There are viruses for all platforms, they are just more common on Windows.
Having an antivirus in Linux is just another tool to help you protect the system, you won’t be entirely safe just using it, you also need safe practices.
We will install ClamAV, one of the most popular antivirus software for Linux.
ClamAV® is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.
Why do we need antivirus in Linux
My choice is to have an antivirus to run from time to time or at suspicious files and folders, but not having it running as daemon to avoid a performance decrease in the system.
Install
To install we use the clamav package:
# apt-get install clamav
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
clamav-docs
The following NEW packages will be installed:
clamav
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/90.5 kB of archives.
After this operation, 695 kB of additional disk space will be used.
Selecting previously unselected package clamav.
(Reading database ... 34590 files and directories currently installed.)
Preparing to unpack .../clamav_0.99.2+addedllvm-0ubuntu0.14.04.1_amd64.deb ...
Unpacking clamav (0.99.2+addedllvm-0ubuntu0.14.04.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up clamav (0.99.2+addedllvm-0ubuntu0.14.04.1) ...
Update db
Now we need to update the signatures so we have our virus database
updated with freshclam
.
# freshclam
ClamAV update process started at Wed Jan 25 15:05:36 2017
Downloading main.cvd [100%]
main.cvd updated (version: 57, sigs: 4218790, f-level: 60, builder: amishhammer)
Downloading daily.cvd [100%]
daily.cvd updated (version: 22948, sigs: 1449757, f-level: 63, builder: neo)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 289, sigs: 57, f-level: 63, builder: neo)
Database updated (5668604 signatures) from db.local.clamav.net (IP: 155.98.64.87)
Scan commands
To scan a directory recursively we use -r
and -i
to just display
the infected files.
$ clamscan -r --bell -i ~/Downloads/
----------- SCAN SUMMARY -----------
Known viruses: 5663100
Engine version: 0.99.2
Scanned directories: 61
Scanned files: 380
Infected files: 0
Data scanned: 1077.08 MB
Data read: 551.12 MB (ratio 1.95:1)
Time: 298.129 sec (4 m 58 s)
Other notes
Some other good security recommendations:
- keep software updated
- beware phishing sites (browsing through web pages that looks like another popular ones)
- analyze command before running them or use trusted sources.
References
Tested in Ubuntu 16.10
*[OSs]: Operating Systems
- Find out IP addresses from MACs in a Local Area NetworkMay 10, 2023
- Choose any key as the modifier in i3wm in 6 stepsJanuary 20, 2021
- Adding a swap memory to Linux from command line in 6 stepsApril 2, 2020
- Free up space in Linux (Ubuntu)March 27, 2020
- Switch between languages in Linux. Write in multiple languages with same keyboard.March 21, 2020
- How to make Ubuntu display emojisFebruary 12, 2020
- Detect and mount USB devices in Linux from consoleJanuary 24, 2019
- How to make screencasts in Ubuntu LinuxJanuary 21, 2019
- Using i3 window manager in LinuxJanuary 7, 2019
- Setting Up A Fresh Linux ServerAugust 25, 2018
- How To Download A Website With Wget The Right WayJune 30, 2017
- Replicate Installed Package Selections From One Ubuntu System To AnotherApril 24, 2017
- Using Clamav Antivirus In Ubuntu
- How to Type Spanish Characters, Accents and Symbols in LinuxJune 6, 2016
Ubuntu
- How to activate tap to click touchpad's feature in Ubuntu in 4 stepsMarch 4, 2021
- Difference between suspend and hibernate in Ubuntu and how to execute them from command lineApril 12, 2020
- Solving Google Chrome's gpu-process error message in Ubuntu LinuxJanuary 7, 2019
- Solving Google Chrome's secret service operation error message in Ubuntu LinuxJanuary 7, 2019
- Start Emacs In Ubuntu The Right WayJune 10, 2017
Unix Shell
- Connect to a Bluetooth device from command line in Ubuntu LinuxJune 23, 2020
- Add Infolinks Script To An Existing Website From Console With Sed CommandApril 4, 2017
- How to change all files permissions to 644 and directories to 755January 10, 2017
- Shell Redirect Output And Errors To The Null Device In BashDecember 9, 2016
- Prevent Running Of Duplicate Cron JobsDecember 8, 2016
- Delete All Backup Files Recursively In BashNovember 28, 2016
- Bash Script to Find Out If MySQL Is Running Or NotNovember 9, 2016
Articles
Subcategories
Except as otherwise noted, the content of this page is licensed under CC BY-NC-ND 4.0 . Terms and Policy.
Powered by SimpleIT Hugo Theme
·