TIL: while working remotely e.g. over SSH, to overcome accidentially pressing ctrl+d one time too often and leave the current shell, we can

export IGNOREEOF=3

and now we have to press ctrl+d 3 times to actually leave the shell/session and/or close the terminal window.

#bashtricks

@d1g Similar and possibly a bit safer: `shopt -s -o ignoreeof`. Turns off ^d in the current shell completely (you have to type "exit").