Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

nitpicking but why would someone type `sudo su` vs `sudo -i`




Muscle memory for folks who have been doing it since before -i was an option. I still instinctively type `sudo su -` because it worked consistently on older deployments. When you have to operate a fleet of varying ages and distributions, you tend to quickly learn [if only out of frustration] what works everywhere vs only on the newer stuff.

`sudo su - <user>` also seems easier for me to type than `sudo -i -u <user>`


I've mostly only ever seen `sudo su` in tutorials, so someone who's only familiar with the command through those is one possible reason why.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: