Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

What is your $PS1?

IndicIndic Member
edited February 2012 in General

So, what do you use for $PS1?

My fancy one is something like below -

PS1='\n${debian_chroot:+($debian_chroot)}[\033[01;34m]-[\033[01;32m](\u@`hostname --fqdn`)[\033[01;34m]-[\033[01;32m](\D{%T %z})\n[\033[01;34m]-[\033[01;32m]([\033[1;31m]\w[\033[1;32m])[\033[01;34m]-\$[\033[00m] '

image

We know what @Aldryic use

Comments

  • @Indic said: We know what @Aldryic use

    Yup.

    -23:16:59- Demi:~ :: aldryic % cat .bashrc
    # aliases
    alias sysinfo='uname -nsr;
    
    echo -n "Memory: ";
    free -m|grep Mem:|awk "{print\$2}"|tr "\n" " ";
    
    echo -en "MB\nProcessor:\n";
    cat /proc/cpuinfo | egrep "(model name|MHz|cache )" | head -3;
    
    echo -n "Cores: ";
    grep "model name" /proc/cpuinfo | wc -l;
    
    echo -n "Video: ";
    lspci|grep -i vga|sed -r "s/VGA compatible controller://g;"
    '
    alias ls='ls -hlFb --color=auto --group-directories-first'
    alias la='ls -hlaFb --color=auto --group-directories-first'
    
    
    # ps1
    RESET="\[\\e[1;0m\\]"
    BLACK="\[\\e[0;30m\\]"
    RED="\[\\e[0;31m\\]"
    GREEN="\[\\e[0;32m\\]"
    BROWN="\[\\e[0;33m\\]"
    BLUE="\[\\e[0;34m\\]"
    PURPLE="\[\\e[0;35m\\]"
    CYAN="\[\\e[0;36m\\]"
    LIGHTGRAY="\[\\e[0;37m\\]"
    DARKGRAY="\[\\e[1;30m\\]"
    LIGHTRED="\[\\e[1;31m\\]"
    LIGHTGREEN="\[\\e[1;32m\\]"
    YELLOW="\[\\e[1;33m\\]"
    LIGHTBLUE="\[\\e[1;34m\\]"
    LIGHTPURPLE="\[\\e[1;35m\\]"
    LIGHTCYAN="\[\\e[1;36m\\]"
    WHITE="\[\\e[1;37m\\]"
    export PS1="\n${WHITE}-${BROWN}\t${WHITE}- ${BROWN}\H${WHITE}:${LIGHTGRAY}\w${WHITE} :: ${BROWN}\u ${WHITE}% ${RESET}"
    
    # env variables
    export EDITOR=nano
    export LC_ALL=ru_RU.utf8

    image

  • I don't understand the question.

  • DamianDamian Member
    edited February 2012

    @Naruto: This has a good explanation at the beginning of the document: http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html

  • For anybody needing it. Bash $PS1 Generator: http://www.kirsle.net/wizards/ps1.html ;-)

  • Steve81Steve81 Member
    edited February 2012

    root
    PS1='${debian_chroot:+($debian_chroot)}[\033[01;31m]\h[\033[01;34m] \W \$[\033[00m] '

    user
    PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[01;34m] \w \$[\033[00m] '

    image

  • IndicIndic Member
    edited February 2012

    @japon said: For anybody needing it. Bash $PS1 Generator: http://www.kirsle.net/wizards/ps1.html ;-)

    This is cool. :)

  • I use the common one generated by debian

  • Same as @yomero

  • WilliamWilliam Veteran
    edited February 2012

    i use the one that came with my Macs Terminal now also for my servers.

    PS1='${debian_chroot:+($debian_chroot)}\u@[\033[00m][\033[01;31m]\h[\033[00m]:[\033[01;33m]\w[\033[00m]\$ '

    http://zeyuu.net/i/4f35f1aa11db8885554959.png

  • MrAndroidMrAndroid Member
    edited February 2012

    I just use the one that comes with OS X.

    $PS1="\h:\W \u\$"

    Now I use
    PS1="[$(tput bold)][$(tput setaf 3)]\u@\h (\w) ]\$ [$(tput sgr0)]"

Sign In or Register to comment.