How to Install, Update and Use Antivirus in Ubuntu

Install Clamav:

sudo apt-get install clamav

Update Clamav:

sudo freshclam

Scan specific directory:

sudo clamscan -r directory_to_scan


How to Update Using GRUB

Sometimes, after updating your Ubuntu Server or running sudo apt-get -f install, you will have a message: 

The link /vmlinuz.old is a damaged link and you may need to re-run your boot loader[grub] 

To solve this warning, run this command: sudo update-grub


How to Install Sublime Text 3 in Ubuntu Linux

My favorite universal text editor in Mac, Windows and Linux is Sublime Text.

Here’s how to install in Ubuntu:

  1. sudo add-apt-repository ppa:webupd8team/sublime-text-3
  2. sudo apt-get update 
  3. sudo apt-get install sublime-text-installer


How to Install Google Chrome in Ubuntu Using Terminal

By default, Google Chrome is not installed in Linux.

Here’s how to install:

  • Download the latest current stable version of Google Chrome (64 bit)
    • wget
  • Install
    • sudo dpkg -i google-chrome-stable_current_amd64.deb
  • In case of any error in the installation, run also this command:
    • sudo apt-get -f install

Change Default Access URL of phpMyAdmin

It is always a good idea to change the default to something like to hide it from easy access to others.

Just edit apache.conf:

sudo nano /etc/phpmyadmin/apache.conf

Alias /phpmyadmin /usr/share/phpmyadmin

Alias /yourdb /usr/share/phpmyadmin


Fast Way of Deleting Large Number of Files

In some cases that you have hundreds of thousands or even millions of files in a directory that you want to delete, you will encounter this error:
/bin/rm: Argument list too long.

The problem is when you type a command like rm -rf *.* is replaced with the list of all files, and usually, the memory buffer allocated to shell is small to accommodate let’s say millions of file names.

To solve this issue, I usually use this simple command:

find . -type f -delete