How to exit as a linux user (command)

Release: 2019-12-30 13:26:15
Original
34315 people have browsed it

How to exit as a linux user (command)

There are three ways for Linux users to log out:

1. Enter exit at the shell prompt and press Enter to confirm

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)

How to exit as a linux user (command)

One of the common Linux commands ——Exit and switch users. The exit and su

exit commands are the same as exiting the shell and return 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.

Related recommendations: linux tutorial

The above is the detailed content of How to exit as a linux user (command). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!