赞
踩
一、创建用户和用户组
1
2
3
[root@web4 lianyu]# groupadd lianyu
[root@web4 lianyu]
# groupadd lianyu
[root@web4 lianyu]# useradd lianyu -g lianyu
# useradd lianyu -g lianyu
[root@web4 lianyu]# passwd lianyu
# passwd lianyu
二、用户登录指定目录
[root@web4 lianyu]# cd /home/lianyu
# cd /home/lianyu
[root@web4 lianyu]# ls -a
# ls -a
. .. .bash_history .bash_logout .bash_profile .bashrc .cache CATALINA_HOME_IS_UNDEFINED .config .dubbo .ssh .viminfo
. .. .bash_history .bash_logout .bash_profile .bashrc .cache CATALINA_HOME_IS_UNDEFINED .config .dubbo .
ssh
.viminfo
编辑.bash_profile,来指定:
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
if
[ -f ~/.bashrc ];
then
. ~/.bashrc
fi
# User specific environment and startup programs
export IPOWER_HOME=/usr/local/
export
IPOWER_HOME=
/usr/local/
PATH=$PATH:$HOME/.local/bin:$HOME/bin
PATH=$PATH:$HOME/.
local
/bin
:$HOME
export PATH
PATH
cd $IPOWER_HOME
cd
$IPOWER_HOME