树莓派ubuntu:vscode远程SSH开发调试

使用VSCODE可以SSH连接远程开发板,在开发板上调试开发程序

1. VSCODE安装插件"Remote - SSH"

2. 新建SSH连接配置

例如:ssh ubuntu@192.168.43.102

自动生成的配置文件内容如下:

bash 复制代码
Host 192.168.43.101
  HostName 192.168.43.101
  User ubuntu

添加新的连接后,可能需要重启VSCODE,否则看不到新增的SSH连接

3. 连接SSH

输入密码,点击回车

连接成功,可以像在本机一样编程开发了

4. 执行终端命令

VSCODE远程打开终端,执行编译运行等命令,调试开发更加方便

5. 安装git

将开发板上的源码同步上传到gitee或github,避免开发调试的代码只留在开发板上,造成源码丢失。

5.1 安装
bash 复制代码
sudo apt-get install git

如果出现如下错误,重启ubuntu再执行

bash 复制代码
ubuntu@ubuntu:~/pro/4WD-CAR-PY$ sudo apt-get install git
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2711 (unattended-upgr)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

参照gitee或github去初始化仓库以及上传

复制代码
mkdir test
cd test
git init 
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://gitee.com/zhb32412/test.git
git push -u origin "master"
相关推荐
csdn_aspnet2 小时前
如何将 Cursor MCP 与 VS Code 连接
vscode·cursor·mcp·composio
默默提升实验室3 小时前
Ubuntu 22.04.5 配置静态IP,手动安装SSH
ubuntu
初圣魔门首席弟子5 小时前
TypeScript 类型系统完全指南:从基础到高级工具类型(知识库版)
linux·运维·ubuntu
小杨小杨、努力变强!5 小时前
VS Code运行HBuilder X中的uni-app项目
vscode·uni-app·uni-app run
TARDIS_202021 小时前
VMware配置ubuntu26.04虚拟机桥接
ubuntu
雷工笔记21 小时前
什么是Ubuntu?
linux·运维·ubuntu
suaizai_1 天前
TypeScript 7 正式发布!Vue 暂被 “拒之门外“ !!!
linux·运维·ubuntu
letisgo51 天前
VMware Workstation + Ubuntu 26.04 LTS 小白运维部署手册
linux·运维·ubuntu
游戏开发爱好者81 天前
iOS开发IDE有哪些 Xcode 和 快蝎 轻量替代方案
ide·vscode·ios·个人开发·xcode·swift·敏捷流程
开发者联盟league1 天前
vscode 进入docker容器
vscode·docker