1

Is there a config file that stores the default shell (bash, zsh, etc) for the current user ?

faressoft
  • 393
  • 2
  • 6
  • 14

1 Answers1

5

The default shell used by a user is contained in the seventh field of /etc/passwd or its equivalent.

$ getent passwd xxxxxx | awk -F: '{ print $7 }'
/bin/bash
Ignacio Vazquez-Abrams
  • 111,361
  • 10
  • 201
  • 247