答えは su - hoge。自分が fuga ならば、hoge のホームディレクトリに移動する。fuga のホームディレクトリで su hoge すると hoge になっても fuga のホームディレクトリから移動しない。ハイフン付きで su すると以下。ハイフンは -l, --login のエイリアス。
fuga@debian:~$ su - hoge Password: hoge@debian:~$ exit logout
ハイフン無しの場合は以下。hoge になった後も su を実行したユーザのカレントディレクトリである /home/fuga にいることがわかる。
fuga@debian:~$ su hoge Password: hoge@debian:/home/fuga$
以下のように --help と man を調べると、ハイフンの有無によって変わるポイントは、カレントディレクトリだけではないということが分かる。環境を指定したユーザが直接ログインした環境に似せるということがハイフンの有無によって変わるポイント。また、ハイフンとそれ以外のオプションを同時に使用する場合は、ハイフンはオプションの最後に指定しなければいけない (ただし同じ機能を提供する -l や --login を使う場合はこの限りではない) とも書いてある。
$ su --help
Usage: su [options] [LOGIN]
Options:
-c, --command COMMAND pass COMMAND to the invoked shell
-h, --help display this help message and exit
-, -l, --login make the shell a login shell
-m, -p,
--preserve-environment do not reset environment variables, and
keep the same shell
-s, --shell SHELL use SHELL instead of the default in passwd
$ man 1 su
(snip)
-, -l, --login
Provide an environment similar to what the user would expect had the user logged in directly.
When - is used, it must be specified as the last su option. The other forms (-l and --login) do not have this restriction.
(snip)