September 21, 2016

Difference between sudo and su


□ su(substitute user)
○ This linux command allows a user to log in as another user Without log out
○ "su" without parameter is same as "su root"(=Login as root)
○ Account password to login is required

□ sudo(substitute user do)
○ This linux command allows a user to execute as another user's authority Without log out
○ "sudo" without parameter is same as "sudo -u root"(=Execute as root's authority)
○ Current login account's password is required
○ sudo -l : Method of checking the related rights when the sudo is used

□ Difference between "su" and "sudo su"
○ su : system admin(=root) account's password is required
○ sudo su : Current login account's password is required


Test environment
O    S Ubuntu 15.10 (64bit) CPU Intel i7-4710MQ 2.50GHz
SHELL GNU bash (4.3.42) GPU Gallium 0.4 on SVGA3D
RAM 984MiB