먼저 #force_color_prompt=yes의 주석은 제거하고
To change it for the current terminal instance only
Just enter PS1='\u:\W\$ '
and press enter.
To change it "permanently"
In your ~/.bashrc
, find the following section:
if [ "$color_prompt" = yes ]; then 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\$ ' fi
Remove the @\h
, and replace the \w
with an uppercase \W
, so that it becomes:
if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ ' else PS1='${debian_chroot:+($debian_chroot)}\u:\W\$ ' fi
Save, exit, close terminal and start another to see the result.
'운영체제 > linux' 카테고리의 다른 글
VMware Workstation 설치 (0) | 2014.10.24 |
---|---|
The request to Suspend this virtual machine failed because the corresponding VMware Tools script did not run successfully. (0) | 2014.10.23 |
우분투에 VMWare Player 설치하기 (0) | 2014.10.22 |