tutorial, ubuntu

Remotely access Ubuntu shared folder as Network Disk from Windows 10


A common need is to remotely access Ubuntu (Linux) shared folders and files from your laptop that has Windows operating systems. The Linux systems are usually remote servers without friendly GUI.

Therefore, this tutorial shows you how to use terminal command lines to configure a folder on Ubuntu server 16.04 LTS to be shared and accessed from a Windows 10 system as Network disk.

Below shows an example of a shared_folder on Ubuntu to be accessed on Windows 10 as network disk Y:.

There are two parts of the setting up:

  1. Set up a shared folder on Ubuntu
  2. Configure to access the shared folder on Windows.

Setup on Ubuntu

We use samba, which is a software that provides access to SMB/CIFS protocols used by Windows, to setup the shared folder on Ubuntu. (You can google to find more information about samba.)

For the settings below, your ubuntu account needs sudo privilege.

1). you need to install samba from terminal:

sudo apt-get install samba

2). add your current ubuntu account to samba (suppose your ubuntu account is sharetest):

sudo smbpasswd -a sharetest

Then it reqires you to setup the password of your account in samba:

3). create your folder to be shared, for example, the folder you share has name shared_folder,

mkdir /home/sharetest/shared_folder

4). configure samba to recognize your shared_folder and grant corresponding read, write and browsing configurations, by editing file smb.conf using vi editor

sudo vi /etc/samba/smb.conf

Go to the end of smb.conf and add the following content (Find out how to use vi editor by yourself if you are not familiar with it.):

The above figure shows the configuration of this specific example, you need to customize your configurations (settings enclosed by <> below) accordingly.

path = <your_shared_folder_path>
available = yes
valid users = <your_account_name>
read only = no
browsable = yes
public = yes
writable = yes

5). restart the samba service

sudo service smbd restart

Setup on Windows

1). Go to your windows file explore and right click on This PC and you can see the dropdown menu as shown below. Left click on Map network drive ....

2). Choose your Drive symbol (in this example, we use Y:). And configure the Folder path of your shared folder in this format:


Then click finish and you can see your shared ubuntu folder is open in your windows file explorer.

All done.

Leave a Reply

Your email address will not be published. Required fields are marked *