[iz4u@junghyun ~]$cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export PS1='[\h@\u \w]$' <--이 부분을 추가
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
[iz4u@junghyun ~]$
\h : 호스트
\u : 계정아이디
\w : 경로명
pwd 처도 볼수 있지만......
[iz4u@junghyun ~]$cd public_html/
[iz4u@junghyun ~/public_html]$cd board/
[iz4u@junghyun ~/public_html/board]$cd include/
[iz4u@junghyun ~/public_html/board/include]$
참고 1 :
# .bash_profile
# 제 .bash_profile 입니다.
# 주석을 달아 놓았으니 튜닝해서 쓰세요.
# Get the aliases and functions
# 사용자 정의 알리어스와 함수 정의 포함
#if [ -f ~/.bashrc ]; then
. ~/.bashrc
#fi
# User specific environment and startup programs
# 사용자별 환경 변수, 시작 프로그램 설정
PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="Christian Junguhn Hwang"
# PS1#####################################################################
# These comments are for the environmental variables of PS1
# a: idk s: show the name of this shell
# d: show date informations t: show time as 24 hours
# e: hostname u: show id
# j: idk v: show the version of this shell maybe
# l: show the number of the konsoles w: show the absolutely path
# n: idk
# H: show the name of host and domain V: show the version
# T: show time as 12 hours W: show the name of current path
# this is my shell program for PS1 from here #############################
hour=`date | cut -f4 -d' ' | cut -f1 -d:`
#time=`date | cut -f4 -d' '
if [ $hour -gt 12 ]; then
PS1='[Joobaragy@\u \t PM] '
else
PS1='[Joobaragy@\u \t AM] '
fi ############################# this is the end of my shell program for PS1
export USERNAME BASH_ENV PATH PS1
// 해커즈뉴스
'Server' 카테고리의 다른 글
ssh 이용하여 tar 로 원격 백업하기 (0) | 2017.01.06 |
---|---|
ftp를 이용한 Network 백업 (0) | 2017.01.06 |
Telnet, Ssh 특정 계정 접속 못하게 하기 (0) | 2017.01.06 |
쉘다루기/쉘의 종류 (0) | 2017.01.06 |
DISK Quota 설정하기 (0) | 2017.01.06 |