Skip to content

Instantly share code, notes, and snippets.



Last active May 3, 2018
What would you like to do?
Auto-mount CIFS on Solus (or any other Linux OS)

Append something like below into /etc/fstab

# /etc/fstab: static file system information.
# <fs>      <mountpoint> <type> <opts>      <dump/pass>
// /path/to/target cifs user,uid=1000,_netdev,noauto,x-systemd.automount,credentials=/path/to/cred 0 0
  • The value for uid can be obtained via
id -u <user-name>
  • _netdev,noauto,x-systemd.automount are necessary for network mount. See fstab at ArchWiki.

If you want them to be mounted only upon access, you will need to use the noauto,x-systemd.automount parameters.

Also, the _netdev option ensures systemd understands that the mount is network dependent and order it after the network is online.

  • Content of the /path/to/cred
  • Run the following to remount all the partitions
# mount -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment