LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: hmglll

LFS的总是烦人的BASH-2.05#

[复制链接]
发表于 2002-12-3 09:28:42 | 显示全部楼层
呵呵你肯定把\和/搞错了吧。在提示符下打PS1=。。。。就好用,时时
 楼主| 发表于 2002-12-3 09:53:18 | 显示全部楼层
你的意思是指在BASH-2.05下打入export PS1=[\u@\w]\$吗?
还是TRAM所指的$LFS下root的.bash_profile文件。
发表于 2002-12-3 09:56:54 | 显示全部楼层
一样,你两个方法是一样的。不过doooom的方法是让你试一试要设成什么样的,我的是固定的。要是直接打,那你每次都要打。在.bash_profile里,系统就帮你打了。
 楼主| 发表于 2002-12-3 10:50:09 | 显示全部楼层

不行

TRAM(这叫打包制造吗?)兄弟,按你的方法出来的是[u@w]$
发表于 2002-12-3 10:52:33 | 显示全部楼层
那你用doooom的方法呢?要不就把我的这个加到/etc/profile里。没理由不行的。你把你的文件帖出来看看?要有/etc/profile和~/.bash_profile,最好全帖
 楼主| 发表于 2002-12-3 11:34:24 | 显示全部楼层
root@LWJ root]# cat /lfs/root/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATHHOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"

export USERNAME BASH_ENV PATH

[root@LWJ root]#

[root@LWJ root]# cat /lfs/etc/profile
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc


CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-tbird -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -falign-functions=4 -maccumulate-outgoing-args"
CXXFLAGS="${CFLAGS}"
CC='gcc -s'
export CHOST CFLAGS CXXFLAGS CC

pathmunge () {
        if ! echo $PATH | /bin/egrep -q "(^|$1($|" ; then
           if [ "$2" = "after" ] ; then
              PATH=$PATH1
           else
              PATH=$1PATH
           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
发表于 2002-12-3 12:27:47 | 显示全部楼层
那么你的PS1在哪里呢?
发表于 2002-12-3 12:32:30 | 显示全部楼层
我也没有找到的说。
 楼主| 发表于 2002-12-3 13:59:54 | 显示全部楼层
我开始是贴在/lfs/root/.bash_profile文件的最后部分,由于出错我拿下了。
 楼主| 发表于 2002-12-3 14:01:34 | 显示全部楼层
就是在export USERNAME BASH_ENV PATH
的下一行
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表