This Blog is to share our knowledge and expertise on Linux System Administration and VMware Administration

Thursday, April 12, 2018

How to change the default login shell by command line in linux server?

By using chsh command we can change the default login shell to other shell.

By using -l option we can list the available login shell on linux server.

[root@testserver ~]# chsh -l

Then which user login shell need to change, we can change by below command. (If a shell is not given on the command line, chsh prompts for one)

[root@testserver ~]# chsh hygmtng7
Changing shell for hygmtng7.
New shell [/bin/ksh]: /bin/bash
Shell changed.

[root@testserver ~]# cat /etc/passwd | grep -i hygmtng7

[root@testserver ~]# cat /etc/passwd | grep -i hygmtng7

No comments:

Post a Comment