首页 > 系统相关 >linux root切换新用户出现-bash-4.2$

linux root切换新用户出现-bash-4.2$

时间:2022-11-16 18:02:41浏览次数:44  
标签:username profile 4.2 用户 bashrc linux root bash

 

原因:新用户目录下缺少环境变量文件.bash_profile和.bashrc

解决办法:将.bash_profile和.bashrc文件复制到登录的用户目录下

登录root用户执行命令,执行完再次切换,切换成功。 

1、[root@localhost ~]# cp   /etc/skel/.bashrc   /home/username(username:登录的用户名)
2、[root@localhost ~]# cp   /etc/skel/.bash_profile   /home/username

标签:username,profile,4.2,用户,bashrc,linux,root,bash
From: https://www.cnblogs.com/zhizhizhizhiya/p/16896837.html

相关文章