If you are searching for compatible and open-source software for accessing and sharing files, folders, and other data, then come across the Samba share. It provides a cross-platform adaptable environment between Windows and other systems. As a requirement to access Samba Share on Windows, users must have Samba already installed and configured properly.
In this tutorial, I have outlined every ins and outs of how to access Samba Share from Windows. So, go over it, try accessing Samba Share from your Windows, and leverage the benefits of this interoperable service.
Process flow chart to access Samba share on Windows:
[Windows Used Throughout the Tutorial: Windows 10]
You can easily access Samba Share from Windows only employing some compact and effortless steps. Here, I am going to introduce two types of methods that will help you to access the Samba share.
In the following section, I will show two cases of GUI (Graphical User Interface) for accessing Samba Share from Windows.
To access Samba Share using File Explorer follow the manual procedure shown below:
- Press WIN+E or you can click on the Folder icon like the image below to open File Explorer:
- Enter the path of the Samba share in the address bar like the format below and click ENTER:
Here, ‘192.168.231.128’ is my system’s IP address, and ‘sambashare’ is the folder I want to share.
- Now, enter your network credentials when prompted to you and click OK.
- Once done with the connection, you can access all the shared files and folders inside the shared one. Following the above steps, I can access the new_samba folder inside the Samba share.
Map Network Drive is another way of accessing Samba Share. Follow the below steps to exercise it:
- Go to File Explorer and click on Map network drive under the Computer tab like the following image:
- Now, choose a Drive, enter the path for the Samba share and click Finish. From the image, you can see that I have chosen drive B: for my desired Samba share.
- If there prompts the credential requirements, then provide your username and Samba password. After this, you can see that the Samba shared folder has been mapped to the selected drive.
- Now, double-click on the new drive and you can access the files and folders inside the Samba share. From the snapshot above, you can see that I can access my new_samba folder inside sambashare.
Below two different cases of ‘Command line shell’ for accessing Samba share from Windows will be demonstrated:
To access the Samba shares’ contents from the command prompt follow the steps below:
- Press WIN+R, type cmd and hit ENTER. You will prompt to the command line interface.
- Now, write the following command in the command prompt to connect to the Samba share:
net use P: \\192.168.231.128\sambashare /user:nadiba 1234
- You will find then that the Samba share has been mapped to the assigned drive letter like the following image: Thus, you can access the Samba shares’ contents.
If the given credentials are correct, you will see ‘The command completed successfully.’ like the above image.
You can also access Samba shares from PowerShell by following the given steps:
- First, open PowerShell and write the following command to create a new drive:
New-PSDrive -Name A -PSProvider FileSystem -Root \\192.168.231.128\sambashare -Credential (Get-Credential)
- Now, you will be prompted to a new window to provide the Samba username and password. Provide the requirements and click OK. You can see in the following screenshot that the Samba share has been mapped to the specific drive you chose.
- Now, you can navigate to the drive whenever you want by running the command below:
After navigating to the new Samba drive you can interact with the contents in the Samba share.
While accessing Samba share from Windows, you have two options- using GUI or command line shell. Let’s make a comparative analysis between these two methods:
Overall, both methods are preferable with their individual specifications. Which method to choose totally depends on the user’s preference, experience level, and individual perspective.
How to Open PowerShell
There are several ways to open PowerShell in Windows. I have mentioned three easy processes below:
- Open PowerShell Using File Explorer: Press WIN+E and type powershell in the address bar and tap ENTER.
- Open PowerShell Using Run Dialog: Press WIN+R, write powershell, and click OK.
- Open PowerShell Using Start Menu: Click on the Start menu at the bottom-left of the screen, scroll and expand the Windows PowerShell folder, and then click on the ‘Windows PowerShell’ option. All of these three processes will open the PowerShell application in your Windows like the above image.
How to Perform Several Tasks on Samba Drive Using PowerShell
Using PowerShell you can view the listed contents, add new items, or remove the whole Samba drive. Follow the detailed execution mentioned below:
1. List Contents
After navigating to the assigned Samba drive, you can list all the contents inside the Samba share using the command below:
You can see from the image that I have navigated to drive A and can see the new_samba folder inside sambashare folder.
2. Create New Items
To create new files in a mounted Samba drive use the command below:
You can see a new file ‘samba.txt’ has been added to the new_samba folder inside Samba drive.
New-Item -ItemType File -Path A:\new_samba\samba.txt
3. Remove Drive Mapping
Once done accessing Samba share, you can remove the mapped Samba drive using the following command:
Remove-PSDrive -Name A
Also, you can check if the drive has successfully been removed or not by running the syntax below:
From the above image, it is clear that the drive ‘A’ is removed successfully.
Get-PSDrive -Name A
Samba share integrates collaboration in mixed operating systems. So, to confirm seamless access to Samba share from Windows you must configure the Samba server and set permissions properly. Also, ensure that Windows and Linux machines are on the same network.
People Also Ask
- How to Share Files between Linux and Windows
- How to Configure NFS Server in Linux? [5 Steps]
- How to Access Shared Folder in Ubuntu [2 Methods]
- How to Install and Configure Samba Server in Ubuntu? [4 Steps]
- How to Copy File from Windows to Linux Using SSH [2 Methods]
- How to Share Files between Linux and Windows Dual Boot [3 Methods]