In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you the difference between su and su-commands in linux what is the use, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
When you use su to switch users under Linux, it is just that the user has changed, and the current operating environment is still under the previous user; using su-switching user, not only the user changes, but also the operating environment becomes the environment of new users.
The essential difference between su and su-command
I first switched to root with the su command, but there was an error when running useradd: bash: useradd: command not found. Google for a while, because on this root user who switched over with the su command.
The biggest essential difference between the su command and the su-command is that the former only switches the root identity, but the Shell environment is still the Shell; of the ordinary user, while the latter switches to the root identity with both the user and the Shell environment. PATH environment variable errors will not occur only if you switch the Shell environment. After switching from su to root, pwd found that the working directory is still the working directory of ordinary users; after switching with the su-command, the working directory becomes the working directory of root. Use the echo $PATH command to see the difference between su and su-later environment variables. And so on, to switch from the current user to another user, you should use the su-command.
This is the case with Linux. Sometimes the service will not run with one more or less space in the configuration file. We must pay attention to the details so that we can avoid detours!
The above is all the content of this article entitled "what's the difference between su and su-commands in linux?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.