0

When i open the terminal and type

su XXXXX

where terminal open in the name of XXXXX , it ask for password and switched. Am i not already there in the first place when i opened the terminal? So What is the differences between terminal open in the first place and terminal open after I switch to same as open in first? I do not seems to find any differences here.
When i type exit it exits and bring me where i am before. Am i always in same place or different? If i am on same place why switching account happen ?

parlad
  • 229
  • 4
  • 11
  • Ok , @karel , could be duplicate in the end of ans, but why switch happen from same user to same user. Also if i do not knew about su , sudo-s, i am surely going different way. – parlad Feb 10 '18 at 16:09
  • Form that link , i did not get why ubuntu switch me to myself ? Help me out – parlad Feb 10 '18 at 16:12
  • Ther command exit always returns you back to the same user that you logged in with. If this user is not root then you need to use sudo to run commands with root privileges. – karel Feb 10 '18 at 16:17
  • sir, @karel , exit does that ,but who am i before switching and after switching myself ? Is there privilege differences , Although why it is switching to myself? – parlad Feb 10 '18 at 16:20
  • In order to not be confused by the different variations of sudo and su you must understand that each one of these variations was created for a different purpose and misusing them can make a disaster. The safest alternative (not always the most time-saving one) is to preface a command by sudo every time you want to run that command with root privileges. – karel Feb 10 '18 at 16:24
  • I ask simply , why it does take me like i am different in two situations ? – parlad Feb 10 '18 at 16:34

0 Answers0