I tend to use su - loginname -c somecommand.
Any different having argument -l? That is su -l loginname -c somecommand?
Asked
Active
Viewed 27 times
1
Lesmana
- 27,439
user1121055
- 111
1 Answers
1
The man page for su my Linux has, puts - and -l as equivalent, except for a minor difference in how su parses its command line.
-, -l, --loginProvide an environment similar to what the user would expect had the user logged in directly.When - is used, it must be specified before any username. For portability it is recommended to use it as last option, before any username. The other forms (-l and --login) do not have this restriction.
ilkkachu
- 138,973