Sunday, June 23, 2019

Tip: How to copy file(s) from Ubuntu to Windows 10

The following is the step by step instruction to copy file(s) from Ubuntu to Windows 10 using the WSL windows feature. Assuming that you have WSL and Ubuntu installed in your windows 10 machine.

1. Open up a command prompt with admin privilege.
2. Type "wsl" to enter the Ubuntu default Linux system.
3. use the following command to copy file:
                cp UBUNTU_FILES_OR_DIR WINDOWS10_DIR -r
                example: cp opencv-4.0.0/build/CMakeFiles /mnt/c/Temp -r

From the example, notice the use of /mnt to access to Windows 10 file system. "c" means c drive.

Tip: For guaranteed network drive map/access using "Net Use"

The following script can be used to map a network drive or to access a folder in a network drive such as NASH or File Server