0. Ref
Item |
Ref. Url |
Setting |
http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/ |
Color | https://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/ |
1. Basic configuration
1. Display username, hostname and current working directory in the prompt
The PS1 in this example displays the following three information in the prompt:
- \u – Username
- \h – Hostname
- \w – Full path of the current working directory
-bash-3.2$ export PS1="\u@\h \w> "
ramesh@dev-db ~> cd /etc/mail
ramesh@dev-db /etc/mail>
2. Setting
(1) Open bash
vi ~/.bashrc
(2) add PS1
...
PS1="\e[0;32m[giggs@\w]$ \e[m"
export PS1
...
ex)
(3) reload bash
source ~/.bashrc
'Linux' 카테고리의 다른 글
[Linux][Debug] Hung task (0) | 2018.01.31 |
---|---|
[Linux][init] Module init (0) | 2018.01.25 |
htaccess 에서 extention 없애기 (0) | 2016.02.22 |
아파치 rewrite module 켜서 .htaccess 활성화하기(우분투 기준) (0) | 2016.02.22 |
[Proxy] pear proxy 설정 (0) | 2016.02.18 |