- windows 系统上新建一个共享文件夹share,系统用户:test,密码:12345,ip:172.16.4.118
- linux 系统上新建一个目录/home/share
- vi /etc/fstab在后面添加//172.16.4.118/share /home/share cifs defaults,username=vqiao,password=vqiao 如下:
#
# /etc/fstab
# Created by anaconda on Thu Oct 30 05:52:12 2014
#
# Accessible filesystems, by reference, are maintained under ‘/dev/disk‘
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_centos1-lv_root / ext4 defaults 1 1
UUID=ec9dac99-4d4d-4a20-b27a-d99ecbca50ea /boot ext4 defaults 1 2
/dev/mapper/vg_centos1-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
//172.16.4.118/123 /home/share cifs defaults,username=vqiao,password=vqiao 0 0 - 用mount -a 检查是否成功,如没有任何显示说明没问题。
时间: 2024-11-05 18:40:48