Skip to content

Instantly share code, notes, and snippets.

@ErykDarnowski
Last active November 24, 2025 03:35
Show Gist options
  • Select an option

  • Save ErykDarnowski/9f569d9d50d9379cd1e2e9ba27e9a842 to your computer and use it in GitHub Desktop.

Select an option

Save ErykDarnowski/9f569d9d50d9379cd1e2e9ba27e9a842 to your computer and use it in GitHub Desktop.
How to automatically mount a network Samba share on Arch Linux!

How to automatically mount a network Samba share on Arch Linux!

  1. Install the cifs-utils package: sudo pacman –S cifs-utils.
  2. Make a mount folder for the SMB share: sudo mkdir /mnt/<Path>.
  3. Create a backup of the fstab file (just in case): sudo cp /etc/fstab /etc/fstab_backup.
  4. Open the fstab file in your favorite editor: sudo vim /etc/fstab.
  5. Add the mount line: //<Server_address>/<Server_share_and_internal_path> /mnt/<Path> cifs username=<Server_user>,pass=<Server_password> 0 0.
  1. Save the file.
  2. Reload fstab: sudo mount -av.
@Absolemo
Copy link

Wow on this way i would like to thank you very much. Now many problems have disappeared for me. I could not access my server in the past, you have provided clarity thanks.
Also i would like to thank TheLeGare for the tip with rw. I also got into problems where i could only read my files. Thanks for the Tipps!

@fuste-r
Copy link

fuste-r commented Oct 23, 2025

This worked for me perfectly, thank you. I paired this with smbclient -L <IP_ADDRESS> -U <USERNAME> to see available mounts as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment