免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1662 | 回复: 2
打印 上一主题 下一主题

有点难度的问题,超强系统错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-26 23:10 |只看该作者 |倒序浏览
RHEL AS4, su到root,打入某个命令,如reboot,系统回答说bash: reboot: command not found,只好转到/usr/sbin目录下,再./reboot才可以正常执行。希望各位达人指教,已经搜遍google与baidu,无解。

下面是/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=$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


# 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
unset pathmunge


下面是~/.bashrc的内容:

# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'


# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi


[ 本帖最后由 ChinaID 于 2007-4-26 23:13 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-04-26 23:43 |只看该作者
man su

论坛徽章:
0
3 [报告]
发表于 2007-04-26 23:50 |只看该作者
谢谢楼上的达人。原来要在su -而不是su --,因为经常在BSD下做事,今天居然把LINUX的忘记了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP