the default hashing method is defined in the /etc/login.defs file
$ grep '^ENCRYPT_METHOD' /etc/login.defs ENCRYPT_METHOD SHA512
it can be redefined in the pam configuration files (of course, for those programs that use it). For example, in the debian gnu / linux distribution there is a configuration directive:
$ grep -r '^password.*pam_unix' /etc/pam.d/ /etc/pam.d/common-password:password [success=1 default=ignore] pam_unix.so obscure sha512
in this example, the method is the same as that defined in /etc/login.defs - sha512 .
but these directives will only affect the hashes of new passwords. already existing (or manually entered) can use any other method.