Shell is a program in unix-like operating system . It is used by user to interact with operating system . It receive input from user and execute program on the basis of that input . So we can say that it provides a environment in which we can execute our commands, program and scripts . There are many types of shell used in linux operating system . Some of these are – bash , sh , nologin, tcsh, csh and ksh . We will discuss about these shells in this article . In this article we will explain how to change users default shell in linux .

Before moving on, we discuss something about Shell –

sh – It is aslo called Bourne shell . It is devloped by stephen Bourne at AT & T Bells lab . It is oldest shell of Unlix-like system .

Bash – It is most popular shell in unix-like system . It is called Bourne-again shell . It is default shell of most unix like system . It has capability to run scripts .

ksh – It is devloped by David Korn . It includes some important features like job control , command aliasing and command completion .

How to change users default shell in linux

You can change users default shell in linux by various method . We discuss about some of the important method .

To list all available shell on your system , you can use command given below –

To find your current shell , you can type following command –

A user can change their own shell , which is listed on /etc/shells

1. Using chsh command

User can change their shell with the help of chsh command with -s flag

2. Using usermod command

User can change their shell with the help of usermod command with -s flag . usermod is used for modifying user account datails .

3. Using passwd file

User can change their shell with the help of editing /etc/passwd file

The output of above command looks like

password command

You should edit this file to change shell of user .

You may also like to read following article :

In this article i explained How to change users default shell . I hope you like this article and this will helpful for you .