我尝试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