305-300 · Question #75
What is the purpose of the command vagrant init?
The correct answer is C. It creates a Vagrant configuration file. The command vagrant init is used to initialize the current directory to be a Vagrant environment by creating an initial Vagrantfile if one does not already exist. The Vagrantfile contains the configuration settings for the Vagrant box, such as the box name, box URL, network…
Question
Options
- AIt executes a provisioning tool in a running box.
- BIt starts a Vagrant box.
- CIt creates a Vagrant configuration file.
- DIt installs Vagrant on a Linux host.
- EIt downloads a Vagrant box.
How the community answered
(31 responses)- A10% (3)
- B6% (2)
- C77% (24)
- D3% (1)
- E3% (1)
Explanation
The command vagrant init is used to initialize the current directory to be a Vagrant environment by creating an initial Vagrantfile if one does not already exist. The Vagrantfile contains the configuration settings for the Vagrant box, such as the box name, box URL, network settings, synced folders, provisioners, etc. The command vagrant init does not execute any provisioning tool, start any box, install Vagrant on a Linux host, or download any box. Those actions are performed by other Vagrant commands, such as vagrant provision, vagrant up, vagrant install, and vagrant box add, respectively.
Topics
Community Discussion
No community discussion yet for this question.