Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

bash root (See related posts)

* Use su - instead of su, The "-" gives you the target user's environment instead of your own. This is most evident when you forget the dash and the shell can't find commands in /sbin and /usr/sbin.
* Run command as root. su - -c <command>

You need to create an account or log in to post comments to this site.


Click here to browse all 5545 code snippets

Related Posts