how to activate conda in linux code example

Example 1: list conda environments

conda info --envs

conda env list

Example 2: how to make a conda environment

conda create --name myenv
#to activate environment:
conda activate myenv

Example 3: how to activate conda environment on linux terminal

conda create --name <env_name> #this creates the environment
conda activate <env_name> #this activates the environment

#if conda activate <env_name> does not work then try the following
source ~/anaconda3/etc/profile.d/conda.sh
conda activate <env_name>