• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6824
  • Last Modified:

bash as my default shell

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
anandabrata
Asked:
anandabrata
1 Solution
 
shivsaCommented:
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
 
gheistCommented:
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
 
glassdCommented:
Try running the command:

usermod -s /bin/bash <username>
0
 
ahoffmannCommented:
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
 
Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now