How to Mount Windows Share folder in Linux Centos-6.x

Windwos system information
Windows ip address: 192.168.0.6
Windows system credential : username=admin,password=yourpass
Shared Foldername:  Office

Login in Linux server and type below command (change with yours)
[root@server ~]# mount -t cifs -o username=admin,password= yourpass  //192.168.0.6/Office /mnt

Check mount point
[root@server ~]# df –h
//192.168.0.6/Office   31G   18G   13G  59% /mnt
Note: Windows is mount in linux server successfully but temporary.

Mount shared directory permanent in Linux server
[root@server ~]#vim /etc/fstab 
#write below of fstab file
//192.168.0.6/Office    /mnt     cifs    username=admin,password=yourpass 0 0
or,
//192.168.0.6/Office /mnt cifs defaults,username=admin,password=yourpass 0 0

or
//192.168.0.6/Office /mnt cifs defaults,credentials=/etc/smbcred 0 0

#vi /etc/smbcred
username=admin
password=yourpass

#mount -a

Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment