search
HomeOperation and MaintenanceCentOSHow to solve the centos6 terminal garbled problem

Solution to centos6 terminal garbled characters: 1. Set "export LC_ALL=zh_CN.UTF-8"; 2. Edit "/etc/locale.conf" and set "LANG=zh_CN.UTF-8 LC_ALL= zh_CN.UTF-8" is enough.

How to solve the centos6 terminal garbled problem

#The operating environment of this article: centos6 system, Dell G3 computer.

How to solve the centos6 terminal garbled problem?

Centos6.x terminal Chinese garbled solution:

locale
LANG

The default value of LC_* is the lowest level setting. If LC_* is not set, then use this value. Similar to LC_ALL.

 LC_ALL

It is a macro. If the value is set, the value will overwrite all LC_* setting values. Note that the value of LANG is not affected by this macro.

It takes effect directly without restarting:

export LC_ALL=zh_CN.UTF-8

It takes effect permanently:

Edit /etc/locale.conf

LANG=zh_CN.UTF-8
LC_ALL=zh_CN.UTF-8
#用这个就行了,但是不知道为什么
echo.UTF-8 > /etc/sysconfig/i18n

-- ------------------------The original text below does not seem to work and will cause English display errors--------

Modify/ etc/profile file

vim /etc/profile
#添加这行
export LC_ALL="zh_CN.GB18030"
 
#立即生效
source /etc/profile

Recommended tutorial: "centos tutorial"

The above is the detailed content of How to solve the centos6 terminal garbled problem. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How do I configure log rotation in CentOS?How do I configure log rotation in CentOS?Mar 17, 2025 pm 04:43 PM

The article explains how to configure log rotation in CentOS using logrotate, detailing installation, configuration, and benefits like disk space management and security.

How do I install and configure MySQL/MariaDB on CentOS?How do I install and configure MySQL/MariaDB on CentOS?Mar 17, 2025 pm 04:35 PM

Article discusses installation, configuration, and troubleshooting of MySQL/MariaDB on CentOS, including system requirements and security measures.(159 characters)

How do I use Logical Volume Management (LVM) in CentOS to manage storage?How do I use Logical Volume Management (LVM) in CentOS to manage storage?Mar 17, 2025 pm 04:51 PM

The article discusses using Logical Volume Management (LVM) in CentOS for efficient storage management, detailing steps for setup, extension, and backup/restore processes, and highlighting LVM's advantages over traditional partitioning.

How do I manage system services with systemd in CentOS?How do I manage system services with systemd in CentOS?Mar 17, 2025 pm 04:38 PM

The article explains how to manage system services using systemd on CentOS, covering starting, stopping, enabling at boot, and troubleshooting services.

How to Build a High-Concurrency Application with CentOS and PHP-FPM?How to Build a High-Concurrency Application with CentOS and PHP-FPM?Mar 12, 2025 pm 06:19 PM

This article details building high-concurrency PHP-FPM applications on CentOS. It addresses key issues like server configuration (hardware, PHP-FPM settings, load balancing), caching, database optimization, code efficiency, and resource monitoring.

What Are the Best Ways to Handle Backup and Disaster Recovery on CentOS?What Are the Best Ways to Handle Backup and Disaster Recovery on CentOS?Mar 12, 2025 pm 06:21 PM

This article details CentOS backup and disaster recovery (DR) best practices. It emphasizes a multi-faceted approach encompassing regular backups (full, incremental, differential), offsite storage, and rigorous testing. High availability clustering

How do I set up a firewall in CentOS using firewalld?How do I set up a firewall in CentOS using firewalld?Mar 17, 2025 pm 04:44 PM

The article provides a comprehensive guide on setting up and managing firewalld on CentOS, including installation, enabling, basic commands, and troubleshooting steps.

How do I monitor system performance in CentOS using tools like top, htop, and vmstat?How do I monitor system performance in CentOS using tools like top, htop, and vmstat?Mar 17, 2025 pm 04:41 PM

The article discusses monitoring CentOS system performance using top, htop, and vmstat, detailing their features, differences, and customization for effective system analysis.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft