Updated for Ubuntu 26.04 and Windows 11
Network Setup
Connect both the desktop and laptop to the WiFi router using standard setup. This means the any of the computers can be connected either by WiFi, or by Ethernet cables. However, if you later switch one (or both) computer(s) from WiFi to Ethernet cable (or vice versa), the local IP address of that computer will probably change. This will affect the file sharing setup.
To check that both computers are connected, test that you can get on the Internet from both computers.
Optional: In the router setup, see the local IP addresses assigned to the desktop and the laptop. These may look like 192.168.0.100 or 192.168.1.199. If an option to assign these specific IP addresses permanently in the router exist, you can do that.
Windows → Ubuntu
Step 1: Install Nautilus Share and Samba
Open a terminal Ctrl+Alt+T and run the following command to install the required sharing modules:
sudo apt update
sudo apt install samba nautilus-share -y
Step 2: Add User to the Group and Set Password
For security, add your user profile to the local sharing group and create a separate sharing password:
sudo usermod -aG sambashare $USER
sudo smbpasswd -a $USER
Type in a network password when prompted. You can use your normal login password or a different one.
Step 3: Apply Changes and Restart Files
Restart the file manager session so the context menu options load:
nautilus -q
Step 4: Edit Samba configuration file
Open your Samba configuration file in a text editor (e.g., nano):
sudo nano /etc/samba/smb.conf
Look for the [global] section and add the following lines to it:
[global
usershare max shares = 100
usershare allow guests = Yes
usershare owner only = False
usershare path = /var/lib/samba/usershares
Step 5: Enable Sharing on Your Chosen Folder
Open the Files app, right-click the folder you want to share. There is a folder called "Public" choose that one if you want. Select Local Network Share. Adjust these settings in the options dialog:
• Share this folder: Check this box to activate network sharing.
• Allow others to create and delete files: Check this box if you want Windows to have write access.
• Guest access: Check this if you want anyone on the network to access it without a password.
Click Create Share (or Modify Share) to finalize. The folder icon will change to display a network sharing symbol.

Click Create Share.
It may tell you Nautilus needs to add some permissions to your folder "Public" in order to share it.

Click Add the permissions automatically.
Now you should be able to edit files created in Ubuntu in the "Public" folder of the laptop in the Windows Explorer.
Step 6. Access the Public folder in Ubuntu from Windows
Go to the Windows on the desktop computer and open Windows Explorer, Click on the triangle next to Network on the left panel. From the drop-down list you should be able to select the name of the laptop computer running Ubuntu.
If the Network does not show your Ubuntu laptop, enter the following in the address bar of Windows Explorer:
\\U2604.local\Public
where U2604 is your Ubuntu laptop's host name. You will get a pop-up window like:

Enter your Ubuntu laptop's username and the samba password you created in Step 2.
Now you should be able to see your shared folder (say "Public") from the Ubuntu laptop in the Windows Explorer. Click on "Public" folder and see the files in the folder. You should be able to copy files from the Public folder in Ubuntu to your Windows local folder.
If this does not work, follow the instructions in the next section to fully enable Windows file sharing features.
Here is a step by step guide with some more details.
Ubuntu → Windows
Step 1 Setup Windows folder sharing using methods available for Windows. follow the steps in the link above for the Windows part.
- Open Settings: Click the ⊞ Start menu (Windows icon) and select
Settings. Or press Windows key + I on your keyboard.
- In Settings, click Network & Internet on the left side.
- Scroll down and click on Advanced network settings.
- Find and click Advanced sharing settings.
- Here, look at your network profiles (Private and Public). For the one you use (I am using Public), click to expand it.
- Turn on the switches for:
- Network discovery
- File and printer sharing
- Turn off the switch for:
- Password protected sharing
I couldn't get it to work when password protected sharing was on in Windows 11.
Step 2 On the Ubuntu laptop, open Nautilus, the file browser. Enter the following at the top address bar:
smb://win11.local/users/Public/Documents
where win11 is the host name of the Windows computer.
You will see an authentication window pop-up:

The connect as anonymous button didn't work for me. However, selecting "Registered User" and entering any strings for userid and password worked when Password Protected Sharing is turned Off in windows 11.
Ubuntu → Ubuntu
Boot the desktop to Ubuntu.
On both the desktop and the laptop do the following to make sure ssh-server is installed:
Open a terminal by pressing Ctrl+Alt+T and enter
sudo apt-get install openssh-server
This will install the ssh-server if it is not already installed. If already installed, it will do nothing.
The Desktop First:
Open Nautilus and click on the top address bar.

Enter:
sftp://laptop_user_id@laptop_name.local/home/laptop_user_id
where laptop_user_id is the user ID you created for on your laptop. You can find your user ID by typing whoami in a terminal. And laptop_name is the name you gave to the laptop when you installed Ubuntu.
If you want to share a partition in your second hard drive of the desktop, under Server Address Enter:
sftp://desktop_user_id@desktop_name.local/path/to/the/mount/point/of/the/partition/in/second/hard/drive
Replace path/to/.../drive with the actual path.
Alternately, if you know the local IP address of your laptop you can replace laptop_name.local with the local IP address of the laptop.
Press the Enter key. You will see a password dialog box:

Enter the password associated with laptop_user_id and select if you want the password is to be remembered or not. Click Connect.
Now you should see your home folder of the laptop.
Create a bookmark
Once you have navigated to the desired folder in your Ubuntu laptop (from within Nautilus in your Ubuntu desktop) press Ctrl+D to bookmark that folder. Once the bookmark is created on the left panel you may right click and rename it to what you want.
Now the laptop
Follow the same process as the desktop above.