Get Help And Discuss STEM Concepts From Math To Data Science & Financial Literacy
STEM Gender Equality | Join us on ZOOM | Spreading Mathematical Happiness | Join Us on Slack

MathsGee is free of annoying ads. We want to keep it like this. You can help with your DONATION

0 like 0 dislike
19 views

Why do we use sudo su - and not just sudo su?

in Computer Science by Diamond (51,000 points) | 19 views

1 Answer

0 like 0 dislike
sudo is in most modern Linux distributions where (but not always) the root user is disabled and has no password set. Therefore you cannot switch to the root user with su (you can try). You have to call sudo with root privileges: sudo su. su just switches the user, providing a normal shell with an environment nearly the same as with the old user. su - invokes a login shell after switching the user. A login shell resets most environment variables, providing a clean base.
by Diamond (51,000 points)

No related questions found

Welcome to MathsGee Q&A Bank, Africa’s largest personalized STEM and Financial Literacy education network that helps people find answers to problems, connect with others and take action to improve their outcomes.


MathsGee Q&A is the STEM and Financial Literacy knowledge-sharing community where students and experts put their heads together to crack their toughest questions.


MathsGee is free of annoying ads. We want to keep it like this. You can help with your DONATION

Enter your email address:

11,765 questions
9,712 answers
100 comments
10,511 users