UNIX Shell - Set Default

UNIX Shell - Set Default

 chsh

1. list the available shells in your machine

  cat /etc/shells

You may need to add the path to the new shell binary into this file

2. change default shell for current user

  chsh -s /bin/bash
  chsh -s /usr/local/bin/fish

3. change default shell for a user

  chsh -s /bin/bash username-here
 passwd file

modify the /etc/passwd file

 macOS

1. change default shell via mac’s directory utility

  open directory utility app
  click on directory editor
  click on your name (exp. Marcus Chiu)
  modify UserShell value