Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash change command prompt

$ sudo vi ~/.bashrc
# modify the PS1 var with options you want
PS1='s://u@H//A:w
$'
# s for the name of the shell
# u for the current username
# H for the domain name
# A for the time (w/o seconds)
# w for the current directory (pwd)
# 
 for a new line (big prompt)
# $ for the prompt (where the command is typed)

$ source ~/.bashrc
 
PREVIOUS NEXT
Tagged: #bash #change #command #prompt
ADD COMMENT
Topic
Name
2+2 =