.bashrc .bash_profile 와 .profile 의 차이
https://www.tutorialspoint.com/difference-between-bashrc-bash-profile-and-profile
언제 .bashrc 대신 .bash_profile이 사용되는가?
https://apple.stackexchange.com/questions/51036/what-is-the-difference-between-bash-profile-and-bashrc
login shell이 뭐지?
https://www.makeuseof.com/linux-login-shells-explained/#:~:text=A%20login%20shell%20is%20exactly,typically%20not%20a%20login%20shell
remote ubuntu server에서 alias 명령어로 단축 명령어를 설정하고 싶었다.
.bashrc에 alias 명령어를 작성하고 source로 적용하여도 단축 명령어가 실행되지 않아서 왜 그런지 찾아봤다.
참고 : 나만의 마법같은 단축 명령어 | alias
alias 등을 설정할 수 있다.alias 명령어를 작성하여도 적용되지 않은 것이었다.# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
ssh로 접속한 remote linux server에서 shell 환경 설정을 추가하고 싶으면 .bash_profile 파일에 내용을 추가하거나 .bashrc 파일을 사용하고 싶으면 .bashrc 파일 내용을 적용하는 코드를 추가한다.