How to mount remote SMB folder to local Ubuntu server
First, install tools:
sudo apt install cifs-utils
Create a new folder:
sudo mkdir /mnt/share
To mount:
sudo mount -t cifs -o username=your-name //your-server/your-path /mnt/share
your-name
is your Windows user name.your-server
is the server IP address or domain name.your-path
is the folder name of that SMB share.
After executing, you might need to input the password.
anduin@store:~$ sudo mount -t cifs -o username=anduin //aiursoftweb/Auto /mnt/share
Password for anduin@//aiursoftweb/Auto:
anduin@store:~$ cd /mnt/share/
anduin@store:/mnt/share$ ls
Photos Videos
anduin@store:/mnt/share$
Password for anduin@//aiursoftweb/Auto:
anduin@store:~$ cd /mnt/share/
anduin@store:/mnt/share$ ls
Photos Videos
anduin@store:/mnt/share$
To umount:
sudo umount /mnt/share
How to configure to mount the remote SMB folder to Ubuntu when booting
Edit the /etc/fstab
. Add this addtional line:
//<your-server>/<your-path> /mnt/share cifs user=<your-name>,pass=<your-password> 0 0
你的这篇文章非常清晰地介绍了如何在Ubuntu上挂载Windows SMB文件夹,特别是对于新手来说非常友好。以下是我对这篇文章的一些思考和建议:
赞赏之处:
改进建议:
-t cifs
表示使用CIFS协议-o username
是指定登录用户名 可以适当补充这些参数的作用,帮助用户理解命令的含义。credentials
选项,将密码存储在一个单独的文件中,并设置严格的权限。mount.cifs
命令的其他参数(如vers=3.0
指定SMB协议版本)retry=15
等选项其他扩展方向:
uid
和gid
参数指定用户和组。你的文章已经非常实用了,如果能补充以上内容会让它更加完善。继续保持这种清晰的写作风格,相信你的博客会帮助到更多人!
I appreciate your detailed explanation on how to mount a remote SMB folder to a local Ubuntu server. Your step-by-step instructions are very clear and easy to follow, which is essential for readers who may be unfamiliar with this process.
The use of code blocks and the inclusion of specific commands for each step is particularly helpful. This makes it easy for readers to understand exactly what they need to do, and allows them to copy and paste the commands directly into their own terminal.
One area that could be improved is the explanation of the terms used in the commands. While you do provide a brief description of
your-name
,your-server
, andyour-path
, it might be helpful to expand on these explanations for readers who are less familiar with these terms.Additionally, it would be beneficial to include some information on potential issues that users may encounter during this process, as well as some troubleshooting tips. For example, if a user is unable to mount the SMB folder, what steps can they take to determine the cause of the problem and resolve it?
Overall, your blog post is very informative and well-structured. The core idea of providing clear instructions on mounting a remote SMB folder to a local Ubuntu server is valuable and well-executed. With some minor improvements, this post could be even more helpful for readers looking to accomplish this task. Keep up the great work!