我的系统无法执行whoami
# whoamiwhoami: not found
solaris 9 sparc try /usr/ucb/whoami 你可以 看一下你的path变量 估计没有包括/usr/ucb路径 所以无法找到改命令 who am i 原帖由 ilinch 于 2007-3-23 16:26 发表
你可以 看一下你的path变量 估计没有包括/usr/ucb路径 所以无法找到改命令
如何把这个/usr/ucb加到PATH中,我的.profile都是一片空白 可以看看/etc/profile这个全局profile文件 原帖由 hail 于 2007-3-23 16:46 发表
可以看看/etc/profile这个全局profile文件
#ident "@(#)profile 1.19 01/03/13 SMI" /* SVr4.0 1.3 */
# The profile that all logins get before using their own .profile.
trap ""2 3
export LOGNAME PATH
if [ "$TERM" = "" ]
then
if /bin/i386
then
TERM=sun-color
else
TERM=sun
fi
export TERM
fi
# Login and -su shells get /etc/profile services.
# -rsh is given its environment in its .profile.
case "$0" in
-sh | -ksh | -jsh | -bash)
if [ ! -f .hushlogin ]
then
/usr/sbin/quota
# Allow the user to break the Message-Of-The-Day only.
trap "trap '' 2"2
/bin/cat -s /etc/motd
trap "" 2
/bin/mail -E
case $? in
0)
echo "You have new mail."
;;
2)
echo "You have mail."
;;
esac
fi
esac
umask 022
trap2 3
没有看到什么地方有PATH? #which whoami 原帖由 nononhm 于 2007-3-23 16:55 发表
#which whoami
which whoami
no whoami in /usr/bin /bin /usr/sbin /sbin chang the /etc/profile,add the /usr/ucb forPATH
sample:
PATH=$PATH:/usr/ccs/bin:/usr/ucb:/usr/local/bin:/usr/local/sbin
export PATH
[ 本帖最后由 remen 于 2007-3-23 17:07 编辑 ]