0 min
0

配置树莓派 4

配置树莓派 4 开发环境

  • #linux
  • #devops
  • #raspberry pi

安装 Neovim

terminal
sudo apt updatesudo apt install git cmake ninja-build gettext libtool libtool-bin autoconf automake \    pkg-config unzip curlgit clone --depth 1 https://github.com/neovim/neovim.git -b release-0.11cd neovimmake CMAKE_BUILD_TYPE=Releasesudo make install

安装 Docker 与 Docker Compose

terminal
curl -fsSL https://get.docker.com | shsudo usermod -aG docker $USERnewgrp dockersudo apt-get updatesudo apt-get install -y docker-compose-plugindocker compose version

配置 Git

选项 1:使用 GitHub CLI

terminal
sudo apt install ghgh auth login

选项 2:使用 Git SSH

  • 生成 SSH 密钥
terminal
ssh-keygen -t ed25519 -C "your_email@example.com"
  • 将 SSH 密钥添加到 ssh-agent
terminal
eval "$(ssh-agent -s)"ssh-add ~/.ssh/id_ed25519
  • 将公钥复制到 GitHub
terminal
cat ~/.ssh/id_ed25519.pub
复制终端中的完整输出,打开 GitHub → Settings → SSH and GPG keys → New SSH key 并粘贴。
  • 测试连接
terminal
ssh -T git@github.com
若看到如下信息,即表示已成功配置!
Hi username! You've successfully authenticated, ...

参考资料

>Newsletter

Stay Updated

Get notified when I publish new articles, tutorials, and project updates. Subscribe for insights and actionable content.