Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot see any files or folders inside my vagrant root folder in my VM

I hope the title explains my problem but let me give you a little more detail.

I'm setting up my first VM from scratch so I'm pretty new to this all

I've set up my Ubuntu vagrant VM on my Windows host machine and that seems fine, I can ssh on to that machine no problem but then once I've ssh'ed in to it what I'm expecting to see when I type 'ls' is a list of all the files and folders inside of the VM root folder to match the files and folders on my host Windows machine.

The tutorials I've read explain that by default I should see everything inside of my root folder, but I don''t all I see is one file 'postinstall.sh'. There's the 'Vagrantfile' and a folder names 'Code'. Neither of which I can see from within the VM.

Hope that's clear! Hope someone can point me in the right direction.

Regards, Neil

like image 237
Neil Kelsey Avatar asked Mar 11 '15 23:03

Neil Kelsey


1 Answers

I had the same problem working with vagrant in Windows. For some reason the /vagrant file doesn't show up when you LS from inside the VM. you can cd into it though, or at least I could. All your files should be in there. To add to the confusion you may have noticed that you start in a directory called vagrant. That's not the right one though- there is a /vagrant file within it. try cd /vagrant then ls and you should see all your files.

EDIT:

This answer will work to help you find the shared folder, but my initial explanation is incorrect. There is not a /vagrant folder in the initial directory. you need to go to the root of your project to see the folder called vagrant. cd / will take you to where you can see it by lsing or you can go straight to it by typing cd /vagrant.

like image 124
Micah.Fay Avatar answered Nov 15 '22 10:11

Micah.Fay