Ubuntu 16上命令行提示长目录的解决办法

简介: Ubuntu 16上命令行提示长目录的解决办法

先找到一个办法,打开.bashrc修改PS1:


else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

 把w改为W。经过测试,在Ubuntu 16上无效



 后来找到一个有效的办法,在.bashrc最后:

export PS1='[\u@\h \W]$ '

 经过测试,成功。

目录
相关文章
|
5月前
|
Ubuntu
Ubuntu没有chkconfig 服务解决办法
Ubuntu没有chkconfig 服务解决办法
|
5月前
|
Ubuntu 开发工具
Ubuntu不能上网解决办法
Ubuntu不能上网解决办法
256 0
|
3月前
|
Ubuntu Linux 时序数据库
|
5月前
|
Ubuntu PHP 开发工具
ubuntu 使用命令行更换国内源
ubuntu 使用命令行更换国内源
488 35
|
1月前
|
Ubuntu 安全 虚拟化
vmware虚拟机运行ubuntu等卡慢的解决办法
vmware虚拟机运行ubuntu等卡慢的解决办法
127 0
|
3月前
|
Ubuntu 安全 Linux
WinSCP传文件到Ubuntu提示Permission denied解决办法
使用WinSCP传文件到一台Ubuntu服务器时,提示Permission denied。整理了解决办法,希望对大家日常工作有所帮助。
113 1
|
4月前
|
Ubuntu Linux 编译器
Linux Ubuntu命令行快速配置C++开发环境
Linux Ubuntu命令行快速配置C++开发环境
|
8月前
|
Ubuntu
VM虚拟机内Ubuntu不识别U盘解决办法——之一
VM虚拟机内Ubuntu不识别U盘解决办法——之一
|
8月前
|
Ubuntu Linux
ubuntu16.04开机后进入grub rescue>终端模式的解决办法
ubuntu16.04开机后进入grub rescue>终端模式的解决办法