Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Change default shell to bash and set default variable's upon login

Prateek Agarwal-OracleFeb 24 2017 — edited Feb 24 2017

Hi,

I want my default shell to change from ksh to bash and also want the ORACLE_HOME and other variable to be default set/exported upon default login.

How to configure it in Oracle Linux 6 u7?

I tried

$ bash

bash-4.1$ echo $SHELL

/bin/ksh

bash-4.1$ which bash

/bin/bash

bash-4.1$ whereis bash

bash: /bin/bash /usr/local/bin/bash /usr/share/man/man1/bash.1.gz

bash-4.1$ usermod -s /bin/bash username (replaced my username)

bash: usermod: command not found

bash-4.1$ exit

$ PATH=$PATH:/usr/sbin

$ echo $PATH

/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/bin:/usr/bin:/usr/dev_infra/platform/bin:/usr/dev_infra/generic/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/ade/bin:/usr/sbin

$ usermod -s /bin/bash username

-ksh: usermod: not found [No such file or directory]

$ chsh -l

/bin/sh

/bin/bash

/sbin/nologin

/bin/ksh

/bin/tcsh

/bin/csh

/bin/dash

/bin/mksh

/bin/zsh

$ chsh -s /bin/bash

chsh: can only change local entries; use ypchsh instead.

$ ypchsh username

ypchsh: can't find the master ypserver: Internal NIS error

$ chsh -s /usr/local/bin/bash username

chsh: can only change local entries; use ypchsh instead.

$ echo $ORACLE_HOME

$

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 24 2017
Added on Feb 24 2017
6 comments
4,203 views