Win 10 WSL 踩坑日志

Win10 配置 Git SSH

复制 id_rsaid_rsa.pubC:\Users\your_user_name\.ssh\

WSL Ubuntu 切换到阿里镜像

sudo cp /etc/apt/sources.list /etc/apt/sources.list.20200316
sudo vi /etc/apt/sources.list
    :%s/security.ubuntu/mirrors.aliyun/g
    :%s/archive.ubuntu/mirrors.aliyun/g
sudo apt update
sudo apt upgrade

Bash 脚本错误

错误信息

$'\r': command not found

解决方法

sudo apt install dos2unix
dos2unix imp-db.sh
./imp-db.sh

参考资料

Setting up SSH and Git on Windows 10

修改 WSL Ubuntu 18.04 默认源为阿里云镜像

阿里云官方镜像站

How do I fix “$'\r': command not found” errors running Bash scripts in WSL?

你可能感兴趣的:(Win 10 WSL 踩坑日志)