LinuxCommandLibrary

cargo-version

Display version information for Cargo

TLDR

Show Cargo version

$ cargo version
copy
Show verbose version info
$ cargo version --verbose
copy
Short form
$ cargo -V
copy
Verbose short form
$ cargo -Vv
copy

SYNOPSIS

cargo version [options]
cargo -V [v]

DESCRIPTION

cargo version displays the version of Cargo along with build metadata. The default output shows the version number, git commit hash, and build date. With the `--verbose` flag, additional details are shown including the host triple, linked library versions (libgit2, libcurl, SSL), and operating system information.
This command is useful for diagnosing build issues, verifying toolchain installations, and including version information in CI/CD logs and bug reports. It operates entirely offline with no side effects.

PARAMETERS

-v, --verbose

Show additional build metadata
--format-version n
Output format: 1 (legacy JSON), 2 (human-readable, default)

OUTPUT

Default

$ cargo 1.75.0 (1d8b05cdd 2023-11-20)
copy
Verbose
$ cargo 1.75.0 (1d8b05cdd 2023-11-20)
release: 1.75.0
commit-hash: 1d8b05cdd
commit-date: 2023-11-20
host: x86_64-unknown-linux-gnu
libgit2: 1.7.1
libcurl: 7.88.1
ssl: OpenSSL 3.0.11
os: Linux [kernel 6.1.0]
copy

RELATED COMMANDS

rustc --version

Show Rust compiler version
rustup show
Show installed toolchains

CAVEATS

Operates offline with no side effects. Useful for CI/CD and build script checks.

SEE ALSO

cargo(1), rustc(1), rustup(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community