Hello All,
when I open a terminal window and type "echo $0", the answer is "bash". When I type "echo $SHELL", the answer is /bin/bash.
Now, setting aside that I want to change the login shell permanently, I have tried the following command: "chsh -s /bin/tcsh", and after entering my password, I get the message "Shell not changed", although tcsh is in /bin/tcsh.
However, when I just type "tcsh" on the terminal shell, and type "echo $0" I get "tcsh". But, when I type "echo $SHELL", I
still get /bin/bash".
Also, when I type "grep ^username /etc/passwd", I get the following:
<username>:x:500:500:<full_name>:/home/<username>:/bin/tcsh
Now, I don't understand what's happening? And, how can I change my login shell either temporarily or for good? And, how to really know which shell I am using?
Also, since I assume I am running bash at login, I understand from the bash man page that the first file the system (or, whatever) looks at is the /etc/profile. I searched for it, and I found it. I am listing it's contents hereunder in case someone needs it to help identify the problem.
Quote:
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|: )$1($|: )" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}
# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
EUID=`id -u`
UID=`id -ru`
fi
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
else
pathmunge /usr/local/sbin after
pathmunge /usr/sbin after
pathmunge /sbin after
fi
if [ -x /usr/bin/id ]; then
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi
HOSTNAME=`/bin/hostname 2>/dev/null`
HISTSIZE=1000
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
if [ "$PS1" ]; then
. $i
else
. $i >/dev/null 2>&1
fi
fi
done
unset i
unset pathmunge
|
Thanks in advance.