2013-09-03 18:08:28 +00:00
|
|
|
---
|
2016-01-19 18:08:53 +00:00
|
|
|
layout: "docs"
|
2013-09-06 16:50:43 +00:00
|
|
|
page_title: "Up and SSH - Getting Started"
|
2013-09-03 18:08:28 +00:00
|
|
|
sidebar_current: "gettingstarted-up"
|
2016-01-19 18:08:53 +00:00
|
|
|
description: |-
|
|
|
|
It is time to boot your first Vagrant environment. Run the following from your
|
|
|
|
terminal - "vagrant up"
|
2013-09-03 18:08:28 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Up And SSH
|
|
|
|
|
2016-01-19 18:08:53 +00:00
|
|
|
It is time to boot your first Vagrant environment. Run the following from your
|
|
|
|
terminal:
|
2013-09-03 18:08:28 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
$ vagrant up
|
|
|
|
```
|
|
|
|
|
2016-01-19 18:08:53 +00:00
|
|
|
In less than a minute, this command will finish and you will have a
|
|
|
|
virtual machine running Ubuntu. You will not actually _see_ anything though,
|
2013-09-03 18:08:28 +00:00
|
|
|
since Vagrant runs the virtual machine without a UI. To prove that it is
|
|
|
|
running, you can SSH into the machine:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ vagrant ssh
|
|
|
|
```
|
|
|
|
|
|
|
|
This command will drop you into a full-fledged SSH session. Go ahead and
|
|
|
|
interact with the machine and do whatever you want. Although it may be tempting,
|
|
|
|
be careful about `rm -rf /`, since Vagrant shares a directory at `/vagrant`
|
|
|
|
with the directory on the host containing your Vagrantfile, and this can
|
|
|
|
delete all those files. Shared folders will be covered in the next section.
|
|
|
|
|
|
|
|
Take a moment to think what just happened: With just one line of configuration
|
|
|
|
and one command in your terminal, we brought up a fully functional, SSH accessible
|
2016-03-31 18:36:16 +00:00
|
|
|
virtual machine. Cool. The SSH session can be terminated with `CTRL+D`.
|
|
|
|
|
|
|
|
```
|
|
|
|
vagrant@precise64:~$ logout
|
|
|
|
Connection to 127.0.0.1 closed.
|
|
|
|
```
|
2013-09-03 18:08:28 +00:00
|
|
|
|
2016-01-19 18:08:53 +00:00
|
|
|
When you are done fiddling around with the machine, run `vagrant destroy`
|
|
|
|
back on your host machine, and Vagrant will terminate the use of any resources
|
|
|
|
by the virtual machine.
|
2014-12-19 15:38:56 +00:00
|
|
|
|
2016-01-19 18:08:53 +00:00
|
|
|
-> The `vagrant destroy` command does not actually remove the downloaded box
|
|
|
|
file. To _completely_ remove the box file, you can use the `vagrant box remove`
|
|
|
|
command.
|
|
|
|
|
|
|
|
## Next Steps
|
|
|
|
|
2016-05-21 01:58:43 +00:00
|
|
|
You have successfully created and interacted with your first Vagrant
|
2016-01-27 07:43:58 +00:00
|
|
|
environment! Read on to learn more about
|
2016-01-19 18:08:53 +00:00
|
|
|
[synced folders](/docs/getting-started/synced_folders.html).
|