Connecting to windows share from 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 Access Shares on Windows 11 from Ubuntu

This post shows students and new users how to connect to shares on Windows 11 from Ubuntu desktop.

By default when you open Ubuntu file manager, it should find network shares that are automatically advertise across the local network. Similar to Windows systems, Ubuntu uses SMB protocol to connect to Windows shares that are advertised and shared.

Remote users can connect over the network and access shared files and folders as if they were directly connected to the local machines. This is a convenient way to make files and folders available to other people on your local network.

When shares are advertised Ubuntu and other desktop computers should be able to view and connect to the shared resources. However, if the shares are not advertised, users on the same network will have to manually connect to the shares by typing the resource network address. The steps below will show you how to do that.

Ubuntu and Windows 11 should work seamlessly when it comes to file sharing since both will still use SMB protocol. The new Windows 11, which will probably be generally available later this year, will come with many new features and enhancements that may confuse some students and new users right away. Some things and settings have changed so much that folks will have to learn new ways of using Windows.

Despite all these new changes in Windows 11, filesharing between Windows and Ubuntu should still work.

Enable Network Discovery in Windows 11

As we mentions above, shares must be advertised in order for other devices to view or access. In Windows, Network Discovery needs to be turned for advertising of shares to be viewed from other devices.

If your Windows devices are not able to see or discovery each other on your private network, it might likely be that Network Discovery is disabled.

To enable Network Discovery, continue below.

Windows 11 has a centralized location for majority of its settings. From system configurations to creating new users and updating Windows, all can be done from its System Settings pane.

To get to System Settings, you can use the Windows key + i shortcut or click on Start ==> Settings as shown in the image below:

Alternatively, you can use the search box on the taskbar and search for Settings. Then select to open it.

Windows Settings pane should look similar to the image below. In Windows Settings, click Network & internet , then select Ethernet on the right pane of your screen shown in the image below.

In Ethernet settings pane, under Network profile type, choose Private. This profile will allow devices in your network to be discovered. This profile should also be selected if you need file sharing or use apps that communicate over this network.

The private profile is suitable for home, work places and network that are trusted.

If you have other networks like Wi-Fi (if you’re connected to a wireless network) or Ethernet (if you’re connected to a network using a network cable), you can also set the profile type to be Private.

When you’re done, exit and network discovery should be enabled.

Turn on Public Folder Sharing in Windows 11

Use the steps below to setup file sharing.

Windows 11 has a centralized location for majority of its settings. From system configurations to creating new users and updating Windows, all can be done from its System Settings pane.

However, change account username is still done in the old Control Panel. To get to Control Panel, you can click on Start and start typing Control Panel as shown in the image below:

In the Control Panel, select Network and Internet as highlighted in the image below.

On the next pane, select Network and Sharing Center as highlighted below.

Next, select Change advanced sharing settings as highlighted below.

In the Advanced sharing center, select the Private (current profile) and Turn on file and printer sharing.

Save your changes and exit.

On the same Advance sharing options page, scroll down All networks.

There you should see settings for Public folder sharing, Media streaming, File sharing connections and Password protected sharing. Windows should automatically turn on file and printer sharing in private networks. However, in some instances, this will not be enabled.

If you can not automatically find printers and shared resources in your private network, then File sharing option may be disabled.

If you enable password protected sharing, only people who have accounts on the local computer or in domain environment will be able to access shared files and printers.

Make your changes and save, then exit.

The settings above can easily be done using the commands below when run as administrator.

You must open the command prompt as administrator to run the commands above.

Access shares on Windows 11 from Ubuntu

Now that Network Discovery and file sharing is enabled, you can now connect to Ubuntu and view shares on Windows devices.

To browse Windows files over the network, open File Manager application from the Activities overview (top left corner) or click File Manager on the dock and click Other Locations in the sidebar.

If Network Discovery is enabled and file sharing enable, you should see shared file and folders in the Windows Network folder above.

If not, run the commands below to install Samba.

In the file manager, click Other Locations in the sidebar. In Connect to Server, enter the address of the server, in the form of a URL. Details on supported URLs are listed below If you have connected to the server before, you can select it from the Recent Servers list.

Then click the Connect button when you’re ready to connect.

Another format with multiple shared folders:

Windows computers use a proprietary protocol to share files over a local area network. Computers on a Windows network are sometimes grouped into domains for organization and to better control access. If you have the right permissions on the remote computer, you can connect to a Windows share from the file manager.

You should see Windows shares if you have access to them.

If accessing the shares and you’re prompted for login name and password, type in the Windows account login info. This account must have access to view the shared content.

How to access Ubuntu files from Windows

On the Ubuntu machine, we’ll want to create a folder to share with Windows systems. Run the commands below to create a folder called samba in the system root directory.

After that, set the group ownership to sambashare and permission to allow member of the group to access the folder.

After changing the folder permission to allow sharing, run the commands below to add your Ubuntu account to allow access via Samba.

Replace yourusername with your Ubuntu account.

Next, set Samba password and enable your Ubuntu account to access Samba shares.

Next, add your user account to sambashare group.

After that, open Samba configuration file by running the commands below.

Then add these lines at the bottom of the file and save.

After saving the file, restart Samba by running the commands below.

At this point you should be able to access the /samba folder on Ubuntu system using your account. When prompted, type in your Ubuntu username and password.

That should do it!

Conclusion:

This post showed you how to enable Windows Network Discovery and enable file sharing to access shared content from Ubuntu. If you find any error above, please use the comment form below to report.

Источник

Ubuntu Documentation

You can connect to a server or network share to browse and view files on that server, exactly as if they were on your own computer. This is a convenient way to download or upload files on the internet, or to share files with other people on your local network.

To browse files over the network, open the Files application from the Activities overview, and click Other Locations in the sidebar. The file manager will find any computers on your local area network that advertise their ability to serve files. If you want to connect to a server on the internet, or if you do not see the computer you’re looking for, you can manually connect to a server by typing in its internet/network address.

Connect to a file server

In the file manager, click Other Locations in the sidebar.

In Connect to Server , enter the address of the server, in the form of a URL . Details on supported URLs are listed below .

If you have connected to the server before, you can click on it in the Recent Servers list.

Click Connect . The files on the server will be shown. You can browse the files just as you would for those on your own computer. The server will also be added to the sidebar so you can access it quickly in the future.

Writing URLs

A URL , or uniform resource locator , is a form of address that refers to a location or file on a network. The address is formatted like this:

The scheme specifies the protocol or type of server. The example.com portion of the address is called the domain name . If a username is required, it is inserted before the server name:

Some schemes require the port number to be specified. Insert it after the domain name:

Below are specific examples for the various server types that are supported.

Types of servers

You can connect to different types of servers. Some servers are public, and allow anybody to connect. Other servers require you to log in with a username and password.

You may not have permissions to perform certain actions on files on a server. For example, on public FTP sites, you will probably not be able to delete files.

The URL you enter depends on the protocol that the server uses to export its file shares.

If you have a secure shell account on a server, you can connect using this method. Many web hosts provide SSH accounts to members so they can securely upload files. SSH servers always require you to log in.

A typical SSH URL looks like this:

When using SSH, all the data you send (including your password) is encrypted so that other users on your network can’t see it.

FTP is a popular way to exchange files on the Internet. Because data is not encrypted over FTP, many servers now provide access through SSH. Some servers, however, still allow or require you to use FTP to upload or download files. FTP sites with logins will usually allow you to delete and upload files.

A typical FTP URL looks like this:

Sites that allow you to download files will sometimes provide public or anonymous FTP access. These servers do not require a username and password, and will usually not allow you to delete or upload files.

A typical anonymous FTP URL looks like this:

Some anonymous FTP sites require you to log in with a public username and password, or with a public username using your email address as the password. For these servers, use the FTP (with login) method, and use the credentials specified by the FTP site.

Windows computers use a proprietary protocol to share files over a local area network. Computers on a Windows network are sometimes grouped into domains for organization and to better control access. If you have the right permissions on the remote computer, you can connect to a Windows share from the file manager.

A typical Windows share URL looks like this:

Based on the HTTP protocol used on the web, WebDAV is sometimes used to share files on a local network and to store files on the internet. If the server you’re connecting to supports secure connections, you should choose this option. Secure WebDAV uses strong SSL encryption, so that other users can’t see your password.

A WebDAV URL looks like this:

UNIX computers traditionally use the Network File System protocol to share files over a local network. With NFS, security is based on the UID of the user accessing the share, so no authentication credentials are needed when connecting.

Источник

Читайте также:  Linux создание каталогов через терминал
Оцените статью