0

I'm still running bash on MacOS Catalina 10.15.5 (19F101). Sorry.

Recently, I don't know why, the prompt in my bash sessions is acting up. There appears at the start of every prompt the string (base):

(base) MyComputer:~ myname$

The result of cat /etc/bashrc is:

# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
   return
fi

PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize

[ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM"

I don't see anything related in /etc/bashrc_Apple_Terminal.

The result of echo $PS1 is:

(base) \h:\W \u\$

I have no local ~/.bashrc, and the result of grep 'PS1' ~/.* is empty, notwithstanding grep errors. That is to say, I'm not setting the PS1 variable in my home directory that I can see. I certainly haven't written code to do so.

I can change the prompt manually in one bash session:

PS1="\h:\W \u\$"

and that works for that session. But a new Terminal tab or window just gives me the (base) prefix once more.

I don't see anything in the preferences panes of the MacOS app Terminal, which is the app I use. Although... I did just launch an xterm and there the prompt is simply bash-3.2$ .

Can somebody help me figure out what is going on?

3
  • 2
    Did you install Anaconda/python recently? Does conda deactivate change anything? Do you have ~/.profile? – nohillside Jul 15 '20 at 17:26
  • Also, check for ~/.bash_profile and ~/.bash_login. – Gordon Davisson Jul 15 '20 at 17:27
  • Also askubuntu.com/q/1026383. – psoft Jul 15 '20 at 18:06
2

Looks like you installed Anaconda/python recently. Run

conda decactive 

to remove the (base) label (and deactivate conda of course).

PS: You may be using zsh instead of bash, so maybe you should look into .zshrc and .zprofile.

1
  • Deactivating anaconda was the trick, thanks! Definitely still on bash. – psoft Jul 15 '20 at 18:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .