Ubuntu中让 shell 终端只显示当前路径_计算机视觉

Ubuntu系统 默认命令行 前面是 绝对路径,有时候屏幕不够用,臭长的 绝对路径就很烦,因此需要设置一下,修改成 CentOS 款 ,只显示当前所在目录即可

  • 绝对路径效果

Ubuntu中让 shell 终端只显示当前路径_Shell_02

  • 只显示当前目录效果

Ubuntu中让 shell 终端只显示当前路径_环境搭建_03


操作如下

(base) moli@ubuntu:~/project/four$ vim ~/.bashrc
  • 小 w 修改为 大 W

Ubuntu中让 shell 终端只显示当前路径_Linux_04

  • 修改后 使 配置生效 (其它的 shell 窗口 要看的效果 需要 重新打开 )
(base) moli@ubuntu:~/project/four$ source

Ubuntu中让 shell 终端只显示当前路径_绝对路径_05