When you login to Unix/Linux you will usually land in your user's home directory, probably something like "/home/geoff". The command ls -al
will list any hidden files and should show a ".profile", a ".bash_profile" or something similar. This file will be executed every time you login, so is a great place to set environment variables or alias's and so on. Here are some example profile file lines that may be useful:
alias dir=ls
alias clean='find ~/ -name "*.[oc]" -exec rm {} \;'
export APP_BASE='/app/custom_app'
JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64
export JAVA_HOME
Not that I recommend the first line but some people find it helpful! You will also notice two different ways to set environment variables for the session.
One nice way to end your profile script is like this:
echo -e "Definitions\n==========="
alias
echo -e "\nCrontab\n======="
crontab -l