You get a bonus - 1 coin for daily activity. Now you have 1 coin

Mounting a Windows Shared Folder (SMB Share) in Linux

Practice



Given: a shared Windows folder on the corresponding machine or server. Needed: mount it on a Linux machine as a directory (i.e. make it accessible from the Linux machine via a local path, the way any other Unix resources are mounted).


Solution

$ sudo mount -t cifs //10.0.7.141/myshare/ -o username=myuser,password=MyPaSsWoRd /mnt -o iocharset=utf8,file_mode=0777,dir_mode=0777

Here:
  • //10.0.7.141/myshare : This is the name of the computer and the name of the shared resource on the remote machine
  • myuser : The username
  • MyPaSsWoRd : This user's password
  • /mnt : the folder on the Linux machine where this share is mounted

The specified user must, of course, be set up on the Windows machine and have the corresponding access rights to the shared folder - both on the "Sharing" tab and on the "Security" tab.


Domain

I didn't have to join the Linux machine to the domain in order to connect to the share of a computer that belongs to a Windows Active Directory domain. No trouble at all.

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "LINUX operating system"

Terms: LINUX operating system