使用Linux很便利的一个地方,就是它把所有资源都按照文件的方式抽象出来,于是我们在读写任何外部资源时,都像是操作本地普通文件一样。访问Windows共享,除了在Nautilus/Konquerer使用smb://,或者命令行使用smbclient之外,当然还有更cool的方式,那就是smbmount。
在Ubuntu下使用smbmount,需要安装smbfs包,通过sudo apt-get install smbfs即可。调用方法如下,新建/share目录后:
$ [sudo] smbmount //10.10.10.10/share /share -o username=<user_name>,password=<password>,codepage=cp936,iocharset=ut8
注意最后两个参数,Linux默认是UTF-8编码,中文Windows则是GBK,按codepage划分,也就是cp936。如果你的环境和上述不一致,则需要相应的修改codepage和iocharset参数。成功以后,我们就可以通过熟悉的ls, cp, cat, less, more, mv, zip, tar, rm, rename, nano, vi等等我们在Linux下已经习以为常的方式来操作了,就和本地文件夹一样。
如果想在Linux启动时自动把Windows共享挂进来,则可以修改/etc/fstab,增加如下内容:
//10.10.10.10/share /share smbfs username=<user_name>,password=<password>,codepage=cp936,iocharset=ut8,umask=000 0 0
分享到:
相关推荐
Linux Tips Linux 使用小技巧合集 DOC
Linux Debugging and Performance Tuning Tips and Techniques
Linux调试技术和性能调优手段,chm格式
Linux Debugging and Performance Tuning Tips and Techniques.rar
Top 100 Tips for Windows 8 Discover the Secrets of Windows 8 Purchased it online
Linux Tips - Bufferbloat
abap tips abap tips abap tips abap tips abap tips
1.删除utmp记录,将从w或者who输出中隐藏 1. 添加utmp记录,伪造登录信息 2.删除历史登录记录(wtmp) 3.添加wtmp记录 4.删除btmp
Top 100 Tips for Windows 10 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者...
CentOS 优化 Linux 内核参数在末尾追加以下内容使配置立即生效。
适用于Linux 2的Windows子系统(WSL 2)-技巧,窍门和技巧 这是Packt发行的的代码存储库。 通过自定义工作流和配置最大程度地提高Windows 10开发计算机的生产力 这本书是关于什么的? 适用于Linux的Windows子系统...
完整的pdf文档,非扫描件,包含目录,内容清晰。 作者:Daniel J. Barrett 第一版 Linux Pocket Guide is organized the way you use Linux: by function, not just alphabetically. It's not the 'bible of Linux; ...
Fedora Ubuntu LinuxMint 等Linux系统的各种使用技巧各提示,图文并茂,解说详细。
android TIPS小结android TIPS小结android TIPS小结android TIPS小结
linux经典入门书 The Linux Starter Pack -- (C) Future Publishing Here's your complete guide to using Linux, taking you from beginner level to an intermediate user with ease. We'll show you how to ...
D:\linux-doc\linux-kernel-travel 的目录 Advanced.Linux.Programming.pdf Building.Embedded.Linux.Systems.pdf Linux.Kernel.Development.Second.Edition.chm Linux_Debugging_and_Performance_Tuning_Tips_and_...
Linux Security Tips(Linux 安全技巧).pdf linux 系统安全与优化中文版 by smallfish.pdf Linux 系统安全与优化中文版221.pdf Linux 进程管理.pdf Linux安全和优化.pdf linux服务器优化调优笔记.pdf Linux的...
swifter-tips.pdfswifter-tips.pdfswifter-tips.pdfswifter-tips.pdfswifter-tips.pdfswifter-tips.pdfswifter-tips.pdfswifter-tips.pdfswifter-tips.pdfswifter-tips.pdfswifter-tips.pdfswifter-tips.pdfswifter-...
jquery tips提示图片信息
Linux Debugging and Performance Tuning (Prentice, 2005)