LinuxCommandLibrary

vagrant-version

Display Vagrant software version

TLDR

Display the currently installed version and latest version of Vagrant that is currently available

$ vagrant version
copy

Display version
$ vagrant --version
copy

SYNOPSIS

vagrant version [--machine-readable] [--help]

PARAMETERS

--machine-readable
    Outputs the version information in a structured, machine-readable format. This is particularly useful for scripting and automation where parsing human-readable output would be cumbersome.

--help, -h
    Displays a help message for the version subcommand, detailing its usage and available options.

DESCRIPTION

The vagrant version command is a fundamental subcommand of the Vagrant command-line interface (CLI) tool. Its primary purpose is to display the currently installed version of Vagrant on the system. Beyond just the main Vagrant application version, it typically provides a comprehensive overview that includes the versions of any installed Vagrant plugins. In some cases, it might also offer insights into the version of the underlying virtualization provider (such as VirtualBox or VMware) that Vagrant is configured to use.

This command is invaluable for various reasons: it aids in debugging compatibility issues between different Vagrant versions, ensures that a user is running the desired or required version for a specific Vagrantfile, and serves as a quick diagnostic tool to verify the health and status of the Vagrant installation. It does not alter any system configuration or state; instead, it provides crucial diagnostic information for system administrators and developers working with Vagrant environments.

CAVEATS

The command you specified, vagrant-version, is not a standard Linux command or a direct Vagrant subcommand. The correct command to check the Vagrant version is vagrant version (note the space). If Vagrant is not installed on your system or not present in your shell's PATH environment variable, executing vagrant version will result in a 'command not found' error. Always ensure Vagrant is properly installed and accessible.

TYPICAL OUTPUT

When run without options, vagrant version typically displays the Vagrant version, the installed provider (e.g., VirtualBox), and a list of installed plugins with their respective versions. For example:

Installed Version: 2.3.4
Latest Version: 2.3.7

VirtualBox Provider: 6.1.4

Installed Plugins:
vagrant-share (1.1.9)

USAGE CONTEXT

This command is frequently used when troubleshooting issues, verifying a new installation, or confirming that the environment meets specific version requirements for a Vagrant project. It helps developers and operations teams maintain consistency across their development and testing environments.

HISTORY

Vagrant, developed by Mitchell Hashimoto, has incorporated the version subcommand as a core utility since its early releases. Its inclusion was essential for users to quickly verify their Vagrant installation, especially as the tool gained popularity and new versions with differing functionalities emerged. Over time, the output of the vagrant version command evolved to include more details, such as installed plugin versions, reflecting the modular nature and extensibility of Vagrant's architecture. This continuous refinement has made it an even more powerful diagnostic tool for the Vagrant community.

SEE ALSO

vagrant(1), vagrant plugin(1), vagrant up(1), apt(8), yum(8)

Copied to clipboard