在Linux系統中,可以使用以下命令來查看用戶的主目錄:
echo
~
echo ~
getent
getent passwd <username> | cut -d: -f6
其中,<username>是要查詢主目錄的用戶名。
<username>
echo $HOME