November 2, 2024
How To Quickly Mount Windows Share From Terminal In Linux Mint / Ubuntu

Here’s how to quickly mount Windows share from terminal in Linux Mint / Ubuntu:

1. Issue the following command at the terminal to install smbfs –

sudo apt-get install smbfs

How To Quickly Mount Windows Share From Terminal In Linux Mint / Ubuntu

2. After smbfs installation is complete, issue the following command at the terminal to create a local directory for mounting the Windows share to –

mkdir temp

How To Quickly Mount Windows Share From Terminal In Linux Mint / Ubuntu

(above command will create a directory called ‘temp’. You can choose any name you want.)

3. Now modify the permissions of the permissions of the directory that you created in step 2 by issuing the following command at the terminal –

chmod -R 777 temp/

How To Quickly Mount Windows Share From Terminal In Linux Mint / Ubuntu

4. Now, to mount the Windows share using the following command –

sudo smbmount //<Windows system host name / IP>/<Windows share name> /<path to the local directory that you created in step 2> -o username=<Windows user name who has read-write access to the Windows share>,rw

In our case,

sudo smbmount //192.168.148.1/share /home/ihaveapc/temp/ -o username=masked,rw

How To Quickly Mount Windows Share From Terminal In Linux Mint / Ubuntu

5. After you are done transferring files to/from the Windows share, issue the following command at the terminal to disconnect from the share –

sudo umount <path to the local directory that you created in step 2>

In our case,

sudo umount /home/ihaveapc/temp/

How To Quickly Mount Windows Share From Terminal In Linux Mint / Ubuntu

By admin

Related Post

2 thoughts on “How To Quickly Mount Windows Share From Terminal In Linux Mint / Ubuntu”
  1. […] example)     – read-only  $> sudo smbmount //192.168.10.100/data /opt/shared_folder -o username=jackson,ro   – read-write  $> sudo smbmount //192.168.10.100/data /opt/shared_folder -o username=jackson,rw  2. How to umount a windows share folder $> sudo umount /opt/shared_folder Reference [1] https://ihaveapc.com/2012/06/how-to-quickly-mount-windows-share-from-terminal-in-linux-mint-ubuntu/ […]

Comments are closed.