Command
sudo htpasswd -c /etc/apache2/.htpasswd usernameExplanation
Creates or updates password file for basic authentication.
Examples
Create new password file
sudo htpasswd -c /etc/apache2/.htpasswd usernameAdd another user
sudo htpasswd /etc/apache2/.htpasswd anotheruser