下载对应链接的安装文件

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

执行安装文件

sh Miniconda3-latest-Linux-x86_64.sh

如果不希望每次登录都启动base环境,执行以下命令

conda config --set auto_activate_base false

更换国内镜像,修改~/.condarc

channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
auto_activate_base: false

然后清除下缓存使得配置生效

conda clean -i