Score:0

Bash Prompt only shows base

nf flag

When I ssh to a server I always use, the prompt only shows 'base':

(base)

And thats it, not even a $ sign or directory/username. I understand the base refers to the base conda environment but Im not sure why nothing else is shown. How can I get other info shown there?:

(<conda environment>) [<username>@<server name> <directory>] $

Thanks!

hr flag
What is your login shell on the server? In which startup file is the conda environment activated?
cookiemonster avatar
nf flag
Its bash, I dont activate any conda environment unless I need it specifically.
Score:1
US flag

Had same issue as OP.

I feel like the answer and comments above in fact do not really answer the question. OP does not appear to be annoyed about that the environment name is preprended to the prompt. Merely that it's the only information there.

For me this command helped:

conda init bash

... followed by restarting bash or logging in / out.

(source: https://github.com/conda/conda/issues/11885)

Hope this helps.

Score:1
cn flag
Ray

When you log in, this:

base

is shown because the conda environment is being activated automatically. Other information is being overriden at the moment. Try setting it so that it does not activate automatically -- that might solve your problem.

In the home directory, create a file ~/.condarc . And add this line to the file with your favourite editor:

auto_activate_base: false

Log out and log back in. (base) should disappear. Now, activate an environment -- I think you should get what you desire, which is:

 (<conda environment>) [<username>@<server name> <directory>] $
cookiemonster avatar
nf flag
It worked only once. Once I quit the terminal and re-launch it, ssh and activate an environment, only the (base) part is shown again
cn flag
Ray
You're creating this `~/.condarc` file on the server, right? Sorry if I wasn't clear -- it should be on the server and not the client. If you change accounts while connected (i.e., let's say you `sudo` while you connect to the server), you'll have to create the same `~/.condarc` in that root user's home directory.
cn flag
Ray
Regarding your comment above, `auto_activate_base` is `true` by default. So, the base conda environment is auto-activating (as the name implies) by default unless you explicitly switch it off...
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.