Register now for better personalized quote!

HOT NEWS

How to access Linux NFS share folders from MacOS

Sep, 04, 2024 Hi-network.com
Nigel Killeen/Getty Images

NFS is a great service for sharing folders across your LAN. Although NFS isn't quite as flexible as Samba (it doesn't share printers or work with Active Directory), it's considerably faster, which is great for working with larger files.

Besides being a bit easier to use than Samba, NFS is also a great option for networks that house various operating systems. Theone caveat to NFS is that it's not as secure as Samba. This is fine if you're working on your home LAN, which no one else can access but you (and/or your family).

Also: 7 things I never do after I install Linux (and why you shouldn't either)

Unlike connecting to NFS shares from a Linux client, connecting from MacOS requires an extra configuration, and the connection is best managed from Finder.

Let me show you how it's done.

Configuring NFS for MacOS

What you'll need:To connect to an NFS share from MacOS, you'll need the following:

  • A Linux machine with an NFS server up and running with a configured share
  • A MacOS machine
  • A user on the Linux machine with sudo privileges

That's it! Here' how to get set up. 

Configure NFS on Linux

1. Open the exports file for editing

From within a terminal window, open the exports file for editing with the command:

sudo nano /etc/exports

2. Configure NFS for MacOS

If you've already configured NFS for a Linux machine, you'll see a line that looks something like this:

/share 192.168.1.253(rw)

The above line allows the machine at IP address 192.168.1.253 access to the /share folder with read and write permissions. That's not enough for MacOS because it will produce an access error. 

Also: How to share folders across your network from Fedora Linux

Let's say your MacOS IP address (which can be discovered with the commandifconfig) is 192.168.1.70. The configuration line for that would be:

/share 192.168.1.70(rw,insecure)

The insecureoption is necessary because NFS uses a port lower than 1024, and your MacOS user will not have permission to access that port. To turn that feature off, you must add theinsecureoption.

Also: 8 things you can do with Linux that you can't do with MacOS

Save and close the file.

Restart NFS on the server

1. Restart NFS

Next, we must restart the NFS server, so the changes take effect. To do this, issue the command:

sudo systemctl restart nfs-server

2. Verify the status of NFS

Make sure to verify NFS is running properly with the command:

systemctl status nfs-server

You should see the service listed asactive. If so, everything is ready for connection from the MacOS machine.

Mount your NFS share

Open Finder on your MacOS machine and hit the Cmd+K keyboard shortcut. This will open the Connect to Server dialog window, where you'll need to enter the following:

nfs://ADDRESS/SHARE

Here, ADDRESS is the IP address of the NFS server, and SHARE is the name of the folder you shared. Upon successful connection, Finder will open the shared folder and display the files contained within.

You can mount both Samba and NFS shares from within Finder.

Jack Wallen\

The problem with this method is that once you close Finder, you'll have a hard time locating the shared folder (as it doesn't appear in the Finder sidebar). 

There's a better way: Open the terminal app and create a folder that will be used as a mount point for the share with the command:

mkdir nfs_share

With that folder ready, mount the share with the following command:

sudo mount -t nfs ADDRESS:/SHARE nfs_mount

Here, ADDRESS is the IP address of the NFS server and SHARE is the name of the shared folder. You'll be prompted to enter your user password and, upon successful authentication, the share will be mounted and accessible. You might find one error that requires you to allow access to the folder -- if so, click Allow when prompted.

Also: Arc's 'Air Traffic Control' is a great way to keep your browser organized

Now, anytime you need to access the files in the share, you can open Finder and navigate to the nfs_mount folder in your home directory. The mount will remain persistent until you reboot the MacOS machine. If you do reboot, you'll need to run the mount command to reclaim the connection.

Featured

Amazon Prime Day: Best 160+ deals live ahead of October's Big Deal Days saleI just tested the new EufyCam, and I'm never going back to grainy night visionAn anti-theft upgrade is coming to Android phones. Here's how to see if you have it yetYou can still upgrade old PCs to Windows 11, even if Microsoft says no: Readers prove it
  • Amazon Prime Day: Best 160+ deals live ahead of October's Big Deal Days sale
  • I just tested the new EufyCam, and I'm never going back to grainy night vision
  • An anti-theft upgrade is coming to Android phones. Here's how to see if you have it yet
  • You can still upgrade old PCs to Windows 11, even if Microsoft says no: Readers prove it

tag-icon Hot Tags : Tech Services & Software Operating Systems

Copyright © 2014-2024 Hi-Network.com | HAILIAN TECHNOLOGY CO., LIMITED | All Rights Reserved.
Our company's operations and information are independent of the manufacturers' positions, nor a part of any listed trademarks company.