Remove external drive share From Networks (Nautilus File Manager)

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

  1. Ubuntu/Debian-based systems: Run the command sudo systemctl stop avahi-daemon.service to stop the Avahi daemon. Then, run sudo systemctl disable avahi-daemon.service to disable it on boot.
  2. RPM-based systems (Fedora/CentOS/RHEL): Run the command sudo systemctl stop avahi-daemon and then sudo systemctl disable avahi-daemon to disable it on boot.

Method 2: Configure Avahi to exclude specific devices

  1. 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.
  2. Add the following lines: exclude=usb* or exclude=sdc* (replace sdc* with the device label or UUID of the external drive you want to exclude).
  3. Restart Avahi: Run sudo service avahi-daemon restart (or sudo 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.

  1. 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).
  2. Restart the system: After updating /etc/fstab, reboot your system or run sudo 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.

1 Like

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.

1 Like

Yet I must