.bash_profile


.bash_profile 이란?

  • 리눅스에서 너무 긴 명령어 이거나 특정파일을실행하게 될때 보다 간결, 보다 쉽게 사용하기 위해서 명령어를 명명하기 위해 사용하는 파일이 .bash_profile 입니다
  • linux에서 . 이 붙은 파일은 윈도우에서 숨김파일과 같은 의미 입니다.
  • javahome, LANG, alias 등의 내용을 설정하여 사용합니다.

파일 위치

  • 사용자별 home 디렉토리에 위치합니다.
  • 홈 디렉토리는 cd 명령어 실행 시 이동하는 위치입니다.

파일 열기

# 경로 이동
$ cd

# 파일 열기
$ vi .bash_profile

실제 사용중인 bash_profile 내용

# .bash_profile


# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs


JAVA_HOME=/usr/lib/jvm/java-1.8.0
PATH=$PATH:$HOME/.local/bin:$HOME/bin:/usr/bin:/sbin:/usr/bin/java:.
PS1=PRD-WAS-KR':$PWD # '

set -o vi

export JAVA_HOME
export PATH
#export LANG=ko_KR.UTF-8
#export LANG=KO_KR.UTF-8


##### alias #####
alias cls="clear"
alias ll="ls -alF"
alias load=". ~/.bash_profile"

alias goengn="cd /engn001"
alias gobin="cd /engn001/tomcat/bin"
alias gosrc="cd /sorc001"
alias gowas="cd /engn001/tomcat"
alias gongx="cd /etc/nginx"
alias goinf='cd /sorc001/tomcat/was/WEB-INF'

alias golog='cd /logs001'
alias gowaslog="cd /logs001/was"

alias seeweblog="tail -f /logs001/was/localhost_access_log."$(date '+%Y-%m-%d').txt
alias seewaslog="tail -f /logs001/was/catalina.out"
alias seeerrlog="tail -f /logs001/was/catalina.out |grep 'ERROR'"

alias startwas="/engn001/tomcat/bin/startup.sh"
alias stopwas="/engn001/tomcat/bin/shutdown.sh"
alias restartwas="cd /engn001/tomcat/bin && ./shutdown.sh && ./startup.sh"

태그:

카테고리:

업데이트:

댓글남기기