Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Solaris machine , by default tcsh is the shell

How to change the default shell to bash, for example - after log out and login again I will have the bash in place the tcsh!

I mean after log out and log in by ps command I will see bash and not tcsh ,

   my_solaris:/ ROOT > ps
   PID TTY         TIME CMD
   13950 pts/4       0:00 ps
   9951 pts/4       0:00 tcsh
share|improve this question

closed as off-topic by Ward, masegaloeh, MadHatter, Jenny D, EEAA May 26 '15 at 3:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 5 down vote accepted

You can change the login shell that has been set for your account with the usermod command.

usermod -s /usr/bin/bash diana

Double check the path of the bash shell on your machine with which bash.

Note that the usermod command requires root privileges.

share|improve this answer
Not only double-check, but also run the shell, to make sure that there are no missing dynamic dependencies (which I have experienced). At least do /usr/bin/bash --version. – Peter John Acklam Nov 23 '11 at 9:44

You can use the exec command to execute a program in place of your current shell which terminates. To change your shell to bash you can use

exec bash

will switch your shell to bash

exec tcsh

will switch it back again


Now that you have changed your question to mean something different the answers will be different

You will need to have root access to do this but either of the following should work

passwd -e diana 
Old Shell: /usr/bin/tcsh
New Shell: /usr/bin/bash
passwd: password information changed for diana


usermod -s /usr/bin/bash diana
share|improve this answer
see my update - you solution is temp solution , after log out and log in I need to see bash and not tcsh – Diana Nov 23 '11 at 9:01
You should be able to figure out how to do that yourself it's incredibly basic shell administration. I've said it before but I'll say it again. You really need to speak to your manager about some very basic unix education. – Iain Nov 23 '11 at 9:04
@Diana thx lain now your answered on my question , sorry about my confusion question – Diana Nov 23 '11 at 9:35
@Diana, have you read the message I sent you? don't make things worse by being rude. – Chopper3 Nov 23 '11 at 9:52

I think this is what you are looking for.

How to change Solaris shell

You should read some of the comments they mention important things.

What it looks like you need to do is mess with the environment vars a little in your ~/.profile

setenv SHELL /usr/bin/bash
exec $SHELL

then to change it back you just change SHELL back to the default value. This works for csh and ksh. It may even to do this on reboot I am not sure.

As read further into the page, I see someone talking about adding the above commands into a file called ~/.cshrc

share|improve this answer
@Diana Its fixed. – ianc1215 Nov 23 '11 at 8:43
It appears the user "owns" the machine in question, and shouldn't have to resort to backwards-tactics. An "official" way to change the shell should be possible as root. – Signal15 Sep 5 '13 at 20:21

In addition to what was previously noted : usermod -s /usr/bin/bash USERNAME ....

You can also change the default shell for new accounts by using useradd -D

useradd -D -s /usr/bin/bash


share|improve this answer

For Solaris 11 (and Solaris 10), as root you can do the following

[root@server ~]# passwd -e other_user
Old shell: /usr/bin/bash
New shell: /usr/bin/ksh
passwd: password information changed for other_user
[root@server ~]# 
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.