惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 横渡

[Linux] - 修改ls/ll显示的时间格式 [MySql] - Windows MySql 8.x 手动zip包安装与外网访问登录权限设定 [Windows] - DNS防污染工具Pcap_DNSProxy [Linux] - 服务器/VPS一键检测带宽、CPU、内存、负载、IO读写 [Windows] - Windows/Office纯绿色一键激活工具及方法 [Linux] - 利用ping给端口加密,限制访问 [Linux] - 网速测试命令 [Linux] - CentOS运行DotNet Web程序 [Linux] - SVN忽略文件夹更新的命令与方法 [Linux] - n2n内网穿透 [Linux] - [转]*** Python版一键安装脚本 - 横渡 [Andriod] - Andriod Studio + 逍遥模拟器 [Linux] - centos使用mount + nfs 远程共享存储 [Linux] - Docker pure-ftp使用 [Linux] - Docker移动数据到其它盘的办法 [Nginx] - PHP+FPM相关的配置 [Nginx] - 负载均衡配置 [Linux] - 定时任务crontab [Linux] - 攻击查看与IP查封 [Linux] - Docker制作nginx+php
[Linux] - Windows与Linux网络共享文件夹挂载方法
横渡 · 2018-04-02 · via 博客园 - 横渡

Windows与Linux网络SMB方式文件夹共享挂载

本示例系统:

  Windows 2003+

  Linux-Centos/Ubuntu

本示例全为命令行操作,如何使用Windows、Linux命令行,忽略一万字


Windows设置共享文件

打开cmd

一、新增操作用户

net user linux password /add

如果需要将用户添加进超级管理员,可以使用下边命令(只是共享写读需要的话,可以不用加入超级管理员角色):

net localgroup administrators linux /add

二、共享文件夹

net share ShareFile=E:\VM\ShareFile /GRANT:linux,FULL

完成后,可以使用命令查看是否共享成功命令:


Linux访问Windows共享文件夹

一、安装cifs

Ubuntu安装命令

apt-get install cifs-utils

CentOS安装命令

yum install cifs-utils.x86_64 -y

二、新建文件夹

三、挂载Windows共享文件夹

mount -t cifs //192.168.1.2/ShareFile /mnt/ShareFile -o username="linux",password="password",vers=2.0

参数说明:

  vers=2.0    ------ Windows 10必需加入这个,否则会提示挂载失败。对于Win10以下版本的,我还没测试。

到此已经共享挂载完成


卸载方法

一、Windows命令

二、Linux命令


Linux加入开机启动自动挂载

一、编辑/etc/fstab文件

二、输入如下内容

//192.168.1.2/ShareFile    /mnt/ShareFile    cifs    auto,username=linux,password=password,vers=2.0    0 0

三、立即生效

查看是否挂载成功可以直接输入: