Mount a remote directory

First, you'll need the NFS server daemons running on the machines. If you're running Redhat you can start them with /etc/rc.d/init.d/nfs start. Next, add the following to the /etc/exports file on the remote machine:

/dir/to/mount your.linux.box.ip (rw)

Where /dir/to/mount is the path of the directory on the remote machine that you're going to mount and your.linux.box.ip is the IP of the box that will be doing the mounting. The rw makes gives the mount read and write access. You can use ro to make the mount read-only.

Mount the remote directory with the following:

mount -r -t nfs ip.of.remote.box:/dir/to/mount /mount/dir

Where ip.of.remote.box is the IP of the remote box, /dir/to/mount is the directory on the remote machine that you want to mount and /mount/dir is the mount point.

Last modified: 07/05/2006 (most likely earlier as a site migration in 2006 reset some dates) Tags: (none)

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top