ubuntu安装rust教程

参考【Rust】Linux上安装Rust开发环境

shell 复制代码
sudo apt-get install curl


# 注意,不开代理很可能下不到,一直报403
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup


curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

然后就会弹出来一堆字,选1是不自定义路径(默认设置),因为我是在虚拟机上玩,所以就选一

配置环境变量

shell 复制代码
vim ~/.profile
export PATH="$HOME/.cargo/bin:$PATH
source ~/.profile
rustc --version

vscode插件推荐

  • rust-analyzer
  • Even Better Toml
  • crates
  • Bookmarks
  • Tabnine
  • rust syntax

配置代码格式化
VSCode保存自动格式化代码-Prettier - Code formatter

相关推荐
五月君_2 小时前
Bun v1.3.14 发布,Rust 版即将进 Claude Code 内测,下一版可能就告别 Zig
开发语言·后端·rust
匆匆那年9672 小时前
VSCode 远程 Linux 使用Codex
linux·ide·vscode
SWAGGY..4 小时前
Linux系统编程:(七)Makefile入门:轻松掌握编译自动化
linux·运维·自动化
开开心心就好4 小时前
免费流畅的远程控制实用工具
linux·运维·服务器·网络·智能手机·excel
黑猫学长呀6 小时前
存储宝典第2篇:盲封TT wafer是什么意思?
linux·嵌入式硬件·项目·芯片·ufs·晶圆·产测
Strugglingler6 小时前
【Linux 用户态操作 UART】
linux·uart
代码熬夜敲Q6 小时前
ENSP 网络工程实验
linux·运维·服务器
csdn_life186 小时前
OpenClaw v2026.5.12+ 高级密钥管理:使用SecretRef实现真正的隐蔽存储
linux·openclaw
Terrence Shen7 小时前
Claude Code Harness 源码学习讲义
linux·学习·ubuntu
赵药师7 小时前
dpkg: warning: files list file for package ‘libselinux1:amd64‘ missing;
linux·运维·服务器