linux windows are two ways to access a shared folder

 Excerpt: https: //www.cnblogs.com/dengtang/p/11630482.html

Sometimes need to access shared files required under linux windows folder, you can use mount to mount or use samba connection.

1, mount mount

First create the mounted directory:

$ Mkdir windows 
will mount a shared folder to the windows folder:
$ Sudo mount -t cifs -o username = share, password = share //192.168.66.198/share ./windows 

a few parameter indicates meaning:
CIFS: the Common Internet File System, can be understood as a network file system.
username to access the shared folder: usrname
password: password access
//192.168.66.198/share: indicates the address of the network folder Note that the last can not add / if it is //192.168.66.198/share/ will be reported the following error : mount: //192.168.66.198/share/ iS a Not Valid Block Device

Tips: use mount mounted after system restart will fail, if desired automatic loading boot, provided the following is added / etc / fstab the document concludes face on it.
//192.168.66.198/share / home / windows cifs defaults, username = share, password = share 0 2 

where / home / windows represents mount point is above the full path of the windows directory.

2, connected using samba

samba is to make files between windows and unix series os software can access each other. Access windows using samba shared folder, you need to install smbclient.

$ sudo apt-get install smbclient

After installation, you can access the file shares.

Smbclient report this content share //192.168.66.198/share --user = $ 
the Enter report this content share's password: (Enter password) 
smb: \>

This time into the operating space smb command, you can use the help to see the use of commands.

SMB: \> Help 

...... omitted several commands ...... 
Exit the getfacl GET geteas The hardlink 
Help Link History the iosize LCD 
...... ...... omitted several commands

You can also use help to see a single command usage

smb: \> help get

HELP get:
         [local name] get a file


summary

Use the mount command is relatively simple, basic linux system will with this command; then use samba from windows can access shared files of linux. According to their own preferences you can be, have any questions give me a message.

Sometimes need to access shared files required under linux windows folder, you can use mount to mount or use samba connection.

1, mount mount

First create the mounted directory:

$ Mkdir windows 
will mount a shared folder to the windows folder:
$ Sudo mount -t cifs -o username = share, password = share //192.168.66.198/share ./windows 

a few parameter indicates meaning:
CIFS: the Common Internet File System, can be understood as a network file system.
username to access the shared folder: usrname
password: password access
//192.168.66.198/share: indicates the address of the network folder Note that the last can not add / if it is //192.168.66.198/share/ will be reported the following error : mount: //192.168.66.198/share/ iS a Not Valid Block Device

Tips: use mount mounted after system restart will fail, if desired automatic loading boot, provided the following is added / etc / fstab the document concludes face on it.
//192.168.66.198/share / home / windows cifs defaults, username = share, password = share 0 2 

where / home / windows represents mount point is above the full path of the windows directory.

2, connected using samba

samba is to make files between windows and unix series os software can access each other. Access windows using samba shared folder, you need to install smbclient.

$ sudo apt-get install smbclient

After installation, you can access the file shares.

Smbclient report this content share //192.168.66.198/share --user = $ 
the Enter report this content share's password: (Enter password) 
smb: \>

This time into the operating space smb command, you can use the help to see the use of commands.

SMB: \> Help 

...... omitted several commands ...... 
Exit the getfacl GET geteas The hardlink 
Help Link History the iosize LCD 
...... ...... omitted several commands

You can also use help to see a single command usage

smb: \> help get

HELP get:
         [local name] get a file


summary

Use the mount command is relatively simple, basic linux system will with this command; then use samba from windows can access shared files of linux. According to their own preferences you can be, have any questions give me a message.

Guess you like

Origin www.cnblogs.com/LiuYanYGZ/p/12043945.html