1. cd /hg 2. sudo mkdir *repo name* 3. cd *repo name* 4. sudo hg init 5. cd .. 6. sudo chown -R www-data:www-data /hg 7. sudo chmod -R g+rw /hg 8. sudo chmod g+x /hg 9. Repository has been created and ready to be pull and push by the users.