nerdexam
LPI

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…

Virtualization

Question

What is the purpose of the command vagrant init?

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)
  • A
    10% (3)
  • B
    6% (2)
  • C
    77% (24)
  • D
    3% (1)
  • E
    3% (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

#Vagrant#vagrant init#Vagrantfile#CLI commands

Community Discussion

No community discussion yet for this question.

Full 305-300 Practice