{
  "schemaVersion": "1.0",
  "entity": "BlogPosting",
  "title": "How to Install Rust and Cargo on Ubuntu, macOS, and Windows (2026)",
  "description": "Learn how to install Rust, Cargo, and Rustup on Ubuntu 24.04/22.04 LTS, macOS, and Windows with toolchain management and build configuration.",
  "author": "vd",
  "datePublished": "2026-07-24T00:00:00.000Z",
  "dateModified": "2026-07-24T00:00:00.000Z",
  "tags": [
    "HowTo",
    "Rust",
    "Cargo",
    "Rustup",
    "Linux",
    "Programming"
  ],
  "aeoDirectAnswers": [
    {
      "question": "What are the system prerequisites for installing Rust?",
      "answer": "Before executing the Rust installation script, install the required C compiler and linker build tools for your platform:"
    },
    {
      "question": "How do you install Rust and Cargo via Rustup?",
      "answer": "The official recommended installer for Rust across all operating systems is **Rustup**."
    },
    {
      "question": "How do you manage Rust toolchains and updates?",
      "answer": "rustup allows switching between release channels and target platforms without touching system files."
    },
    {
      "question": "How do you create and run your first Rust project with Cargo?",
      "answer": "Cargo streamlines creating, building, running, and testing Rust applications."
    },
    {
      "question": "Why shouldn't I install Rust using `sudo apt install rustc`?",
      "answer": "Linux distribution repositories package specific, static Rust versions that lag behind current compiler releases. Installing via rustup ensures you get the latest stable tools and can update seamlessly."
    },
    {
      "question": "Is Cargo included when installing Rust via Rustup?",
      "answer": "Yes. Rustup automatically installs rustc (the compiler), cargo (the package manager), rust-std (the standard library), and rust-docs (local documentation)."
    },
    {
      "question": "How do I uninstall Rust completely?",
      "answer": "To remove Rustup, Cargo, and all installed toolchains from your computer, run:"
    },
    {
      "question": "Where are Cargo dependencies (crates) stored locally?",
      "answer": "Cargo caches downloaded dependencies from Crates.io inside $HOME/.cargo/registry/ and $HOME/.cargo/git/. ---"
    }
  ],
  "semanticFactualBody": "Rust is a modern systems programming language empowering developers to build fast, memory-safe, and concurrent software without relying on a garbage collector. Consistently voted among the most loved languages in global developer surveys, Rust powers operating system kernels, WebAssembly modules, CLI utilities, network proxies, and high-performance backend microservices. Installing Rust using **Rustup** (the official Rust toolchain installer) provides access to rustc (the compiler), cargo (the package manager and build system), and clippy (the linter). Whether setting up a development workstation on Ubuntu 24.04 LTS (Noble Numbat), 22.04 LTS, macOS, or Windows, here is the complete 2026 installation guide. *Last updated: July 24, 2026* --- What are the system prerequisites for installing Rust? Before executing the Rust installation script, install the required C compiler and linker build tools for your platform: On Ubuntu / Debian / Linux Mint Open terminal (Ctrl+Alt+T) and install build-essential and development libraries: On macOS Install Command Line Tools for Xcode via terminal: On Windows Download and install the **Visual Studio Community** build tools with the **Desktop development with C++** workload selected, or install **WSL2 (Windows Subsystem for Linux)**. --- How do you install Rust and Cargo via Rustup? The official recommended installer for Rust across all operating systems is **Rustup**. Step 1: Run the Official Rustup Installation Script Execute the following "
}