---
title: 添加HBase到环境变量
description: "1. 编辑“/etc/profile”文件。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengbds/ecosystemEnable/HBase/topic_0200576403.html
sourcePath: /source/zh/kunpengbds/ecosystemEnable/HBase/topic_0200576403.html
indexId: 246d483f0bc93aa035f8f2aa97872d5cbdf0e8a176b207fd9dceb35ec33590ab65
---
# 添加HBase到环境变量

1. 编辑“/etc/profile”文件。
  1 vi /etc/profile

2. 按“i”进入编辑模式，在文件底部添加环境变量，如下所示。
  1 2 export HBASE_HOME=/usr/local/hbase export PATH=$HBASE_HOME/bin:$HBASE_HOME/sbin:$PATH

3. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。
4. 使环境变量生效。
  1 source /etc/profile
