The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
 

logout - Logging Out



The login command is used in Linux systems to log out the current user. When you enter the login command in a terminal session, the system terminates your login session and returns you to the login screen or closes the terminal window, depending on your login method.

This command doesn't require any additional options or parameters; you simply need to type login in the terminal.

Please note that the login command is applicable only in terminal sessions and assumes that you are already logged into the system. If you are logged in through a graphical user interface, you typically need to log out by closing the window or using the logout option within the GUI interface.

The logout command is used to log out of the system and is the counterpart to the login command. For example, if there's a file named "nologin" within the "/etc" directory, only the root user is allowed to log in during that time.

Please note that the logout command pertains to logging out of a terminal session and not to be confused with the 'login' process itself.