Sharing files with windows and linux

How to share files between a Linux and Windows computer

The easiest and most reliable way to share files between a Linux and Windows computer on the same local area network is to use the Samba file sharing protocol. All modern versions of Windows come with Samba installed, and Samba is installed by default on most distributions of Linux.

Create a shared folder on Windows

First, create a shared folder on your Windows machine.

  1. Open the Control Panel.
  2. Go to Network and Sharing Options.
  3. Go to Change Advanced Sharing Settings.
  4. Select Turn on Network Discovery and Turn on File and Print Sharing.

Now, create a new folder to share or choose an existing folder that you’d like to share.

  1. Right-click the folder and select Properties.
  2. Go to the Sharing tab.
  3. Above the Share button is the network name of the share you are creating. It should look like \\YOURCOMPUTERNAME\Users\YourUserName\ShareFolderName. Make a note of this network name to use later on your Linux machine.
  4. Click Share.

Access a Windows shared folder from Linux, using Konqueror

Many Linux distributions use the KDE desktop environment and the Konqueror file manager/browser. If this is what you are using, you can follow these steps to access your Windows shared folder:

  1. Click the K menu icon.
  2. Select Internet ->Konqueror.
  3. In the Konqueror window that opens, click the Network Folders link, or type remote:/ in the address bar and press Enter .
  4. Click the Samba Shares icon.
  5. Click the icon of your Windows Home workgroup.
  6. Click the Workgroup icon.
  7. Click the icon for your computer.
  8. When prompted, enter the username and password for the Windows account that created the share.
  9. Click OK.

Access a Windows shared folder from Linux, using Nautilus

Many Linux distributions, especially those that use the GNOME desktop environment, use the Nautilus file manager. If this is what you’re using, you can follow these steps to access your Windows shared folder:

  1. Open Nautilus.
  2. From the File menu, select Connect to Server.
  3. In the Service type drop-down box, select Windows share.
  4. In the Server field, enter the name of your computer.
  5. Click Connect.

Alternatively, in the Nautilus address bar, you can type smb://ComputerName/ShareName and press Enter . For instance, when you created your Windows Share, if the share name was listed as:

Type smb://YOURCOMPUTERNAME/Users/YourUserName/ShareFolderName and press Enter . Note the smb: at the beginning; in Linux, use forward slashes instead of backslashes.

Access a Windows shared folder from Linux, using the command line

You can also access your Windows share from the Linux command line using the smbclient program.

  1. Open a terminal.
  2. Type smbclient at the command prompt.
  3. If you receive a «Usage:» message, this means smbclient is installed, and you can skip to the next step. If the command is not found, however, you need to install smbclient. Follow these steps to install it.

Источник

How to Mount a Windows Share Folder on Linux

Linux and Windows systems have major differences, with different file systems and protocols in use. Sharing files between them can be difficult, especially because they use two different sharing protocols. That doesn’t mean it’s impossible to mount a Windows share folder on Linux, however. Follow along below to find out how.

Also read: How to View Shared Files and Folders in Windows 10

Share Your Windows Folder

Before you do anything, you need to ensure that Windows has been correctly set up to allow for networking file sharing.

To enable this on Windows, right-click on the network icon in the notifications area of your Windows taskbar. From here, click “Open Network & Internet Settings.”

Under the “Status” category, click “Sharing options.”

In your Windows sharing options menu, make sure that “Turn on network discovery” and “Turn on file and printer sharing” are enabled.

Click the radio buttons next to both options to make sure this is the case.

Click “Save changes” to save your settings. Once this is done, open Windows File Explorer and locate the folder you’re looking to share with your Linux PC.

Right-click the folder and click “Properties.”

In your folder properties, click the “Sharing” tab, then click “Advanced Sharing.” Click to enable the “Share this folder” checkbox, then click “Permissions.”

Under the “Permissions” section, set the control rights for your folder. By default, Windows will grant read-only access to your files.

If you want to allow everyone to read or write to the folder, click “Allow” for the “Full Control” permissions set. Set these permissions to suit your own requirements.

Once you’re done, click “OK” three times to close each of the dialog boxes.

Your folder should now be shared on your network, ready for you to access from your Linux PC.

Install CIFS-utils

Depending on your Linux distribution, you may be able to mount your Windows-shared folder automatically in your distribution’s file explorer.

However, this may not work correctly. The safest way to mount Windows-shared folders on Linux is to use the CIFS-utils package and mount the folder using the Linux terminal.

This allows Linux machines to access SMB file shares used by Windows PCs.

To install CIFS-utils, open a new terminal window. For Ubuntu and Debian-based distributions, type:

For Arch users, type:

Once installed, you can then mount your Windows share folder from the Linux terminal.

Mount Windows SMB Share on Linux

You’ll need to create a mount directory before you can mount your Windows SMB-shared folder on Linux. This is where Linux will mirror the contents of your shared folder.

To do that, open a terminal window and type:

Once created, type the following:

Replace “Windows” with the IP address or hostname for your Windows PC and “SharedFolder” with your shared folder name. For the username, replace “account” with your Windows username or full Microsoft account email.

You’ll be asked to provide your Windows password before the mounting process is complete. Type this in, then click Enter. If you used the correct information, your Windows folder should now be mounted and accessible in the folder you created.

Sharing Files Between Linux and Windows in Dual Boot

Sharing files between Windows and Linux works great when you mount a shared folder between the two devices, but can you still share files with a dual boot setup? Linux and Windows have separate file systems. Linux usually uses Ext4, while Windows uses NTFS and also works with FAT32. This doesn’t mean it’s impossible to see and share files, though.

You’ll need a compatible Windows system, build 20211 or higher, and a few other resources to make it work. Don’t worry. Everything is free. This guide walks you through each step in the process, including a way to read and share files between Windows and Linux.

Frequently Asked Questions

1. Why do I get a syntax error when trying to mount a folder in Linux?

Either there’s a small error in the command in the terminal window, or you have a space in the folder name. Spaces don’t always come across correctly in the syntax. Instead of recognizing the command as the full name of the folder, the system sees two unrelated items.

Avoid this by placing the name in quotes. For instance, Shared Folder would become “Shared Folder.” Of course, you can also just rename the Windows 10 folder to place the words together or have a dash between them.

2. Can I mount a shared folder if I use VirtualBox?

Yes. The process should work the same way. You can also share devices, such as USB drives.

3. Can I mount guest, network, or password protected folders?

Yes, but since you’re not using the main Windows 10 account, you will need to adjust the syntax a bit. Plus, if you’re mounting a network folder, you’ll also need the server or machine name.

While this guide applies to Ubuntu, it should work for most major Linux distros as well. It lists the syntax for different scenarios, assuming you’ve already completed all of the steps (except the final mounting) above.

4. Why do I only have read access for the shared folder?

If you want to store files in the shared folder from Linux, make sure you have full read/write access to the folder in Windows. If the Windows user account only has read permission, this is the only permission you’ll have from Linux as well. You must change your account permissions from within Windows 10. For companies, you’ll need your IT admin to make the change for you.

5. Why aren’t folder changes showing up?

If you’ve made changes to the permissions of the folder, they may not show up immediately in Linux. You’ll need to remount the folder for changes to take effect.

Use the command above to remount any shared folders. This should ensure things work as expected. If you have any random glitches, remounting typically fixes them.

Wrapping Up

Mounting Windows and Linux shared folders gives you the freedom to access your most important files, no matter the operating system. The SMB protocol is well supported on Linux, so you shouldn’t find it difficult to continue accessing your Windows files and folders once you’ve installed the CIFS-utils package.

If you’d rather use a single system, here are five of the best Linux distros for Windows users you could use.

Crystal Crowder has spent over 15 years working in the tech industry, first as an IT technician and then as a writer. She works to help teach others how to get the most from their devices, systems, and apps. She stays on top of the latest trends and is always finding solutions to common tech problems.

One comment

I make an NTFS partition and save files to be shared on it. Linux files have ‘permissions’ which are not saved on an NTFS partition, so they become available to anyone, even a Windows pain!

Leave a Comment Cancel reply

RedMagic 6S Pro Review: Gaming Is Serious Business.

How to Boot to Recovery Mode (Safe Mode) in Ubuntu

Ubuntu Software Center Not Working? Here Are the Fixes

How to Stress Test a Graphics Card on Linux

How to Mount Your iPhone as an External Drive in Ubuntu

How to Fix Ubuntu Freezing in VirtualBox

How to Fix «Repository Does Not Have Release File» Error

How to Combine PDF Files on Windows and Linux

How to Reset the Root Password in Linux

8 Reasons to Switch from Windows to Linux

5 of the Best Linux Distros for Developers and Programmers

Affiliate Disclosure: Make Tech Easier may earn commission on products purchased through our links, which supports the work we do for our readers.

Источник

How to Share File between Ubuntu and Windows 10?

In a network where you have Windows and Linux Ubuntu operating system, it is a bit difficult to share file between Ubuntu and Windows. The best way to share file between Ubuntu and Windows, you need to install and configure Samba as a file server in Ubuntu Linux. The Samba server will simply let you share files with Windows and Linux Ubuntu.

1. Installing Samba in Ubuntu

Samba is a free software re-implementation of the SMB/CIFS networking protocol. Samba provides file and print services for various Windows clients and can integrate with a Windows Server domain, either as a Domain Controller (DC) or as a domain member. So in this article, we are using in Per-to-Per network between Windows clients and Linux Ubuntu clients. If you don’t like reading then watch the video tutorials at the end of this post.

  1. To install Samba file server in Ubuntu Linux, run the terminal by pressing Ctrl+Alt+T keys to open Linux terminal command-line interface.
  2. Now type the “sudo apt-get install Samba” to install Samba file server. Type the password to start the installation.

Installing App In Ubuntu Linux

Remember; your Ubuntu machine must be connected to the internet. Because this apt-get install command will install software from Ubuntu online software repository.

2. Share File Between Ubuntu and Windows

Let’s do how to share a file in Ubuntu through file explorer? Open the File and create a folder in the Home directory. I have created Netdata folder and required to share it.

  1. Right-click the Netdata folder and click Local Network Share. Select Share this folder.

Share File Between Ubuntu and Windows

To allow modification to files and folder for users, select Allow others to create and delete files in this folder. Also, select Guest access (for people without a user account) to access files from Windows without requiring user and password.

2. Click Add the Permissions automatically to apply the permission to the shared folder.

Add the Permissions automatically

If you want to set a password for a shared folder, you shout set a user for Samba file server with “sudo smbpasswd -a Shais” command then type the password twice.

Set a Password to Samba File Server

Now it asks your user and password when someone wants to access the shared folders. The file-sharing from Ubuntu Linux has completed successfully. Let’s test it from Windows 10 client.

3. Access Shared Folders from Windows 10

You can access the Linux shared folders from Windows 10 using Network section. To simply access the shared folders type the \\IP address\Shared folders.

  1. In Windows 10 type \\192.168.0.104\NetData and press enter to open the shared files of Linux Ubuntu.

Access Network Shared Files

2. When prompt for network credential, type the user name and password. If you did not set a password for Samba files server, it would not ask the network credentials.

Network Credentials

3. It’s all the contents of a shared folder. You can create and delete files or edit the files.

Network Shared Files

To access the shared files quickly, create a shortcut link to a shared folder in Windows 10.

Create A Shortcut Link

Right-click on the desktop and click New then click Shortcut.

Create Shortcut Link

Type the network address of shared folder in Type the location of the item: and click Next.

Type a name for Shortcut Link – Share File between Ubuntu and Windows

Type a name for shortcut related to the contents of the shared folder and click Finish to create the shortcut.

Linux Shared Files

Here is the shortcut link to the NetData shared folder of Ubuntu Linux. Double click to open it from your desktop. You can create a network Map drive also. To create a network map drive, read this article How to Create Map Network Drive In Windows 10 and Server?

Share File between Ubuntu and Windows 10 – Video Tutorials

We hope this Share File between Ubuntu and Windows article helped you to share file between Ubuntu and Windows 10 easily like a pro-Linux user.

Troubleshoot File Sharing Between Ubuntu and Windows

The above article and video are a simple file sharing between Windows 10 and Linux Ubuntu. I didn’t assign a user to Samba file server on Linux. Because of this, a user on Technig Youtube channel asked a good question about sharing files and user permissions.

Asked by Ramsin Eivaz: question if I want a user and password, I assume I have to check only “allow others to create…” and not the guest access. But when I enter the Ubuntu user and password, it is not able to log in!! would you have any suggestions thanks.

Answer: You need to create a user account and add the user to the Sambashare group. Then when you access the folder from Windows clients, you should use that username and password for viewing the shared files and folders.

1. First, try to create a user in Ubuntu with “useradd” command or another command that help you create a user.

The -M parameter will not create a home directory for this user and the -N will not create a group with the same username. The -g parameter just specify the group name.

I have created the username “Ali” and added to “sambashare” group.

2. Let’s set a password for the Samba user with “smbpasswd” command.

3. Now from Windows 10, type this username and password to access the contents of a shared folder.

Finally, thanks for sharing the feedback, issues, and problems. Your comments help us to make articles better.

Источник

Читайте также:  Отключить пароль майкрософт при загрузке windows 10
Оцените статью