how to mount windows share folder on ubuntu
by 개발자   2024-04-04 15:54:19   조회수:352

To mount a Windows shared folder on Ubuntu, you can use the mount command or configure it in your /etc/fstab file for automatic mounting. Here's a step-by-step guide:

1. Install cifs-utils: If you haven't already, you'll need to install the cifs-utils package. Open a terminal and run: sudo apt update sudo apt install cifs-utils

2. Create a mount point: Choose a directory where you want to mount the Windows share. For example:
sudo mkdir /mnt/windows_share

3.Mount the Windows share: You can use the mount command with the cifs filesystem type. The basic syntax is:
sudo mount -t cifs //windows_hostname/sharename /mnt/windows_share -o username=your_username,password=your_password

Replace:

  • //windows_hostname/sharename with the address of the Windows share.
  • /mnt/windows_share with the directory you created in step 2.
  • your_username and your_password with your Windows username and password.

For example:

sudo mount -t cifs //192.168.1.100/share /mnt/windows_share -o username=myusername,password=mypassword

4. Unmount the share: To unmount the share, you can use the umount command:

sudo umount /mnt/windows_share


If you want the share to be mounted automatically every time your system starts, you can add an entry to your /etc/fstab file. Open /etc/fstab in a text editor:

sudo vi /etc/fstab

=> add this :

//windows_hostname/sharename /mnt/windows_share cifs username=your_username,password=your_password 0 0