Mounting a shared network drive in Windows
This really confused me at first, and took way too long to figure out. So, I'm dropping a quick how-to here. Just FYI, this is very basic and I may rewrite it later after gathering more information.
A shared network drive is a folder that can be used by any computer on the same network (i.e. WiFi connection). This folder has to be stored on a computer, and this computer must be turned on. If the computer is off, you can't access the network drive. This is because you can't exactly access anything on a computer when it is turned off. :')
This is why you generally want to use a server to go through these steps, because servers are supposed to be constantly turned on. However, when you're just doing homework and will not be using the drive for something practical, we don't need to worry about that.
Step 1: Creating the drive
Technically, the IT lab says to use only the command line -- but the specific task is to mount the network drive using the command line, not create it. So, we're going to use the GUI.
First, you have to create a folder that you want to use. I stored mine in Documents, and I called it awesome_drive.
Then, you need to right-click on the folder, and click on Properties, then the Sharing tab.
Then, click on the Share button.
Click on the drop-down menu, and choose what users (on your machine) you want to be able to access the drive. If you're lazy, choose Everyone. This is a terrible decision from a security standpoint, but we're just running an exercise here, so nobody cares. The only users on my Windows virtual machine are alexc (my main account) and joeMama (a joke account that nobody uses), so both of them will have access to the drive.
Then, click on Share, the icon with the shield. A success message will pop up; confirm it and close it.
Step 2: Mounting the drive
This part is easy, and we have to do it with the command prompt as per the lab specs. We open up cmd and type net use z: \\IT567-WIN-MASQ1\Users\alexc\Documents\awesome_drive into the prompt. IT567-WIN-MASQ1 is the extremely lame and boring name of my computer -- we aren't allowed to be creative with naming in this class -- and the rest of the command is just the file path of awesome_drive. Also, you don't have to use Z: -- you can use any letter drive that's available.
The prompt displays The command completed successfully. Fantastic. The drive is mounted. We are now one step closer to finishing and returning to our mediocre lives.
Now, let's display the root directory. Why do we need to do this? Because that's what the lab spec says, and we are eternal slaves to the lab spec. Also, to paraphrase SnugglyHappyMathTime's differential equations series, because we are sad and lonely mathematicians. Or programmers, or I.T. people, or all of the above.
Fortunately, this is also straightforward: z: & dir . The command z: will move us into the Z-drive that we just mounted. And dir prints out the current directory. And the ampersand links them all together.
Also, these pictures are crap because I screenshotted a VM outside of the VM and I don't feel like re-screenshotting right now.
There we go! We see that the only file inside the directory is joeMama.txt, which is correct:And we're done. Now, everyone on our network has access to Joe Mama.
Now, how to actually see and use the network drive and its contents outside of the host machine itself...that's another step. But I'm not required to do it for my lab, and the due date is fast approaching, so that'll have to wait.
So it's time to return to our mediocre lives.
Links...
To actually understand what a network drive is
And that's all there is for now. :-)
Comments
Post a Comment