Do you occasionally type CTRL-d by mistake and find out that you're suddenly logged off the system? If you do, you should know about the ignoreeof shell variable or option. CTRL-d is the end-of-file character; when a shell sees it, it thinks that no more input is coming, so it quits. If you're in your , you're suddenly logged out. If you're not in your login shell, you may still be in trouble: a window may have disappeared, or your environment may have suddenly changed because you dropped from a into the parent shell.
If you're a C shell user, you can solve this problem by setting the ignoreeof shell variable:
set ignoreeof # prevent accidental shell termination
(Most users set this in their .cshrc or .login files.)
won't terminate the shell. Instead, you'll get a
In the Korn shell and bash,
If you use the Bourne shell, article
has a workaround for the problem.
If you're like me, you won't use this feature; I happen to find CTRL-d a convenient shorthand for the logout or exit commands. But my taste is certainly disputable, and even I will admit that my fingers sometimes err.