


前言:在一次处理问题过程中用户反馈Linux系统用户登录后命令终端提示:-bash-4.2$多次重启后仍然报错,不知道怎么解决,通过查找资料解决了该问题,问题不难,本文是方便自己后面使用而记录,希望对大家也有帮助。
原因:出现-bash-4.2$原因是用户删除或丢失了 /root/.bashrc 及 /root/.bash_profile 环境变量文件。
解决方法:
登录后执行如下两条命令后重启服务器即可(若不是root账号,请将/root/更换为自己的用户家目录)
cp /etc/skel/.bashrc /root/
cp /etc/skel/.bash_profile /root/



亲爱的:若该文章解决了您的问题,可否收藏+评论+分享呢?
文章评论 本文章有个评论