Information Technology Reference
In-Depth Information
5. Next, check the contents of
/vagrant/lorem.txt
file with:
# Guest OS (Ubuntu 12.04)
$ cat /vagrant/lorem.txt
6. Create a file within the ssh session with:
# Guest OS (Ubuntu 12.04)
$ echo ipsum > /vagrant/ipsum.txt
7. Close the ssh session with:
# Guest OS (Ubuntu 12.04)
$ exit
8. List the files in the
git-recipes/11-02
directory with:
# Host OS (e.g., Windows, Linux, OS X)
$ ls
The file
ipsum.txt
is available in your host operating system.
9. Check the content of
git-recipes/11-02/ipsum.txt
file with:
# Host OS (e.g., Windows, Linux, OS X)
$ cat ipsum.txt
10. Stop the virtual system with:
# Host OS (e.g., Windows, Linux, OS X)
$ vagrant halt
As you can see, the two files
lorem.txt
and
ipsum.txt
are both available in
your host operating system (e.g., Windows) and the guest operating system (i.e.,
Ubuntu 12.04). This is the easiest way to share the files between the two systems. Later
on we will also use the
$ scp
command to copy the files between both systems.
If you want to synchronize a different folder you can use the following configura-
tion in
Vagrantfile
: