首页 > 解决方案 > 如何在 Windows 终端的 debian wsl 中运行 vagrant

问题描述

我想从 Windows 终端在 debian wsl 中运行 vagrant 我已经安装了 vagrant

/mnt/c/HS_DEV/Homestead$ vagrant --version

我明白了

流浪者 2.2.6

所以我试图让 vagrant 起来

我得到了

The executable 'cmd.exe' Vagrant is trying to run was not
found in the PATH variable. This is an error. Please verify
this software is installed and on the path.

所以我试图在 Windows 终端的配置中使用 debian.exe 而不是默认的 cmd.exe。但仍然无法正常工作,是否有人知道如何做到这一点或问题出在哪里。如果您对我的配置有更多疑问,我会回答。

如果我使用 powershell 或 cmd.exe,我也无法工作,而且我也可以使用 gitbash,但我想在我的 debian wsl 中进行

标签: debianvagrantwindows-subsystem-for-linuxhomesteadwindows-terminal

解决方案


首先确定 vagrant.exe 文件所在的位置,即:

/mnt/c/Hashicorp/Vagrant/bin

然后运行:

export PATH="$PATH:/mnt/c/Hashicorp/Vagrant/bin"

推荐阅读