In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what commands are used by linux switching users". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what commands are used by linux switching users.
The command for linux to switch users is "su", which can switch any identity, including switching from ordinary users to root users, from root users to ordinary users, and between ordinary users; the syntax format is "su [option] user name".
The operating environment of this tutorial: CentOS 6 system, Dell G3 computer.
The command for linux to switch users is "su".
U is the simplest user switching command, through which any identity can be switched, including switching from ordinary user to root user, from root user to ordinary user and between ordinary users.
Switching between ordinary users and switching from ordinary users to root users need to know each other's password, and only by entering the password correctly can the switch be realized; if you switch from root users to other users, you can switch successfully without knowing each other's password.
The basic format of the su command is as follows:
# su [option] user name
Options:
-: the current user is not only switched to the identity of the specified user, but also the work environment used is also switched to the user's environment (including PATH variable, MAIL variable, etc.). Use the-option to omit the user name and switch to the root user by default.
-l: the use of-is similar, that is, when switching the user identity, the work environment is switched completely, but the user account to be switched needs to be added later.
-p: means to switch to the identity of the specified user, but does not change the current working environment (do not use the profile of the switching user).
-m: same as-p
-c command: switch the user to execute the command only once, and then switch back automatically, usually followed by the command to be executed.
[example 1]
[lamp@localhost ~] $su-root password:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.