Home > Article > Operation and Maintenance > How to log out the user in linux
There are three ways for users to log out:
1, Enter exit at the shell prompt and press Enter to confirm. (Recommended learning: linux operation and maintenance)
2. Enter logout at the shell prompt and press Enter to confirm
3. Press the shortcut key crtl d (this method has the same effect as logout)
##One of the common Linux commands - exit, switch users exit, su
The exit command is the same as exiting the shell and returns a given value. In the shell script, the current script execution can be terminated. Executing exit can cause the shell to exit with the specified status value. If the status value parameter is not set, the shell exits with the default value. The status value 0 represents successful execution, and other values represent execution failure. su command is used to switch the current user identity to another user identity. When changing, you must enter the user account and password to be changed.Options:
-cThe above is the detailed content of How to log out the user in linux. For more information, please follow other related articles on the PHP Chinese website!