How do I remove/Unshare this?
What exactly is ''this''? Is it a Server-Connection? A Network-Drive?
An external drive is attached to my PC.I created it by going to the Properties, then Local Network Share.
If you go back to your external drive and right click what you shared, you should be able to disable the share from there via the Properties menus that come up. If I'm understanding the situation right, anyway.
When You make a right-click on it, what Options do You get shown?
(Have amended thread title to make it easier to follow by visitors to the forum.)
No option.
I already did this, still showing.
Stop Network Discovery of External Drives in Linux
Network discovery, also known as service discovery or mDNS (Multicast DNS), allows devices to automatically detect and share resources on a network. In Linux, this feature is implemented using Avahi, a zero-configuration networking (zeroconf) system. To stop network discovery of external drives in Linux, you can disable Avahi or configure it to exclude specific devices.
Method 1: Disable Avahi
- Ubuntu/Debian-based systems: Run the command
sudo systemctl stop avahi-daemon.service
to stop the Avahi daemon. Then, runsudo systemctl disable avahi-daemon.service
to disable it on boot. - RPM-based systems (Fedora/CentOS/RHEL): Run the command
sudo systemctl stop avahi-daemon
and thensudo systemctl disable avahi-daemon
to disable it on boot.
Method 2: Configure Avahi to exclude specific devices
- Edit the Avahi configuration file: Open the file
/etc/avahi/avahi-daemon.conf
(or/etc/avahi/avahi.conf
on older systems) in a text editor. - Add the following lines:
exclude=usb*
orexclude=sdc*
(replacesdc*
with the device label or UUID of the external drive you want to exclude). - Restart Avahi: Run
sudo service avahi-daemon restart
(orsudo systemctl restart avahi-daemon
on systemd-based systems).
Alternative: Use systemd-mount
If you want to mount external drives automatically without broadcasting their availability over the network, you can use systemd-mount with the noauto,x-systemd.automount
options.
- Edit the
/etc/fstab
file: Add the following line:UUID=<device_UUID> /mnt/ noauto,x-systemd.automount,x-systemd.device-timeout=10,x-systemd.idle-timeout=1min 0 2
(replace<device_UUID>
with the actual UUID of the external drive). - Restart the system: After updating
/etc/fstab
, reboot your system or runsudo mount -a
to apply the changes.
By disabling Avahi or configuring it to exclude specific devices, you’ll prevent external drives from being discovered and shared over the network. If you prefer to mount external drives automatically without network discovery, use systemd-mount with the noauto,x-systemd.automount
options.
Method 1 worked.
Thanks a ton. And thanks again for the Explanation above the methods.
Don't thank me, thank mojeek search engine that offers other search engines. In this instance Brave's A.I. search engine. Provided you give accurate search parameters A.I. sometimes works.
Yet I must