---
title: "ubuntu 编码设置UTF8"
author: "amspring"
date: "2014-05-13T10:34:40Z"
tags: []
categories: ["操作系统"]
slug: "ubuntu-utf8"
draft: false
lastmod: "2015-06-17T18:25:41Z"
id: 2065665
url: "https://amspring.iteye.com/blog/2065665"
---

sudo locale-gen en_US.UTF-8

sudo vim /etc/default/locale

删除全部,添加如下

LC_ALL="en_US.UTF-8"

source /etc/default/locale

或者
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

或者
vim .profile
加入
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
source .profile


