1、没有新建用户目录
http://www.cnblogs.com/daizhuacai/archive/2013/01/17/2865132.html
http://www.cnblogs.com/atwanli/articles/4118382.html
2、没有.profile 或是 .bash_profile 文件
从其他用户目录下复制一个过来就可以
3、$BASH_VERSION变量为空,这是没有执行过bash
.profile 或是 .bash_profile 文件开头加一行,如下:
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
#添加一行,执行bash初始化内置环境变量
bash
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"
问题,现在还不知道最初bash是在那里执行的。有一个环境变量$BASH,但在新建用户中也是空的。