1. 安装 smbfs。
# apt-get install smbfs
2. 建立挂载目录。
# mkdir /mnt/win
3. 挂载 Windows 共享目录。
# mount -t smbfs -o username=guest,password=123456 //win2003-server/vss /mnt/win
如果不需要用户名和密码,可省略 username, password。
# mount -t smbfs //win2003-server/vss /mnt/win
4. 进入 /mnt/win 目录查看。
# cd /mnt/win
# ls
# ls
5. 使用 mount 指令查看挂载信息。
# mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.20-15-generic/volatile type tmpfs (rw)
.host:/ on /mnt/hgfs type vmhgfs (rw,ttl=5)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
//win2003-server/vss on /mnt/win type smbfs (rw) # <---------HERE!!!!------------
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.20-15-generic/volatile type tmpfs (rw)
.host:/ on /mnt/hgfs type vmhgfs (rw,ttl=5)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
//win2003-server/vss on /mnt/win type smbfs (rw) # <---------HERE!!!!------------
6. 使用 umount 卸载。
# umount /mnt/win
或
# umount //win2003-server/vss
注意卸载前要离开 /mtn/win 目录,否则会显示 "device is busy"。