设为首页
收藏本站
用户名
Email
自动登录
找回密码
密码
登录
注册
快捷导航
平台
Portal
论坛
BBS
文库
项目
群组
Group
我的博客
Space
搜索
搜索
热搜:
shell
linux
mysql
本版
用户
LinuxSir.cn,穿越时空的Linuxsir!
»
论坛
›
Linux 发行版讨论区 —— LinuxSir.cn
›
LFS(LinuxfromScratch)
›
LFS的总是烦人的BASH-2.05#
1
2
3
4
/ 4 页
下一页
返回列表
楼主:
hmglll
LFS的总是烦人的BASH-2.05#
[复制链接]
doooom
doooom
当前离线
积分
2954
IP卡
狗仔卡
发表于 2002-12-3 09:28:42
|
显示全部楼层
呵呵你肯定把\和/搞错了吧。在提示符下打PS1=。。。。就好用,时时
回复
支持
反对
使用道具
举报
显身卡
hmglll
hmglll
当前离线
积分
635
IP卡
狗仔卡
楼主
|
发表于 2002-12-3 09:53:18
|
显示全部楼层
你的意思是指在BASH-2.05下打入export PS1=[\u@\w]\$吗?
还是TRAM所指的$LFS下root的.bash_profile文件。
回复
支持
反对
使用道具
举报
显身卡
tram
tram
当前离线
积分
7281
IP卡
狗仔卡
发表于 2002-12-3 09:56:54
|
显示全部楼层
一样,你两个方法是一样的。不过doooom的方法是让你试一试要设成什么样的,我的是固定的。要是直接打,那你每次都要打。在.bash_profile里,系统就帮你打了。
回复
支持
反对
使用道具
举报
显身卡
hmglll
hmglll
当前离线
积分
635
IP卡
狗仔卡
楼主
|
发表于 2002-12-3 10:50:09
|
显示全部楼层
不行
TRAM(这叫打包制造吗?)兄弟,按你的方法出来的是[u@w]$
回复
支持
反对
使用道具
举报
显身卡
tram
tram
当前离线
积分
7281
IP卡
狗仔卡
发表于 2002-12-3 10:52:33
|
显示全部楼层
那你用doooom的方法呢?要不就把我的这个加到/etc/profile里。没理由不行的。你把你的文件帖出来看看?要有/etc/profile和~/.bash_profile,最好全帖
回复
支持
反对
使用道具
举报
显身卡
hmglll
hmglll
当前离线
积分
635
IP卡
狗仔卡
楼主
|
发表于 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=$PATH
HOME/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=$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
回复
支持
反对
使用道具
举报
显身卡
tram
tram
当前离线
积分
7281
IP卡
狗仔卡
发表于 2002-12-3 12:27:47
|
显示全部楼层
那么你的PS1在哪里呢?
回复
支持
反对
使用道具
举报
显身卡
doooom
doooom
当前离线
积分
2954
IP卡
狗仔卡
发表于 2002-12-3 12:32:30
|
显示全部楼层
我也没有找到的说。
回复
支持
反对
使用道具
举报
显身卡
hmglll
hmglll
当前离线
积分
635
IP卡
狗仔卡
楼主
|
发表于 2002-12-3 13:59:54
|
显示全部楼层
我开始是贴在/lfs/root/.bash_profile文件的最后部分,由于出错我拿下了。
回复
支持
反对
使用道具
举报
显身卡
hmglll
hmglll
当前离线
积分
635
IP卡
狗仔卡
楼主
|
发表于 2002-12-3 14:01:34
|
显示全部楼层
就是在export USERNAME BASH_ENV PATH
的下一行
回复
支持
反对
使用道具
举报
显身卡
下一页 »
1
2
3
4
/ 4 页
下一页
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册
本版积分规则
发表回复
回帖后跳转到最后一页
Copyright © 2002-2023
LinuxSir.cn
(http://www.linuxsir.cn/) 版权所有 All Rights Reserved.
Powered by
RedflagLinux!
技术支持:
中科红旗
|
京ICP备19024520号
快速回复
返回顶部
返回列表