Answer the question
In order to leave comments, you need to log in
How to properly colorize in SSH terminal on Ubuntu Server (.bashrc)?
I log into the Ubuntu 14.04 server via SSH Putty.
The terminal immediately gives the colors of the command line as follows:
I immediately run the following command (the color of the time changes itself, I do nothing (!!)) - I enter forcibly from under the same user via SU - the terminal changes colors (as it should be):
Now Questions:
1. Why is the necessary directive PS1 in ./bashrc not immediately processed during login?
2. Initial prompt (with clock) where does ./bashrc come from?
Answer the question
In order to leave comments, you need to log in
1. Because when logging in, ~/.bash_profile or ~/.profile is read. Usually they have lines like this: (in my ~/.profile)
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question