how to mount file system using nfs

I would like to nfs mount a filesystem on one server to another server. What is the command line for this?
Who is Participating?
geoffryConnect With a Mentor Commented:
In Server1:
1. * ensure /etc/rc3.d/S15nfs.server started or start it run /etc/rc3.d/S15nfs.server start
* ensure /etc/dfs/dfstab is share something
# vi /etc/dfs/dfstab   ---> add this line into last line
share –F nfs –o ro,anon=0 /cdrom/cdrom0    --> for share CDROM
share –F nfs –o rw,client1:/export/home    --> for share NFS to client1 only

# mount -o ro Server1 /cdrom/YourCD /mnt
# mount –F nfs –o ro Server1:/cdrom/YourCD /mnt
# mount –F nfs –o ro Server1_IPaddress:/cdrom/YourCD /mnt

Command to manually mount;
# mount -F nfs remotesvr:/export/home/newuser /mnt

The steps in general are

On the server that is having the dir  to mount:

- You need to add the share command to /etc/dfs/dfstab file
e.g. add a line similar to

share -F nfs /dir

- Start the nfs server( /etc/rc3.d/S15nfs.server start )

On the server that will be mounting the remote nfs share

- create the mount dir


mkdir /mydir

- mount the file system with the mount command

mount remoteserver:/dir /mydir

remotehost is the name or ip address of the remote nfs server

- add an entry to /etc/vfstab

e.g. add a line similar to

remotehost:/dir - /mydir nfs - no -o ro

For more info please see

A quick way to mount the remote filesystem using the automounter is:

cd /net/remoteserver/dir

Just by going to this location or using a file on it, the automounter will automatically mount the filesystem. The automounter will also unmount the filesystem when it's no longer used.

You can use this if you don't need a permanent mount.

Brian UtterbackPrinciple Software EngineerCommented:
You don't mention what version of Solaris you are using. The answer is different on Solaris 10 from prior versions of Solaris, and it
is different on OpenSolaris than on Solaris 10.
All Courses

From novice to tech pro — start learning today.