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-nameis your Windows user name.your-serveris the server IP address or domain name.your-pathis the folder name of that SMB share.
After executing, you might need to input the password.
<div style="display:inline-block;white-space:pre;background-color:#2C001E;font-family:'Cascadia Code',monospace;font-size:12pt;padding:4px;"><span style="color:#16C60C;background-color:#2C001E;">anduin@store</span><span style="color:#CCCCCC;background-color:#2C001E;">:</span><span style="color:#3B78FF;background-color:#2C001E;"></span><span style="color:#CCCCCC;background-color:#2C001E;">$ sudo mount -t cifs -o username=anduin //aiursoftweb/Auto /mnt/share<br>Password for anduin@//aiursoftweb/Auto:<br></span><span style="color:#16C60C;background-color:#2C001E;">anduin@store</span><span style="color:#CCCCCC;background-color:#2C001E;">:</span><span style="color:#3B78FF;background-color:#2C001E;"></span><span style="color:#CCCCCC;background-color:#2C001E;">$ cd /mnt/share/<br></span><span style="color:#16C60C;background-color:#2C001E;">anduin@store</span><span style="color:#CCCCCC;background-color:#2C001E;">:</span><span style="color:#3B78FF;background-color:#2C001E;">/mnt/share</span><span style="color:#CCCCCC;background-color:#2C001E;">$ ls<br></span><span style="color:#3B78FF;background-color:#2C001E;">Photos</span><span style="color:#CCCCCC;background-color:#2C001E;"> </span><span style="color:#3B78FF;background-color:#2C001E;">Videos<br></span><span style="color:#16C60C;background-color:#2C001E;">anduin@store</span><span style="color:#CCCCCC;background-color:#2C001E;">:</span><span style="color:#3B78FF;background-color:#2C001E;">/mnt/share</span><span style="color:#CCCCCC;background-color:#2C001E;">$</span></div>
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
Comments (0)
No comments yet. Be the first to leave one!