Ⅰ. はじめに
タイトルの通り「bashのプロンプトを変更する方法」です。
Ⅱ. やり方
1. .bashrc を書き換える
vim ~/.bashrc
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u:\[\033[01;34m\]\w\[\033[00m\]\$ '
2. 適応する
source ~/.bashrc
結果
変更前
変更後
タイトルの通り「bashのプロンプトを変更する方法」です。
vim ~/.bashrc
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u:\[\033[01;34m\]\w\[\033[00m\]\$ '
source ~/.bashrc
変更前
変更後