Idea: mount the Windows shared directory in the LAN to a local disk in Ubuntu. First install samba: sudoapt-getinstallsambasmbfs to test and restart samba. Code: sudotestparmsudo/etc/init. d/sambarestart1: Create a mount point in the ubuntu system to mount the Windows shared directory: sudomk
Idea: mount the Windows shared directory in the LAN to the local disk in Ubuntu
First install samba:
Sudo apt-get install samba smbfs
Test and restart samba. Code:
Sudo testparm
Sudo/etc/init. d/samba restart
1. Create a mount point in ubuntu to mount the Windows shared directory:
Sudo mkdir/mnt/winshare
Note: winshare is a self-created folder with its own name.
2. Obtain the IP address of Windows XP. Here, the IP address of xp is 192.168.1.6, and the shared folder name is share:
The command is as follows:
Sudo mount-t smbfs // 192.168.1.6/share/mnt/winshare
Note: The smbfs behind-t is a network-related file system. The underlined part is the location of the shared directory in xp on the LAN. You can add this sentence after smbfs:
-O username = new, password = 123456, set the account and password
3. cd to/mnt/winshare to check whether it is successful or not.
But Chinese characters are garbled.
The solution is as follows:
How to handle garbled display of the Chinese directory of the Network Neighbor: * confirm your local, if: zh_CN.UTF-8 then:
Add the following to the [global] section in/etc/samba/smb. conf:
Display charset = UTF-8unix charset = UTF-8dos charset = cp936
Confirm your local. If it is zh_CN.GB2312zh_CN.GBK, then:
Add the following to the [global] section in/etc/samba/smb. conf:
Display charset = cp936unix charset = cp936dos charset = cp936
After setting, You need to log out once. To view the Chinese directory.
In this case, enter smb: // 192.168.1.6 (Note: //, not //) in the network. You can browse shared files in xp without garbled characters.