Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> OS >> Unix >> What is the difference between 'su' and 'su -'

firstly

su is the same as su root

su - is the same as su - root

su or su username

becomes superuser root (if no parameters are specified) or the specified user without changing the current environment variables such as PATH and PWD.  I assumes the privilege without changing the current environment

su - or su - username

becomes superuser root (if no parameters are specified) or the specified user as if you have logged out and logged in again as that user.  It changes to the new environment and privilege of the user e.g. PATH and PWD will that of the user as well as privileges

Reference

[1] http://www.linuxforums.org/forum/red-hat-fedora-linux/71481-what-difference-between-su-su.html

 

 

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]