Chsh
m (added flags info) |
m (Reverted edits by 81.180.75.142 (Talk); changed back to last version by Jimbo) |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 2: | Line 2: | ||
You can use the -s flag to set it without actually going into an editor: | You can use the -s flag to set it without actually going into an editor: | ||
− | dave@samizdata:[~]% chsh -s /usr/local/bin/ | + | 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|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). | 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|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 ( | + | 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]] | See also: [[:Category:Shells]] - [[bash]] - [[sh]] - [[csh]] - [[tcsh]] - [[ksh]] - [[psh]] - [[zsh]] | ||
[[Category:System Commands]] | [[Category:System Commands]] |
Latest revision as of 17:13, 26 May 2009
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