From FreeBSDwiki
Jump to: navigation, search

chsh will allow you to change your shell to a different one than the one chosen when your account was created. Your user info will open up in your editor of choice and you'll have to change the shell line to point to the shell you want -- make sure you point to a valid shell!

You can use the -s flag to set it without actually going into an editor:

dave@samizdata:[~]% chsh -s /usr/local/bin/zsh

Note that if you change a user's shell to something that isn't actually a shell, you can break their login -- intentionally, if you want to block the user from logging in and you switch the shell to /sbin/nologin or another invalid shell, for example, or unintenionally, if you give them a misspelled shell or point to a shell that isn't on a mounted volume (e.g., the shell is in /usr/local/bin/bash and /usr/local/ isn't mounted).

Also note that some programs (several ftp daemons, for example) won't allow the user to log in if they don't have a valid shell.

See also: Category:Shells - bash - sh - csh - tcsh - ksh - psh - zsh

Personal tools