---
title: "unix-center中的环境配置"
author: "icepp"
date: "2009-03-01T09:06:32Z"
tags: []
slug: "unix-center"
draft: false
lastmod: "2009-03-01T09:06:32Z"
id: 340911
url: "https://icepp.iteye.com/blog/340911"
---

.bash\_profile

 

```
. ~/.bashrc
```

 

 

 .bashrc

 

```
/* .bashrc */
# Icepp 's .bashrc

#
# Source global definitions
#
if [ -f /etc/bashrc ]; then
        . /etc/bashrc   # --> Read /etc/bashrc, if present.
fi

#
# Greetings
#
echo "*********************************"
echo "***     This is Icepp         ***"
echo "*** Welcome to my linux world ***"
echo "*********************************"

function _exit()        # function to run upon exit of shell
{
        echo "********************"
        echo "***   Bye Bye!   ***"
        echo "*** Welcome Back ***"
        echo "********************"
}
trap _exit EXIT

#
# Export environment variables
#
#CVSROOT=:pserver:Icepp@127.0.0.1:/export/home/cvs/CVS-ROOT
PROJDIR=/home/proj/example
PATH=.:$PATH:$HOME/bin:.local/bin

#export CVSROOT
export PROJDIR

#
# User specific aliases and functions
#

# System command set
alias rm='rm -i'
alias mv='mv -i'
alias mkdir='mkdir -p'
alias h='history'
alias which='type -all'
alias ..='cd ..'
alias path='echo -e ${PATH//:/\\n}'
alias du='du -kh'
alias df='df -kTh'
alias la='ls -Al'               # show hidden files
alias ls='ls -hF --color'       # add colors for filetype recognition
alias lx='ls -lXB'              # sort by extension
alias lk='ls -lSr'              # sort by size
alias lc='ls -lcr'              # sort by change time
alias lu='ls -lur'              # sort by access time
alias lr='ls -lR'               # recursive ls
alias lt='ls -ltr'              # sort by date
alias lm='ls -al |more'         # pipe through 'more'

# Compile
#alias gcc='gcc -Wall'

# System info Viewer
alias cpu='cat /proc/cpuinfo'
alias mem='cat /proc/meminfo'
alias version='cat /proc/version'
alias ipconfig='/sbin/ifconfig'

# Project info
#alias cdinc='cd $PROJDIR/include'
#alias cdsrc='cd $PROJDIR/src'
```