[LINUX] How to use .bash_profile and .bashrc

Premise

When a user logs in to Linux, it runs in the following order:

1 .bash_profile 2 .bashrc

.bash_profile

Write here if you want to run it only once at login.

.bashrc Write here when you want to run it every time you start the shell.

When setting an alias (shortcut command), describe it in .bashrc.

.bashrc


# example

--------------
Git Aliases
--------------
alias gaa='git add .'
alias gcm='git commit -m'
alias gl='git log'
alias gs='git status'
alias gpom='git push origin master'
alias gpfom='git push -f origin master'

Reference site About .bash_profile and .bashrc Really correct use of .bashrc and .bash_profile

that's all

Recommended Posts

How to use .bash_profile and .bashrc
How to install and use Tesseract-OCR
How to install and use Graphviz
python: How to use locals () and globals ()
How to use Python zip and enumerate
How to use is and == in Python
How to use pandas Timestamp and date_range
How to use xml.etree.ElementTree
How to use virtualenv
How to use Seaboan
How to use image-match
How to use shogun
How to use Pandas 2
How to use Virtualenv
How to use numpy.vectorize
How to use pytest_report_header
How to use partial
How to use SymPy
How to use x-means
How to use WikiExtractor.py
How to use IPython
How to use virtualenv
How to use Matplotlib
How to use iptables
How to use numpy
How to use TokyoTechFes2015
How to use venv
How to use dictionary {}
How to use Pyenv
How to use list []
How to use python-kabusapi
How to use OptParse
How to use return
How to use dotenv
How to use pyenv-virtualenv
How to use Go.mod
How to use imutils
How to use import
How to use lists, tuples, dictionaries, and sets
Introducing Sinatra-style frameworks and how to use them
[Python] How to use hash function and tuple.
How to install Cascade detector and how to use it
How to use search sorted
[gensim] How to use Doc2Vec
Understand how to use django-filter
How to use the generator
[Python] How to use list 1
How to use FastAPI ③ OpenAPI
How to use Python argparse
How to use IPython Notebook
How to use Pandas Rolling
[Note] How to use virtualenv
How to use redis-py Dictionaries
Python: How to use pydub
[Python] How to use checkio
[Go] How to use "... (3 periods)"
How to use Django's GeoIp2
[Python] How to use input ()
How to use the decorator
[Introduction] How to use open3d
How to use Python lambda