I’ve always wondered this but finally got the answer as to why you should use:
$ sudo su –
instead of using:
$ sudo su

When adding the ‘-‘ character to the end of this command, you are also put into the PATH of the superuser. Without it, you cannot access things like the ‘service’ command for restarting services.

Posted by Chris Klosowski

Chris Klosowski is the President of Easy Digital Downloads, the easiest way to sell your digital products with WordPress. Trusted by over 50,000 smart store owners.