1

I've used bash shell in all my Linuxes and in Mac OS X. I understand that tcsh is the default shell in FreeBSD. If I were to install bash, how would I make it my default shell?

3
  • 1
    Should we distinguish between the root user and a non-root user? – Jeff Schaller Feb 16 '19 at 15:37
  • I haven't voted on the question, but it might be worth noting whether you're aware of the chsh / chpass command or not. – Jeff Schaller Feb 16 '19 at 15:50
  • As with most things, if you read the documentation in the Handbook, you'd have your answer. – Rob Feb 17 '19 at 12:51
5

Changing one's login shell is covered by The FreeBSD Handbook, in the chapter called Shells. It also points to a chapter called Installing Applications: Packages and Ports that will tell you what you need to know for installing bash (installing bash from a FreeBSD package would automatically update /etc/shells).

The steps involved, assuming an otherwise properly set up FreeBSD system, could probably be summarised into

sudo pkg install bash
chsh -s /usr/local/bin/bash
1

There is also the pw utility.

pw usermod <user> -s /usr/local/bin/bash

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.