this post was submitted on 06 Aug 2023
486 points (97.1% liked)

linuxmemes

20881 readers
2159 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 37 points 1 year ago* (last edited 1 year ago) (24 children)

Here's how to mount an nfs share:

#cat /etc/systemd/system/mnt.data.mount

[Unit]
Description=nfs mount script

[Mount]
What=192.168.0.30:/mnt/tank/Media
Where=/mnt/data
Type=nfs4

[Install]
WantedBy=remote-fs.target
[–] [email protected] 15 points 1 year ago* (last edited 1 year ago) (4 children)

I’ve always mounted network shares in fstab, what’s the benefit to doing it with systemd?

(Also, for those of you learning, this method only works on systemd-based distros)

load more comments (3 replies)
load more comments (22 replies)