使用root用户登录 su root
更换apt 下载源为清华源,先备份原来的源
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
vim /etc/apt/sources.list
替换为下面连接里的代码
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
更新apt配置sudo apt-get update
下载ssh服务器 sudo apt-get install openssh-server
开启 ssh sudo sshd start
,或者在设置界面直接开启remote
ssh hid@192.168.1.109
yes
填密码
exit # 退出
VScode远程登陆
VScode连接docker
点击连接远程服务器后,选择Linux,输入密码,然后再新窗口的扩展中选择安装docker
自动保存代码
设置——>搜索 “auto save”