[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What does the minus sign - do?... in the command sudo su -
From: |
Kevin Rodgers |
Subject: |
Re: What does the minus sign - do?... in the command sudo su - |
Date: |
Wed, 25 Sep 2013 07:09:20 -0600 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 |
On 9/25/13 3:27 AM, Peter Dyballa wrote:
Am 25.09.2013 um 11:19 schrieb Don Saklad:
What does the minus sign - do?... in the command
sudo su -
(Almost) Nothing. It just opens a shell…
Actually, it tells su to start a login shell (as opposed to a shell that
inherits the current environment:
-l Simulate a full login. The environment is discarded except for
HOME, SHELL, PATH, TERM, and USER. HOME and SHELL are modified
as above. USER is set to the target login. PATH is set to
``/bin:/usr/bin''. TERM is imported from your current environ-
ment. The invoked shell is the target login's, and su will
change directory to the target login's home directory. This
option is identical to just passing "-", as in "su -".
`M-x man' is your friend.
--
Kevin Rodgers
Denver, Colorado, USA