|
发表于 2003-11-6 18:07:33
|
显示全部楼层
小凡兄,我出现了和hackhost一样的问题,按照您的方法没有改回来。
前两天装了好几个RPM包,装完后不知道哪个包的问题,su后的提示符改为了bash-2.05a
了。
我保证,提示符变化之前我没有手工改/etc/profile文件!
我按照你的方法,修改了/etc/profile,但不行。
下面是我的/etc/profile文件:
- [moxnet@localhost moxnet]$ su
- Password:
- bash-2.05b# cat /etc/profile
- # /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
- }
-
- # Path manipulation
- if [ `id -u` = 0 ]; then
- pathmunge /sbin
- pathmunge /usr/sbin
- pathmunge /usr/local/sbin
- fi
-
- pathmunge /usr/X11R6/bin after
-
- unset pathmunge
-
- # No core files by default
- ulimit -S -c 0 > /dev/null 2>&1
-
- USER="`id -un`"
- LOGNAME=$USER
- MAIL="/var/spool/mail/$USER"
-
- HOSTNAME=`/bin/hostname`
- HISTSIZE=1000
-
- if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
- INPUTRC=/etc/inputrc
- fi
-
- export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
-
- for i in /etc/profile.d/*.sh ; do
- if [ -r "$i" ]; then
- . $i
- fi
- done
-
- unset i
-
- #this is me added
- #把这行加到/etc/profile:
- export PS1="[\u@\h \W]\\$"
- #如要加上彩色,可用:
- #export PS1="\033[;33;1m\u@\h \W\\$\033[0m"
- bash-2.05b#
复制代码 |
|