Previous Section  < Day Day Up >  Next Section

chsh—changes your login shell


chsh [ -s shell ] [ -l ] [ -u ] [ -v ] [ username ]


chsh is used to change your login shell. If a shell is not given on the command line, chsh prompts for one. All valid shells are listed in the /etc/shells file.

-s, --shell

Specifies your login shell.

-l, --list-shells

Prints the list of shells listed in /etc/shells and exits.

-u, --help

Prints a usage message and exits.

-v, --version

Prints version information and exits.


Example A.12.

1 $ chsh -l

/bin/bash

/bin/sh

/bin/ash

/bin/bsh

/bin/tcsh

/bin/csh

/bin/ksh

/bin/zsh



2 $ chsh

Changing shell for ellie.

New shell [/bin/sh] tcsh

chsh: shell ust be a full pathname.


EXPLANATION

  1. Lists all available shells on this Linux system.

  2. Asks the user to type in the full pathname for a new login shell. Fails unless a full pathname, such as /bin/tcsh, is given.

    Previous Section  < Day Day Up >  Next Section