How do I logout?
Last updated: July 31st, 2013 04:56 PM
Logging out depends on the UNIX shell (command line parser) and/or the windowing system (if logged in at a UNIX workstation) you are using.
By default, typing Control-D will exit any of the UNIX shells. In this case, Control-D indicates the end of file; here the end of the standard input (stdin) stream. Be careful when using programs that use Control-D to terminate; typing one too many Control-Ds may actually log you out of the system prematurely. Most UNIX shells allow this feature to be disabled by setting a shell variable called "ignoreeof". When set, the user must type exit or logout, depending on the shell, to either leave the current shell or logout of the machine completely.
The following table summarizes the different shells and their various means of termination:
ignoreeof variable logout command exit command sh no no yes ksh yes no yes csh/tcsh yes only for login shell only for subshell bash yes only for login shell yes