Change the shell

If you were previously working on Linux, you may miss Bash, and not accustomed to csh which is shipped on FreeBSD by default. You can change the shell to Bash following the below instructions:

(1) The Bash must already be installed on your FreeBSD, and its full path should also be included in /etc/shells. E.g:

  1. # pkg install bash
  2. Updating FreeBSD repository catalogue...
  3. FreeBSD repository is up-to-date.
  4. All repositories are up-to-date.
  5. The following 1 package(s) will be affected (of 0 checked):
  6. New packages to be INSTALLED:
  7. bash: 4.3.42_1
  8. ......

Then you will find the Bash path is presented in /etc/shells automatically:

  1. # cat /etc/shells
  2. # $FreeBSD: releng/10.3/etc/shells 59717 2000-04-27 21:58:46Z ache $
  3. #
  4. # List of acceptable shells for chpass(1).
  5. # Ftpd will not allow users to connect who are not using
  6. # one of these shells.
  7. /bin/sh
  8. /bin/csh
  9. /bin/tcsh
  10. /usr/local/bin/bash
  11. /usr/local/bin/rbash

(2) Execute chsh -s /usr/local/bin/bash:

  1. # chsh -s /usr/local/bin/bash
  2. chsh: user information updated

After you login again, you can find the shell is bash now:

  1. # echo $SHELL
  2. /usr/local/bin/bash

Reference:
Shells.