Conda env name in front of username

Viewed 90

I wonder how conda puts the env name in front of the username in the command prompt when I activate the env. In the image below, I activated an env named tf, and the command prompt changed. Can I achieve this by setting some environment variables? enter image description here

1 Answers

You can achieve this by setting the PS1 environment variable:

export PS1="(tf) $PS1"

Here you can find some more information about the customization of the prompt in general.

Related