Solved

bash as my default shell

Posted on 2003-12-08
5
6,811 Views
Last Modified: 2013-12-16
Hi,

Could someone please tell me as to what should I add in my .profile inorder to make my default shell as bash.

Regards,
Anand
0
Comment
Question by:anandabrata
5 Comments
 
LVL 24

Expert Comment

by:shivsa
Comment Utility
the bext way will be to change the shell in /etc/passwd entry. default shell is provided there.

otherwise just add
bash
line to your .profile and whenever u login .profile will run and make the shell bash to u.
but this is just workaround.

best way to change in /etc/passwd file.
man chsh
0
 
LVL 61

Accepted Solution

by:
gheist earned 50 total points
Comment Utility
first you need to add
/usr/local/bin/bash2
to /etc/shells or equivalent
then use chsh or chfn and change shell
never hurt root this way
0
 
LVL 7

Expert Comment

by:glassd
Comment Utility
Try running the command:

usermod -s /bin/bash <username>
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
gheist and glassd gave valid suggestions, depending on your flaviour of UNIX.
If none works, you may use ~/.profile too, but that's tricky, sometimes, somehow
 1. chsh -s /usr/bin/bash $USER
 2. usermod -s /usr/bin/bash $USER
 3. exec /usr/bin/bash  # as very first command in your ~/.profile, but you need to enshure that it will not end in an infinite loop
0
 
LVL 16

Expert Comment

by:Hanno Schröder
Comment Utility
Enter this into your own .profile:

if [ -x /usr/bin/bash ] ; then
    SHELL=/usr/bin/bash       export SHELL
fi

# this is needed if running CDE ot the like:
[ ! "$DT" ] && exec $SHELL
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now