htpasswd -B /etc/apache2/.htpasswd bob

Category: Web Servers & Proxies

htpasswd -B /etc/apache2/.htpasswd bob

Add a user with bcrypt password hashing

-B stores bob's password as a bcrypt hash, the strongest algorithm htpasswd supports and the one modern Apache configs expect. Omitting -c appends to the existing file instead of recreating it. Verify access with curl -u alice:password.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.