Solved

bash as my default shell

Posted on 2003-12-08
5
6,818 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 24

Expert Comment

by:shivsa
ID: 9902226
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 62

Accepted Solution

by:
gheist earned 50 total points
ID: 9902584
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
ID: 9902594
Try running the command:

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

Expert Comment

by:ahoffmann
ID: 9930897
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 P.S.
ID: 10070314
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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

623 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