how to change default shell in linux?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to change default shell in linux?
# 1  
Old 11-06-2006
how to change default shell in linux?

currently the default shell in my linux enviornemnt is ksh.

how to change the default shell to bash?

thanks!
# 2  
Old 11-06-2006
Try chsh

~John Arackal
# 3  
Old 11-06-2006
change the environment variable of your shell

export SHELL=/bin/bash

make this entry in the .kshrc and

$ . .kshrc
$ echo $SHELL
/bin/bash

you are now in bash shell
kamitsin
# 4  
Old 11-06-2006
Quote:
Originally Posted by kamitsin
change the environment variable of your shell

export SHELL=/bin/bash

make this entry in the .kshrc and

$ . .kshrc
$ echo $SHELL
/bin/bash

you are now in bash shell

That would be a very odd thing to do. Edit the line in /etc/passwd corresponding to the user for which you wish to change the shell. The last field is the login shell for the user.
# 5  
Old 11-06-2006
Agreed, but the user must have the root privelage to make the required changes in the /etc/passwd file.
kamitsin
# 6  
Old 11-07-2006
thank you all!

i tried ypchsh. it works.
# 7  
Old 11-07-2006
usermod -s /path/to/shell username
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

How do we change the default font on Linux system?

I have two hosts i.e host1 & host2. host1 has the desired font details of which are below: uname -a Linux host1 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux $ fc-match StRydeRegular.ttf: "St Ryde" "Regular" I need the same default font... (27 Replies)
Discussion started by: mohtashims
27 Replies

2. Shell Programming and Scripting

Can anybody change this into Linux shell scripts?

@echo off SET "p0=%~0" SET "p1=%~1" SET "p2=%~2" SET "p3=%~3" SET "p4=%~4" SET "p5=%~5" SET "p6=%~6" SET "p7=%~7" SET "p8=%~8" SET "p9=%~9" SHIFT SET "p10=%~9" SHIFT SET "p11=%~9" SET "zip_path=D:\OraOutput\interco\%p10%" echo Program... (5 Replies)
Discussion started by: monisha
5 Replies

3. Shell Programming and Scripting

Shell script to change the password on multiple servers in linux

Can any one please let me know the shell script to change the password for a particular user on multiple linux servers. (2 Replies)
Discussion started by: s_madras
2 Replies

4. Solaris

Can't change default shell

Hello, I've changed the shell for user jack in /etc/passwd to ksh but when I log in it's still saying the shell is bash. Any help much appreciated (4 Replies)
Discussion started by: Grueben
4 Replies

5. UNIX for Dummies Questions & Answers

How to change Default Shell for any user?

Hi, I am new for solaris... how can we change default shell for any user and how to check that which shall currently we are in...... (1 Reply)
Discussion started by: lalit21984
1 Replies

6. Shell Programming and Scripting

How to change your default login shell.

I am new to UNIX hence the question. Most of the time when I have an environment set up for me to develop my systems, I have had my ID logon and I can edit the .profile for my account and it understand commands korn shell. It seems this machine, a new SUN machine, was setup with users getting the... (3 Replies)
Discussion started by: klarue7
3 Replies

7. UNIX for Dummies Questions & Answers

Change the default shell from bash to ksh

Currently my default shell is bash.How can i change itto ksh... (2 Replies)
Discussion started by: dr46014
2 Replies

8. Shell Programming and Scripting

Change default shell

Hi all I am a total newbie at anything to do with shells or any form of scripting Unix/Linux etc. I have been trying to run through a tutorial on scripting but it requires the use of sh. My FreeNAS(FreeBSD) test box running the latest nightly build as an embedded install on CF card has csh as... (14 Replies)
Discussion started by: npaisnel
14 Replies

9. Shell Programming and Scripting

How can I change my default shell

hi ; Right now my default shell on our school system is : /bin/ksh but i want to change it to another shell. There is also bash shell installed in the system as : /bin/bash So, how can I change my default shell to bash shell? Or maybe any other shell? (17 Replies)
Discussion started by: milhan
17 Replies

10. Linux

Change IP, Netmask, Default GW on linux

How can I permenantly change the IP, netmask and default GW for Linux server on Apatchi. (2 Replies)
Discussion started by: salhoub
2 Replies
Login or Register to Ask a Question