BBB Customised prompt

From Klaus' wiki
Revision as of 09:37, 25 November 2016 by Klaus (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Put this in a file called .bashrc (remember the dot (.)) in your home directory. It will setup yor prompt and add a few usefull aliases.

# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
   . /etc/bashrc
PS1="\[\e[36m\][\[\033[01;37m\] \$(if [[ \$? == 0 ]]; then echo \"\[\033[01;32m\]\342\234\223\"; else echo \"\[\033[01;31m\]\342\234\227\"; fi) $(if  [[ ${EUID} == 0 ]]; then echo '\[\033[0;31m\]\u\[\e[0;35m\]@\h'; else echo  '\[\033[01;34m\]\u\[\e[0;36m\]@\h'; fi)\[\033[01;34m\] [\W] \$\[\033[00m\]]  "
# User specific aliases and functions
alias lt='ls -lahrt '
alias vi='vim'
alias p='ps -ef'
alias ll='ls -lha'
export LANGUAGE=en_GB:en

In order to use these settings immediately issue

]$ . .bashrc

or logout an login once again.