Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

bash as my default shell

Posted on 2003-12-08
5
Medium Priority
?
6,819 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 150 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
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 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…

730 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