How to I start a box with vagrant up using the box name instead of id?

I have the following:

~/code$ vagrant global-status
id       name      provider   state    directory
---------------------------------------------------------------------------
39421e7  homestead virtualbox poweroff /Users/user/Homestead

I try using $ vagrant up homestead but it won’t start. It will only start using the id. The docs say to use either name|id. what is the name I should use?

In order to use the name of the vagrant machine you must be in the vagrant project directory. In this case, it looks like the directory is /Users/user/Homestead. So, you can do something like:

$ cd /Users/user/Homestead
$ vagrant up homestead

Well that’s what I’ve been doing. Also when in that folder you don’t even need the name. The docs say to use [ name | ID ] no mention to navigate to any folder first.

Yep, that’s right. Specifying a name is usually helpful in a multi-machine Vagrant project. For example:

Vagrant.configure("2") do |config|
  config.vm.define "one" do |c|
    c.vm.box = "hashicorp/bionic64"
  end

  config.vm.define "two" do |c|
    c.vm.box = "hashicorp/bionic64"
  end
end

:thinking: The intention on name is specific to working within a Vagrant project. Could you share a link to the documentation in question and I’ll try to push some changes to make it more clear. When working outside of a Vagrant project it is appropriate to use the machine ID.