我试过了echo $GID
,但什么也没得到。但是,我可以使用得到 1000 id -g
,它们之间有什么区别?
id -u => 1000
id -g => 1000
echo $UID => 1000
echo $GID =>
输出id
:
uid=1000(user) gid=1000(user) groups=1000(user),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare),999(docker)
输出groups
:
user adm cdrom sudo dip plugdev lpadmin sambashare docker
Ubuntu 版本:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial