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
Solved

bash as my default shell

Posted on 2003-12-08
5
6,815 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
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 Schröder
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

808 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