- Ubuntu Documentation
- Connect to a file server
- Writing URLs
- Types of servers
- Connecting to Windows Networks Shares from Ubuntu Desktop
- Access Windows Shares
- Connect to a file server
- Ubuntu Documentation
- Security
- How to share files between a Linux and Windows computer
- Create a shared folder on Windows
- Access a Windows shared folder from Linux, using Konqueror
- Access a Windows shared folder from Linux, using Nautilus
- Access a Windows shared folder from Linux, using the command line
- Access Windows 10 Shared Folder from Ubuntu 18.04
- 3 Answers 3
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.
Connecting to Windows Networks Shares from Ubuntu Desktop
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.
This brief tutorial is going to show students and new users how to access Windows network shares from Ubuntu desktops. When you open Ubuntu file manager, it should find network shares that are automatically advertise across the network.
Ubuntu and other desktop computers should be able to view and connect to the shares… however, if the shares are not advertised, you will need to connect to the shares manually by typing the resource network address. To get started with access Windows shares across the network, follow the guide below:
Access Windows Shares
To browse Windows files over the network, open the Files application from the Activities overview (top left corner) or click File Manager on the dock and click Other Locations in the sidebar.
Connect to a file server
To connect to Windows shares, use the guide below:
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.
Then click the Click Connect button . 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.
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:
This how to connect to Windows shares from Ubuntu.
Ubuntu Documentation
You can let other people view and control your desktop from another computer with a desktop viewing application. Configure Screen Sharing to allow others to access your desktop and set the security preferences.
You must have the Vino package installed for Screen Sharing to be visible.
Open the Activities overview and start typing Settings .
Click on Settings .
Click on Sharing in the sidebar to open the panel.
If the Sharing switch at the top-right of the window is set to off, switch it to on.
If the text below Computer Name allows you to edit it, you can change the name your computer displays on the network.
Select Screen Sharing .
To let others view your desktop, switch the Screen Sharing switch to on. This means that other people will be able to attempt to connect to your computer and view what’s on your screen.
To let others interact with your desktop, ensure that Allow connections to control the screen is checked. This may allow the other person to move your mouse, run applications, and browse files on your computer, depending on the security settings which you are currently using.
Security
It is important that you consider the full extent of what each security option means before changing it.
If you want to be able to choose whether to allow someone to access your desktop, enable New connections must ask for access . If you disable this option, you will not be asked whether you want to allow someone to connect to your computer.
This option is enabled by default.
To require other people to use a password when connecting to your desktop, enable Require a Password . If you do not use this option, anyone can attempt to view your desktop.
This option is disabled by default, but you should enable it and set a secure password.
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.
- Open the Control Panel.
- Go to Network and Sharing Options.
- Go to Change Advanced Sharing Settings.
- 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.
- Right-click the folder and select Properties.
- Go to the Sharing tab.
- 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.
- 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:
- Click the K menu icon.
- Select Internet ->Konqueror.
- In the Konqueror window that opens, click the Network Folders link, or type remote:/ in the address bar and press Enter .
- Click the Samba Shares icon.
- Click the icon of your Windows Home workgroup.
- Click the Workgroup icon.
- Click the icon for your computer.
- When prompted, enter the username and password for the Windows account that created the share.
- 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:
- Open Nautilus.
- From the File menu, select Connect to Server.
- In the Service type drop-down box, select Windows share.
- In the Server field, enter the name of your computer.
- 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.
- Open a terminal.
- Type smbclient at the command prompt.
- 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.
Access Windows 10 Shared Folder from Ubuntu 18.04
I would like to share files between Windows and Ubuntu.
In Ubuntu 16.04 LTS, I could access shared folder on a Windows machine on my local network my navigating to Other locations in Files (Nautilus), accessing the Windows network, and browse. After upgrading to Ubuntu 18.04 LTS, this no longer works for me.
How can I get access to folder shared in Windows 10 from Ubuntu 18.04?
3 Answers 3
There was a change in both Windows 10 and Samba. Some of the details are explained here.
The browse by just clicking isn’t working, but you can get there by entering the shared folder link in the address field. Use the server’s IP address or the computer name for the share. In the example I’m using the IP address of the Windows 10 server:
Use Keyboard shortcut Ctrl + L to type in pathname:
Typing that in the file browser will bring up authorization prompt. Use the credentials from your Windows 10 server. This will display all the available shares. You can then click on the share you want access to.
There are two changes steps you may have to do. Set client max protocol = NT1 for the downward compatibility in the /etc/samba/smb.conf file. Place the entry just below the workgroup = WORKGROUP line.
It should look like this:
Once you have manually accessed the desired share, you can make it easily accessible in the future by bookmarking it. You can do this with the keyboard shortcut: Ctrl + D .
You can easily rename your bookmarks to something friend and meaningful by right-clicking the name that appears in the File Browser’s sidebar.
Install necessary packages:
You may have to install smbclient , which will ensure you have the necessary dependents such as the cifs-utils and the actual /etc/samba/smb.conf file.
On 18.04, I have just had success with the following:
On Ubuntu: Install smbclient and add client max protocol = NT1 to /etc/samba/smb.conf as per L.D. James’ answer (see this post for more info).
On Windows: Create a folder in Windows to share, e.g. named shared . Make sure the folder is shared: I created a new user on Windows, keeping the NewUser name and selected a simple password (I first tried changing the name, but found that change was apparently only skin deep. Perhaps if I had rebooted. ). I logged in with NewUser , then logged back in with my admin account. I activated network sharing on my private network and for the folder specifically (see e.g. this post). Then I right clicked the folder and chose Give access to. , choosing NewUser (you may want additional permissions: see the just linked to post). Under the Sharing tab, the folder now has a network path: //COMPUTERNAME/shared .
Still on Windows: To gain access to the shared folder, I used the IP of the Windows machine instead of the COMPUTERNAME , cf. this.
To find the IP of your Windows machine, right click the network logo, open Network and Sharing Settings and choose Change connection properties . Take note of the IPv4 near the bottom.
In Ubuntu: Finally, open a terminal on you Ubuntu machine and execute
and provide the password for NewUser when prompted.
This mounts the shared Windows shared folder as a folder shared in your Ubuntu user’s home directory.
The command is based on suggestions from here, where there are also suggestions for storing login credentials.
I hope it works. Good luck!