Skip to content

Raspberry Pi

Prompt

  • Add to .bashrc
  • Change prompt when user connect from ssh session
prompt
1
2
3
4
5
6
7
if [ -n "$SSH_CONNECTION" ]; then
    if [ "$EUID" -eq 0 ]; then
        PS1='🍓\[\e[1;41m\][ROOT SSH \u@\h]\[\e[0m\] \w # '
    else
        PS1='🍓\[\e[1;31m\][SSH \u@\h]\[\e[0m\] \w \$ '
    fi
fi