---
# System prepended metadata

title: '`.bash_profile` 或 `.bash_rc`'
tags: [CLI, '*nix', UN*X]

---

# `.bash_profile` 或 `.bash_rc`

[TOC]

###### tags: `*nix` `cli`

---

## `PS1`

### non-root

```bash
PS1='\e[1;32m\]\u\e[1;30m\]@\e[0;32m\]\H\e[1;30m\]:\e[1;34m\]\w\e[1;37m\]\$\e[0m\] '
```

### root

```bash
PS1='\e[1;31m\]\u\e[1;30m\]@\e[0;31m\]\H\e[1;30m\]:\e[1;34m\]\w\e[1;37m\]\$\e[0m\] '
```

## `alias`

### `date`

```bash
alias date='date "+%Y/%m/%d (%V) %a %T.%N%P %Z = %s"'
```

### `grep`

```bash
alias grep='grep --color=auto'
```

### `ls`

```bash
alias ls='ls --color=auto --time-style="+%F %r"'
```
