Linux上挂载Windows共享目录
------------Linux上挂载Windows共享目录(重启后失效)--------------------
第一步:先在Windows上创建一个共享目录
第二步:在linux中运行如下命令:
mount.cifs //192.168.10.43/shared /root/shared -o user=name,pass=123456
注:/root/shared是linux上的目录。user是Windows系统的用户名pass是Windows系统的密码
--------------------------删除共享-----------------------------------
删除共享:umount /root/shared
--------------------设置自动挂载(开机后挂载共享到桌面)------------------
方法如下:
把//192.168.10.43/shared /mnt/shared cifs defaults,username=name,password=123456 0 2加入到/ect/fstab文件最后一行
如:
[root@bogon etc]# cat fstab # This file is edited by fstab-sync - see 'man fstab-sync' for details /dev/VolGroup00/LogVol00 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 /dev/VolGroup00/LogVol01 swap swap defaults 0 0 /dev/hdc /media/cdrom auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0 //192.168.10.43/shared /mnt/shared cifs defaults,username=name,password=123456 0 2
相关推荐
farwang 2020-11-25
星愿心愿 2020-11-24
tianhuak 2020-11-24
zhjn0 2020-11-24
昭君出塞 2020-11-23
bluecarrot 2020-11-23
linuxwcj 2020-10-21
以梦为马不负韶华 2020-10-20
彼岸随笔 2020-10-20
yutou0 2020-10-17
applecarelte 2020-10-16
ourtimes 2020-10-16
waterhorse 2020-09-19
MRFENGG 2020-11-11
rainandtear 2020-10-30
kyssfanhui 2020-10-20
liuhangtiant 2020-10-20