Ubuntu的软件源配置和管理工具

Node.js

  • 全局修改

    淘宝镜像 --registry=https://registry.npmmirror.com
    https://npmmirror.com/

    sudo npm config set registry https://registry.npmmirror.com
  • 第三方软件切换 node.js 镜像源 nrm

    # 安装
    sudo npm install -g nrm
    # 列出可用的镜像源
    nrm ls
    # 选择 taobao 镜像源
    nrm use taobao
    # 测试镜像源访问速度
    nrm test taobao

Yarn

  • 全局修改

    sudo yarn config set registry https://registry.npm.taobao.org/
  • 第三方软件切换 yarn 镜像源 yrm

    # 安装
    sudo npm install -g yrm
    # 列出可用的镜像源
    yrm ls
    # 选择 taobao 镜像源
    yrm use taobao
    # 测试镜像源访问速度
    yrm test taobao

pip3

参考

yarn 国内加速,修改镜像源