You log in and get ORA-01034 ORACLE not available with ORA-27101 shared memory realm does not exist. But ps shows the pmon process is running. What is going on?
ORA-27101 means my session could not attach to an SGA matching the environment I gave it. If pmon really is up, the instance is fine and my environment is wrong. First I check ORACLE_SID: it is case-sensitive on Linux, so PROD and prod are different instances. Then ORACLE_HOME: the shared memory key is derived from ORACLE_HOME and ORACLE_SID, so pointing at a different home, or even the same path with a trailing slash, gives a different key and the same error. I compare against the running process with ps and /etc/oratab and reset with oraenv. If pmon is not running, then it really is down, and I read the alert log for why before I type STARTUP, because a crash that repeats is worse than one that waits five minutes.
ps -ef | grep pmon
cat /etc/oratab
. oraenv
echo $ORACLE_SID $ORACLE_HOME
Likely follow-up: How do you find out which ORACLE_HOME a running instance was actually started from?
On Linux, look at the pmon process itself: ls -l /proc/<pid>/exe points to $ORACLE_HOME/bin/oracle, and /proc/<pid>/environ (readable by the oracle user or root) shows the ORACLE_HOME and ORACLE_SID it started with. Set your environment to match exactly.