20
(base) fedaa@fedaa-Satellite-L50-B:~$ cd molecules/

What does this (base) mean in my terminal prompt?

I just found it and I have no idea what it refers to.

Byte Commander
  • 107,489
Fedaa Ali
  • 303
  • It might e.g. be your current git branch or something like that. Can you type echo "$PS1" in your terminal and add the output to your question? That shows the template of your prompt. – Byte Commander Aug 25 '18 at 20:31

1 Answers1

28
  1. It is most likely that the last program or script that you invoked didn't correctly ended with a new line character.

    Here is a simple example:

    #!/bin/bash
    printf "test"
    

    Copy this content into your editor and save it as a file called test.sh

    Then make it an executable

    chmod 755 test.sh
    

    and invoke it with

    ./test.sh
    

    The output will be

    fedaa@fedaa-Satellite-L50-B:~$./test.sh
    test fedaa@fedaa-Satellite-L50-B:~$
    

    If you add a \n (new line character)

    #!/bin/bash
    printf "who\n"
    

    the result will be

    fedaa@fedaa-Satellite-L50-B:~$./test.sh
    test
    fedaa@fedaa-Satellite-L50-B:~$
    
  2. In case you are using anaconda or the conda environment, look at this link

    https://conda.io/docs/user-guide/getting-started.html

    To see a list of all your environments, type:

    conda info --envs
    

    A list of environments appears, similar to the following:

    conda environments:
    
        base           /home/username/Anaconda3
        snowflakes   * /home/username/Anaconda3/envs/snowflakes
    

    In that case (base) marks you are using the default anaconda environment.

    To deactivate the environment, type

     source deactivate
    

    After recent changes in the functioning of conda package manager , the use of "source deactivate " is being depreciated and support for this command might be ended.

    However

    conda deactivate
    

    is more suitable to be used.

    In newer anaconda releases simply type this conda command in your shell:

     conda config --set auto_activate_base False
    
abu_bua
  • 10,783
  • 3
    To activate it back conda activate – Isuru Jul 22 '19 at 10:57
  • I have this (base) thing going on. Can it be harmful in anyway, or can I continue as usual? – stevec Oct 05 '19 at 14:31
  • This can be problematic when you install packages as they would be installed in base virtual environment. To deactivate is use conda config --set changeps1 False. You can alternatively change it in your /.bashrc or set your own virtual env to get activated. – Kevin May 18 '20 at 20:54
  • Still a great answer in 2023, worked perfectly. – ConnerWithAnE Jan 13 '23 at 06:49