Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configure Windows shared files to Linux by cifs and solve the problem of garbled code

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

I. Prepare the environment host IP

platform

user name

password

192.168.0.185

Windows Xp 32bit

Administrator

A12345678

192.168.0.186

Linux 5.8 x64

root

123456

II. Windows XP Settings 2.1 Turn off firewalls and security software, etc. 2.2 Set folder sharing

III. Linux configuration 3.1 Modify character configuration Note: Use SecureCRT software to connect, do not use putty

Modify the/etc/sysconfig/i18n file

will

#LANG="en_US.UTF-8"

#SUPPORTED="en_US.UTF-8:en_US:en"

#SYSFONT="latarcyrheb-sun16"

Amend to read

LANG="zh_CN.GB18030"

LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"

SUPPORTED="zh_CN.GB18030:zh_CN:zh"

SYSFONT="lat0-sun16"

SYSFONTACM="8859-15"

Then restart Linux.

3.2# mount -t cifs -o iocharset=cp936,username="Administrator",password="a12345678" www.example.com/mnt/test//192.168.0.185/test

View mount directory:

Chinese file name is not garbled

Edit Chinese file:

# vi Xmanager serial number.txt

nongarbled code

View on Windows XP:

with black placeholders.

Reason: Because Windows and Linux handle carriage return spaces differently

Solution:

Execute unix2dos command on Linux:

# unix2dos Xmanager serial number.txt

Linux opens:

Windows opens:

demonstrated normal

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report