Easy Tutorial
❮ Linux Comm Mke2Fs Linux Comm Pstree ❯

Linux chsh Command

Linux Command Manual

The Linux chsh command is used to change the user's shell setting.

Usage permission: All users.

Syntax

shell>> chsh

Example

shell>> chsh
Changing shell for user1
Password: [del]
New shell [/bin/tcsh]: ### [currently used shell]
[del]
shell>> chsh -l ### displays the contents of the /etc/shells file
/bin/bash
/bin/sh
/bin/ash
/bin/bsh
/bin/tcsh
/bin/csh

Change the current shell. The current shell is set to /bin/bash, and by using the chsh command, the shell setting is changed to /bin/csh.

# chsh
Changing shell for root.
New shell [/bin/bash]: /bin/csh //enter the new shell address
Shell changed.

Change the current shell setting using the -s parameter

# chsh -s /bin/csh //change the current setting to /bin/csh
Changing shell for root.
Shell not changed.

Linux Command Manual

❮ Linux Comm Mke2Fs Linux Comm Pstree ❯