Step-by-step how to change login shell using Linux chsh command.


Step by step example to change login shell using Linux chsh command.
Using Linux chsh command on the bash shell command prompt to change login shell on Linux fedora core with example. The article below show the step by step procedure to change shell for user on Linux Fedora Core operating system.
Linux command name: chsh
Command Description:
Command type:
'file' disk file (external command)
What shell am I using?
Below is the example on how to get information on the type of shell that you are using on the system. The output of command below display your current shell. Make sure you used this command to verify your shell changes.
[root@fedora ~]# echo $SHELL
/bin/bash
Get help for the cshs command.
The output of chsh command with the –help option below, prompt the usage of the chsh command.
[root@fedora ~]# chsh --help
Usage: chsh [ -s shell ] [ --list-shells ] [ --help ] [ --version ]
[ username ]
Check type of shell available in the system.
To list type of shell install and available on your Linux system. The example below show the execution of chsh commands to produce the same output that shows the number of different shell installed on the system.
[root@fedora ~]# chsh --list-shells
/bin/sh
/bin/bash
/sbin/nologin
/bin/ash
/bin/bsh
/bin/ksh
/usr/bin/ksh
/usr/bin/pdksh
/bin/tcsh
/bin/csh
/bin/zsh
or
[root@fedora ~]# chsh -l
/bin/sh
/bin/bash
/sbin/nologin
/bin/ash
/bin/bsh
/bin/ksh
/usr/bin/ksh
/usr/bin/pdksh
/bin/tcsh
/bin/csh
/bin/zsh
Step to change Linux login shell.
The example below show the use of chsh command to change shell for current user.
[kambing@fedora ~]$ chsh
Changing shell for kambing.
Password:
New shell [/bin/bash]: /bin/csh
Shell changed.
[kambing@fedora ~]$ chsh -s /bin/bash
Changing shell for kambing.
Password:
Shell changed.
The
Step to change shell for other user.
[root@fedora ~]# chsh -s /bin/csh kambing
Changing shell for kambing.
Shell changed.
The example
above show, the
Need help or need more information use:
# info coreutils chsh
# man chsh
# chsh --help
Related:
Keywords: change shell, chsh, chsh command, using chsh, login shell, linux shell, change user shell, using linux chsh command, chsh command, changing shell, shell example, change bash shell, change login prompt, linux shell, change fedora core shell.
- Login or register to post comments
- 13538 reads
- Email this page












