---
title: "CentOS 添加环境变量"
author: "欣水寓言"
date: "2014-05-19T12:09:56Z"
tags: []
categories: ["操作系统"]
slug: "centos"
draft: false
lastmod: "2014-05-19T12:13:51Z"
id: 2068186
url: "https://fableking.iteye.com/blog/2068186"
---

1.修改环境变量需要修改/etc/profile

export PATH="$PATH:xxxx"

 

2.单独对用户修改 ~/.bashrc, 只对这个用户有效

 

改完后，执行source /etc/profile或source ~/.bashrc使修改生效