I am very very new to Linux, and when I’m installing anaconda, I noticed that the conda command can only be used after I type “bash” and start using the bash console. What’s the difference between bash and the default terminal?
-rw-r--r--. 1 maarten maarten 773428196 Feb 5 18:41 Anaconda3-2022.10-Linux-x86_64.sh
chmod +x Anaconda3-2022.10-Linux-x86_64.sh
./Anaconda3-2022.10-Linux-x86_64.sh
Im talking about after installing anaconda, I cant use the "conda" command in the terminal, but I have to first type base to get into a bash terminal and then conda command is usableIf you are talking about the following file to install anaconda?
Because the file isn't executable when you download it, by putting bash in front of it will know that it should open a sub-shell toe execute it. You could also just give the file execute permissions and then run it, like this.Code:-rw-r--r--. 1 maarten maarten 773428196 Feb 5 18:41 Anaconda3-2022.10-Linux-x86_64.sh
Code:chmod +x Anaconda3-2022.10-Linux-x86_64.sh ./Anaconda3-2022.10-Linux-x86_64.sh
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
source /opt/anaconda3/bin/activate
Thank you for the reply. I guess what I dont understand is why the "conda" command only works after I first type in "bash" which opens a subprocess inside my main terminal process. Like if I just type conda, itll say command not found, but after I first type bash and it enters the subprocess, I can then type conda itll be able to do whatever that command can do.I am seeing three intertwined topics here:
Does that clarify things?
- TERMINAL: The terminal window is where you can type text commands and see the results.
- The terminal gives you a window to type and see the text.
- The terminal does not "understand" the text.
- SHELL: A shell runs in the terminal window and "understands" the commands that you type.
- The shell is the invisible part that interprets the text and tries to process the commands. The shell also runs shell scripts, which are programs that are run from files with shell commands in them.
- -> A popular shell in Linux is the "bash" shell.
- Other well-known shells are "zsh", the Korn shell, and the older Bourne shell upon which bash is based.
- You can choose a default shell for your terminal window. You can also change shells with a command, without changing the default.
- ANACONDA: Specialized questions related to Anaconda and the need to launch a shell separately so you can type the "conda" command. I can't help with those questions.
I am seeing three intertwined topics here:
Does that clarify things?
- TERMINAL: The terminal window is where you can type text commands and see the results.
- The terminal gives you a window to type and see the text.
- The terminal does not "understand" the text.
- SHELL: A shell runs in the terminal window and "understands" the commands that you type.
- The shell is the invisible part that interprets the text and tries to process the commands. The shell also runs shell scripts, which are programs that are run from files with shell commands in them.
- -> A popular shell in Linux is the "bash" shell.
- Other well-known shells are "zsh", the Korn shell, and the older Bourne shell upon which bash is based.
- You can choose a default shell for your terminal window. You can also change shells with a command, without changing the default.
- ANACONDA: Specialized questions related to Anaconda and the need to launch a shell separately so you can type the "conda" command. I can't help with those questions.
ohhhhh, I just realized why. The default shell of manjaro use ZSH, and conda for some reason only works for bash. Is there a way to configure it to also work in zsh?Thank you for the reply. I guess what I dont understand is why the "conda" command only works after I first type in "bash" which opens a subprocess inside my main terminal process. Like if I just type conda, itll say command not found, but after I first type bash and it enters the subprocess, I can then type conda itll be able to do whatever that command can do.
yay, I just solved! I jusst had to do "conda init zsh"ohhhhh, I just realized why. The default shell of manjaro use ZSH, and conda for some reason only works for bash. Is there a way to configure it to also work in zsh?
yay, I just solved! I jusst had to do "conda init zsh"