• 欢迎访问显哥博客,本网站纯属学习技术,绝无商业用途,欢迎小伙伴们共同学习!研究技术!QQ:52249909 加我QQ
  • 世界75亿人,这么小的概率,能认识你,是我一生的幸运,不妨加个QQ接触一下:52249909 加我QQ

linux 终端出现-bash-4.2$的解决方法【显哥出品,必为精品】

技术栈 lixian 3年前 (2021-06-08) 20434次浏览 1个评论 扫描二维码

输入这两句话,然后关闭终端,重新登录一下就好了

cp /etc/skel/.bashrc /root/

cp /etc/skel/.bash_profile /root/

同样的方法,如果是非root而是某用户,就把目标路径换成相对应的用户路径即可。

这两个文件通常在建立用户目录是自动添加,如果是你手动创建文件夹在/etc/passwd指定目录也会出现该错误。


本站博主 , 版权所有丨如未注明 , 均为原创
转载请注明原文链接:linux 终端出现-bash-4.2$的解决方法【显哥出品,必为精品】
喜欢 (0)

您必须 登录 才能发表评论!

(1)个小伙伴在吐槽
  1. I have read your article carefully and I agree with you very much. This has provided a great help for my thesis writing, and I will seriously improve it. However, I don't know much about a certain place. Can you help me?
    gate io2023-03-09 15:48