Software >> OS >> Unix >> Linux >> RHEL >> 7 >> How to mount CIFS share

(1) edit /etc/fstab and add the following

/etc/fstab

 //cifs-server-name-or-ip/sharename    /yourmountpoint    cifs     rw,username=youruser,password=yourpassword 0 0

with password included

 

 //cifs-server-name-or-ip/sharename    /yourmountpoint    cifs     rw,username=youruser 0 0

with password excluded

 

(2) mount the share by

# mount -a

or

# mount //cifs-server-name-or-ip/sharename

or

# mount /yourmountpoint

 

 

If password was not entered in /etc/fstab, the password will be prompted when we mount.