Create or generate .htpasswd file from command line in Linux. The file is used for password protected websites in Apache. The easiest way to create one is to generate it from terminal.
Source code viewer
# Create new file, and add a user into it. The password will be prompted. htpasswd -c /var/www/.htpasswd USERNAME # Add or update password. The logic is same, password will be prompted. htpasswd /var/www/.htpasswd USERNAMEProgramming Language: Apache configuration