Mount network drive as physical drive
Is there a way to mount a network location so that it appears as a local physical disk? e.g. \\computer\share as D: (not a network drive)
11 Answers 11
Are you sure this is really what you want to do? There’s a very good article on why this is a bad bad bad idea over at Joel on Software (see point #3).
The concluding statement is:
Conclusion: the next time someone tries to sell you a programming product that lets you access network resources the same was as you access local resources, run full speed in the opposite direction.
If you want to know why, read the relevant parts of the article.
And the short answer to your question is: No. Not easilly, and the reason is that a local disk is expected to have all sorts of functionality that a network share does not. A local disk expects a local file system (NTFS/FAT/etc), which a network share does not have (Well, it does, but at the server it’s hosted on, not your location), as well as a whole host of other features that just can’t be safely or reliably replicated (see the linked artical).
Yes, this is possible in Windows Vista and in Windows 7.
Open the Command Prompt as an administrator. Then type the following command:
This will create a «symbolic link» on Drive C called LinkName , which will link to LocationName on \\NetworkLocation . Windows will, of course, know that this is a symbolic link, but will treat it as if it were a folder on the local drive. All applications will treat this symbolic link as a local resource.
I’m assuming you’re using Windows, but you don’t say which version. In any case, in Windows Explorer in the Tools menu select Map Network Drive. If you’re on Vista, for example, which hides the menus, just press and release the Alt key to show the menus.
You can also use the SUBST command:
You can mount a network drive as a virtual physical disc using the iSCSI protocol to access an iSCSI server — for example, you can set one up using Free NAS — Google it for more info.
If you want to script it, use the NET USE command:
I used Alderbury answer in order to save my microsoft onedrive files to a nas wd my cloud and it works. I have a windows 10 PC. Microsoft onedrive will only save to folders on the c:\ drive and not a network drive.
Yes, this is possible in Windows Vista and in Windows 7.
Open the Command Prompt as an administrator. Then type the following command:
This will create a «symbolic link» on Drive C called LinkName , which will link to LocationName on \NetworkLocation . Windows will of course know that this is a symbolic link, but will treat it as if it was a folder on the local drive. All applications will treat this symbolic link as a local resource.
The suggestion of mklink /D C:\LinkName \NetworkLocation\LocationName actually works. This is how I made it work:
I first mapped by network drive as Z: . To do this right click on the network drive and you will see «Map network drive» as an option. If you do not open the network drive and create on it the folder in which you want to store Onedrive for Business. Then right click on the folder and map it to drive Z:, or any other you want.
Next, run CMD as administrator. In the command prompt box that comes up type mklink /D C:\ Z: (the spaces are needed). You will now see a file on c:\ named LinkName.
Open that file and you will see a file with the same name as the directory you mapped as drive Z: . Right click on that and click on Properties. Under the general tab you will see at the bottom attributes. If Read-only, or any other box, is highlighted, or checked, click on it to clear it. Then click apply.
You can now go to Onedrive for Business and choose as the location the folder within C:\Linkname that is the mapped network drive.
I hope this is easy to follow.
I found a solution using thisDokan
You can mount a network share as a drive, and then share it as usual. Works perfectly.
As of Windows 10, you just have to right click the network and click «connect the drive» (just above «cut»).
It will set a letter (D:, E: or else) and it will appear just as a local drive.
If you just want your files somewhere else, but don’t actually need to access them from many locations simultaneously, you can save a virtual drive in the shared folder and use some software to mount it as a local physical drive.
It will behave as a local drive, all software will recognize it as such, but it won’t consume space on your local hard drives. If you actually need to access those files from two or more locations at once, go for hardlink, as others already well explained.
Original text before editing:
I have an application that requires the files to be saved locally, but due to its gigantic space consumption I have to leave it on the server. I simply saved a virtual drive in a shared folder and mapped it using Daemon Tools. Works like a charm, and is recognised as local storage.
*It is fast, because of the gigabit network, but not completely reliable, though. You may lose critical data or corrupt the virtual drive’s file. To prevent this, you can use the «Offline folder» option, but as it saves a copy of the files locally, it may consume a lot of space, which makes it impossible to use in cases like mine.
How to mount network Volume in Docker for Windows (Windows 10)
We’re working to create a standard «data science» image in Docker in order to help our team maintain a consistent environment. In order for this to be useful for us, we need the containers to have read/write access to our company’s network. How can I mount a network drive to a docker container?
Here’s what I’ve tried using the rocker/rstudio image from Docker Hub:
docker run -d -p 8787:8787 -v //c/users/
This does not work (where P is the mapped location of the network drive): docker run -d -p 8787:8787 -v //p:/home/rstudio/foobar rocker/rstudio
This also does not work: docker run -d -p 8787:8787 -v //10.1.11.###/projects:/home/rstudio/foobar rocker/rstudio
I’m relatively new to Docker, so please let me know if I’m not being totally clear.
3 Answers 3
I know this is relatively old — but for the sake of others — here is what usually works for me. for use — we use a windows file-server so we use cifs-utils in order to map the drive. I assume that below instructions can be applied to nfs or anything else as well.
first — need to run the container in privileged mode so that you can mount remote folders inside of the container ( —dns flag might not be required)
docker run —dns -p 8000:80 —privileged -it
now, (assuming centos with cifs and being root in the container) — hop into the container and run:
install cifs-utils if not installed yet
yum -y install cifs-utils
create the local dir to be mapped
mkdir /mnt/my-mounted-folder
prepare a file with username and credentials
echo «username= » >
/.smbcredentials
echo «password=
map the remote folder
mount -t cifs -o iocharset=utf8,credentials=/root/.smbcredentials,file_mode=0777,dir_mode=0777,uid=1000,gid=1000,cache=strict
How do I mount a remote Linux folder in Windows through SSH? [closed]
Want to improve this question? Update the question so it’s on-topic for Stack Overflow.
Closed 8 years ago .
I’m a blind student currently in a system admin/shell programming class. Although ssh works fine for executing commands like ls, pwd, etc editors do not work well with my screen reader and an ssh session. I was wondering if it is possible to mount a Linux folder over ssh so it appears as a windows drive? This way I could edit any files I needed to with accessible software and not have to constantly use SCP to send files back and fourth.
10 Answers 10
Back in 2002, Novell developed some software called NetDrive that can map a WebDAV, FTP, SFTP, etc. share to a windows drive letter. It is now abandonware, so it’s no longer maintained (and not available on the Novell website), but it’s free to use. I found quite a few available to download by searching for «netdrive.exe» I actually downloaded a few and compared their md5sums to make sure that I was getting a common (and hopefully safe) version.
Update 10 Nov 2017 SFTPNetDrive is the current project from the original netdrive project. And they made it free for personal use:
We Made SFTP Net Drive FREE for Personal Use
They have paid options as well on the website.
Dokan looks like a FUSE and sshfs implementation for Windows. If it works as expected and advertised, it would do exactly what you are looking for.
(Link updated and working 2015-10-15)
The best an easiest solution I found is https://github.com/billziss-gh/sshfs-win, connected servers shows up as a fully functioning network drives. This is not a ‘Dokany’ or ‘dokan’ based solution which from experiance seems more stable and performant, also see WinFsp Performance Testing.
Please note previously this answer stated, https://github.com/Foreveryone-cz/win-sshfs and before that http://www.swish-sftp.org/ but I no longer use any of them, first one stopped working second one created drives not fully supported in all programs.
Take a look at CIFS (http://www.samba.org/cifs/). It is a virtual file system you can run on your linux machine that will allow you to mount folders on your linux machine in windows using SMB.
CIFS on linux information can be found here: http://linux-cifs.samba.org/
You need to mount a remote share on your windows machine. This is what Samba/smb is for.
What you’ll be doing is turning your Linux box into an SMB server, which lets it share files in a way that plays nice with Windows.
If you’re not on the same network, you’ll need to tunnel this through your SSH connection which may not be worth the effort.
it’s iffy, but it works, and it’s free
I don’t think you can mount a Linux folder as a network drive under windows having only access to ssh. I can suggest you to use WinSCP that allows you to transfer file through ssh and it’s free.
EDIT: well, sorry. Vinko posted before me and now i’ve learned a new thing 🙂
Apparently the free NetDrive software from Novell can access SFTP file servers.
Second David’s answer below: I needed to mount a network drive automatically when users logged in. Dokan SSHFS is a nice tool, but wasn’t reliable enough in this case. The copy of Netdrive I found didn’t support SSHFS or sftp — not sure if a more recent one does.
The solution I’m trialling now involves adding a virtual network adapter (with file sharing disabled), using plink to open a tunnel via the new adapter to the remote machine running SAMBA, and mounting the network drive against the new adapter. There’s another useful tutorial here http://www.blisstonia.com/eolson/notes/smboverssh.php.
The tunnel and network drive can be set up with a login script, so a few seconds after login users can use the mapped drive without needing to take any action.








