---
title: "我的mac OSX bash_profile文件"
author: "xitonga"
date: "2014-05-26T03:07:00Z"
tags: []
slug: "mac-osx-bash-profile"
draft: false
lastmod: "2014-05-26T14:44:10Z"
id: 2071212
url: "https://xitonga.iteye.com/blog/2071212"
---

A typical install of OS X won't create a .bash\_profile for you. When you want to run functions from your command line, this is a must-have.

1. Start up Terminal
2. Type "cd ~/" to go to your home folder
3. Type "touch .bash\_profile" to create your new file.
4. Edit .bash\_profile with your favorite editor (or you can just type "open -e .bash\_profile" to open it in TextEdit.
5. Type ". .bash\_profile" to reload .bash\_profile and update any functions you add.

```
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
```

http://redfinsolutions.com/blog/creating-bashprofile-your-mac