[Bash] customize PS1 for ssh session

When you login via SSH several extra environment variables get set. You could use these to supersede PS1 in the .profile file, like this:

if [ -n "$SSH_CLIENT" ]; then
    PS1=...
fi

Leave a Reply

Your email address will not be published. Required fields are marked *