How to find version of Cargo in Rust

What is Cargo?

    Cargo is the Package Manager as well as the Build System for the Rust Programming Language. It comes built-in when you install Rust using rustup.


How to know Cargo version?

  1. Open Terminal/Command Prompt/PowerShell.
  2. Type the command,
    cargo --version

    You should see the version details as follows,

    cargo 1.71.0 (cfd3bbd8f 2023-06-08)

    Note: If you see "command not found: cargo" then make sure that you have rust installed and available in the PATH environment variable.

Rust Cargo Version Example

On the Mac you can make use of the whereis or which command to locate cargo.

Example:

% whereis cargo
cargo: /Users/c2ctech/.cargo/bin/cargo

% which cargo
/Users/c2ctech/.cargo/bin/cargo

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!