IT/Server

command line prompt too long / 커멘드라인이 너무 길 경우 줄이는 방법

Jang HyunWoong 2018. 2. 23. 12:24
jhwskorg@ubuntu-instance:~/workscpace/test/data/controller$

위와 같이 너무 prompt가 길 경우 줄일 수 있다. 


1. Edit .bashrc / .bashrc 수정

1-1. ls -al 로 list를 본다.

1-2. vi .bashrc



2. remove @\h, change \w -> \W @\h 제거, \w -> \W 변경한다.


 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

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



Restart!

반응형