重新初始化用户环境变量就可以解决,进入用户目录后,
[root@rac02 12C]# su - oracle
上一次登录:五 9月 7 02:30:03 GMT 2018pts/2 上
-bash-4.2$ cp /etc/skel/.bash* ./
-bash-4.2$ exit
登出
[root@rac02 12C]# su - oracle
上一次登录:五 9月 7 02:31:48 GMT 2018pts/2 上
[oracle@rac02 ~]$ ls -al
总用量 24
drwx------ 7 oracle oinstall 203 9月 7 02:16 .
drwxr-xr-x. 5 root root 46 9月 6 14:32 ..
-rw------- 1 oracle oinstall 121 9月 7 02:31 .bash_history
-rw-r--r-- 1 oracle oinstall 18 9月 7 02:31 .bash_logout
-rw-r--r-- 1 oracle oinstall 193 9月 7 02:31 .bash_profile
-rw-r--r-- 1 oracle oinstall 437 9月 6 14:34 .bash_profile.bak
-rw-r--r-- 1 oracle oinstall 231 9月 7 02:31 .bashrc
drwxr-xr-x 3 oracle oinstall 18 9月 6 14:33 .cache
drwxr-xr-x 3 oracle oinstall 18 9月 6 14:33 .config
drwxr-xr-x 4 oracle oinstall 39 8月 31 14:35 .mozilla
drwxr----- 3 oracle oinstall 18 9月 7 01:54 oradiag_oracle
drwx------ 2 oracle oinstall 80 9月 6 18:14 .ssh
-rw------- 1 oracle oinstall 755 9月 7 02:16 .viminfo
[oracle@rac02 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
~
~
~
/etc/skel/目录是用来存放新用户配置文件的目录,当添加新用户的时候,这个目录下的所有文件会自动被复制到用户的家目录下。通过修改、添加、删除/etc/skel目录下的文件,可为用户提供统一的、标准的、初始化用户环境。
| 欢迎光临 重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/) | Powered by Discuz! X3.2 |