Ubuntu 24.04.1 LTS (Noble Numbat): Sharing Directories Across the LAN
In this guide, we describe how to make the $HOME/Public/
directory of a newly installed Ubuntu 24.04.1 LTS (Noble Numbat)
available for sharing across the home network. This shared directory allows authenticated users to read and write. An example of $HOME/Public/
is /home/behai/Public/
.
Ubuntu 24.04.1 LTS (Noble Numbat): Sharing Directories Across the LAN |
I have performed a clean, fresh installation of Ubuntu 24.04.1 LTS (Noble Numbat)
, replacing Ubuntu 22.10 (Kinetic Kudu)
, which reached End of Life on July 20, 2023. I followed my own previously noted steps to share the /home/behai/Public/
directory. The UI part of the process no longer works, but I have found another solution. I successfully shared the /home/behai/Public/
directory, and my Windows 10 Pro can access it. I will describe step by step what I did to get it to work.
💥 Please note: behai
is the user created during the installation process.
⓵ Install the nautilus-share
package by running the following commands:
$ sudo apt-get update -y
$ sudo apt-get install -y nautilus-share
These commands install the Samba smbd
service, samba-common-bin
version 2:4.19.5+dfsg-4ubuntu9
, and acl
version 2.3.2-1build1
. I’m not sure what the latter two are.
To verify the smbd
service has been installed, query its version using the command:
$ smbd --version
My installation reports Version 4.19.5-Ubuntu
.
⓶ Add the directory to be shared to the Samba configuration. Edit the Samba configuration with the following command:
$ sudo nano /etc/samba/smb.conf
At the end of the file, add the following content:
[Public]
comment = behai Public folder
path = /home/behai/Public
browsable = yes
guest ok = no
read only = no
create mask = 0755
I am matching the section name [Public]
to the directory name /Public
. Next, allow authenticated users full access to the shared directory with:
$ sudo chmod 777 Public
â“· Set the Samba password for user behai
:
$ sudo smbpasswd -a behai
⓸ Open the Samba port:
$ sudo ufw allow 445
⓹ Restart the Samba service and check its status.
To restart:
$ sudo service smbd restart
To check the Samba status:
$ sudo service smbd status
If everything goes well, it should report active (running)
.
⓺ On Windows 10 Pro, you can now attempt to access this newly shared Ubuntu 24.04.1 directory using Windows Map network drive...
. The mapped folder would be \\Ubuntu 24.04.1 IP Address\Public
, for example, \\192.168.0.16\Public
. It will ask for credentials; use the username and password we set up in section â“·.
â“» I assume the same steps can be followed to share other directories. I have not done this myself.
⓼ For further reading, please refer to the following posts and articles:
- Ubuntu 23.04 Network File Sharing / Windows cannot access \\UBUNTU\Public
- How to share directories to your LAN From Ubuntu Desktop 22.04
- How to share folders to your network from Linux
- How to create share folder on Ubuntu 18.04 by using samba(command line)
- How to Create Samba Share on Ubuntu
Thank you for reading. I hope you find the information in this post useful. Stay safe, as always.
✿✿✿
Feature image source: