bash版本号怎么样能解决

第一步: 注释掉/etc/profile中的PS1变量(如果有PS1变量,如果没有,直接第二步)

第二步:删除隐藏文件重新登录系统

root@name \~\]# rm -rf .bash_profile .bash \[root@name \~\]# rm -rf .bash_profile .bashrc \[root@name \~\]# exit -bash-4.2# -bash-4.2# -bash-4.2# -bash-4.2# 第三步:解决方法 复制模糊文件到家目录 -bash-4.2# cp /etc/skel/.\* . 查看是否复制成功 .bash_profile和.bashrc 第四步: 退出重新连接操作系统 -bash-4.2# exit 第四步;如果不退出可以让profile直接运行一次 使用. 或者source -bash-4.2# . .bash_profile PS1变量: 临时修改 \[root@name \~\]# cd /etc/sysconfig/network-scripts/ \[root@name network-scripts\]# PS1='\[\\u \\t@\\h \\w\]\\$' \[root 17:43:11@name /etc/sysconfig/network-scripts\]# 永久修改写入/etc/profile 答: 出现以上问题是由于误删除了家目录下的隐藏文件.bash_profile .bashrc 解决方法 复制/etc/skel/目录下的隐藏文件 到家目录 然后重新连接即可

相关推荐
Johny_Zhao1 天前
OpenClaw安装部署教程
linux·人工智能·ai·云计算·系统运维·openclaw
chlk1233 天前
Linux文件权限完全图解:读懂 ls -l 和 chmod 755 背后的秘密
linux·操作系统
舒一笑3 天前
Ubuntu系统安装CodeX出现问题
linux·后端
改一下配置文件3 天前
Ubuntu24.04安装NVIDIA驱动完整指南(含Secure Boot解决方案)
linux
深紫色的三北六号3 天前
Linux 服务器磁盘扩容与目录迁移:rsync + bind mount 实现服务无感迁移(无需修改配置)
linux·扩容·服务迁移
SudosuBash3 天前
[CS:APP 3e] 关于对 第 12 章 读/写者的一点思考和题解 (作业 12.19,12.20,12.21)
linux·并发·操作系统(os)
哈基咪怎么可能是AI4 天前
为什么我就想要「线性历史 + Signed Commits」GitHub 却把我当猴耍 🤬🎙️
linux·github
十日十行4 天前
Linux和window共享文件夹
linux
木心月转码ing5 天前
WSL+Cpp开发环境配置
linux
崔小汤呀6 天前
最全的docker安装笔记,包含CentOS和Ubuntu
linux·后端