Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
-H
The -H option sets the HOME environment variable to the target user's home directory (root by default) as defined in the passwd(5) file. By default, sudo does not modify HOME (see set_home and always_set_home in sudoers(5))
-H
or --set-home
there are small bookmarks in the system to identify the temporary elevation session.
those. working under sudo as a normal user will be different from working as a full-fledged root (or other user). from under any user, sudo will substitute its parameters.
[email protected]:~$ sudo echo $HOME
/home/pfg
for example so that the sudo prefix does not break the usual ~
[email protected]:~$ ls -l ~/wwww
-rw-rw-r-- 1 pfg pfg Sep 39 28 23:39 /home/pfg/www
[email protected]:~$ sudo ls -l ~/wwww
-rw-rw-r-- 1 pfg pfg Sep 39 28 23:39 /home/pfg/wwww
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question