Javatpoint Logo
Javatpoint Logo

How To Access Windows Shared Folder From Ubuntu

This article will guide you on how to access a Windows-shared folder from an Ubuntu Machine. Before diving into the guide let us understand what is a window shared folder and about Samba software.

What is a Windows Shared Folder?

A Windows shared folder in Ubuntu refers to a folder or directory on a Windows machine that is shared over a network and can be accessed from an Ubuntu system. The Windows shared folder can contain files, documents, media, or any other type of data that the user wants to share with other users on the network.

Ubuntu is a Linux-based operating system, and Windows is a proprietary operating system developed by Microsoft. Sharing files between these two different operating systems can be challenging, but fortunately, it is possible to share files and folders between them using the Samba software package.

What is Samba Software?

Samba is an open-source software package that provides file and print services between Linux and Windows machines. It enables Ubuntu users to access Windows-shared folders as if they were local directories on their Ubuntu system. By using Samba, Ubuntu users can easily browse, read, write, and modify files and folders on a Windows machine, without having to switch to Windows or use any other software.

The user must know the IP address of the Windows computer as well as the name of the shared folder in order to access a Windows shared folder from Ubuntu. Once these details are known, the user can use the "mount" command in Ubuntu to mount the shared folder as a local directory, and then browse and access the files and folders in it. This software makes it easy to share files and collaborate between different operating systems.

Steps for accessing Windows shared folder from an Ubuntu machine.

Step 1: Check Windows Sharing Settings

Before accessing a Windows shared folder from Ubuntu, ensure that the shared folder is correctly configured in Windows. On your Windows computer, launch File Explorer, find the folder you wish to share, right-click on it, choose "Properties," and then click the "Sharing" tab. Make sure the folder is shared, and make a note of its name.

Step 2: Install Samba

To use Samba, you will need to install it on your Ubuntu machine if it isn't already installed. To accomplish this, launch a terminal window and enter the following command:

The terminal will indicate that Samba is already the most recent version if it is already installed on your machine.

Step 3:

Identify the Windows computer whose IP address is the folder's shared location. The Windows computer's command prompt can be opened by typing "ipconfig" to accomplish this. Look for the "IPv4 Address" line and note down the IP address.

Step 4:

Create a mount point on your Ubuntu system. This is the location where the shared folder will be mounted. To create a mount point, open a terminal window and enter the following command:

This command will create a new directory called "windows" in the "/mnt" directory.

Step 5:

Mount the Windows shared folder on the Ubuntu system. To do this, enter the following command in the terminal window:

Replace "IP_ADDRESS" with the IP address of the Windows machine and "FOLDER_NAME" with the name of the shared folder that you want to access. Also, replace "USERNAME" and "PASSWORD" with the username and password that you use to log in to the Windows machine.

For example, if the IP address of the Windows machine is "192.168.1.100" and the name of the shared folder is "shared", and the username is "user" and the password is "pass", the command would look like this:

Step 6:

Check that the shared folder is mounted correctly. To do this, navigate to the "/mnt/windows" directory using the file manager or the terminal window. If the folder is mounted correctly, you should see the contents of the shared folder.

Step 7:(Optional)

Make the mount point persistent. By default, the mount point will only be available until the system is restarted. To make the mount point persistent, you need to add an entry to the "/etc/fstab" file. Open the file with the following command:

Add the following line at the end of the file:

Replace "IP_ADDRESS", "FOLDER_NAME", "USERNAME", and "PASSWORD" with the appropriate values. Save the file and exit the editor.

The next time you restart the Ubuntu system, the shared folder will be automatically mounted at the specified mount point.

Don't forget to unmount it after the completion of access to the folder.

Summary

In conclusion, accessing a Windows-shared folder from Ubuntu can be done by installing Samba, finding out the IP address of the Windows machine, creating a mount point, mounting the shared folder, checking the mount point, and optionally making the mount point persistent. These steps should enable you to access and use the shared folder from your Ubuntu system. Hope you understood this topic.







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA