print real and effective user and group IDs
add an example, a script, a trick and tips
Does the root account always have UID/GID 0?
There are actually two parts to your question.
Does the superuser account always have uid/gid 0/0 on Linux?
Yes. As is pointed out by Rich Homolka
a comment, there's code in the kernel which explicitly checks
for uid 0 when needing to check for the root user, which means
that root always has at least uid 0.
Is the name of the user account with uid 0 always
root is just a name, listed in
/etc/passwd or some other authentication store. You could just as
well call the account
admin, and the OS itself won't
care, but some applications might not quite like it because they
expect there to exist a privileged account named
root. Calling the uid 0 account on a *nix
root is a very strongly held convention, but it
isn't required by the system.
It's also worth noting that, as pointed out by Simon
Richter, on BSDs there often exists a second uid 0
account, by convention named
toor (which is "root"
spelled backwards). For example, FreeBSD uses it to provide a root user with a
customized shell setting, leaving the root user with a default
shell which is guaranteed to exist on the system's root
partition (useful for recovery purposes).
Remove Google Chrome Unique ID on Linux
Easy, it is in your Local State file.
user_experience_metrics (on mine it's near
the bottom of the file) then
client_id. Take that
out and you should be good.
Print user and
group information for the specified USERNAME, or (when
USERNAME omitted) for the current user.
ignore, for compatibility with other versions
print only the security context
of the current user
print only the effective group
print all group IDs
print a name instead of a
number, for -ugG
print the real ID instead of
the effective ID, with -ugG
print only the effective user
display this help and exit
output version information and
OPTION, print some useful set of identified information.
Copyright © 2012 Free Software Foundation, Inc. License
GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute
it. There is NO WARRANTY, to the extent permitted by law.
Report id bugs to bug-coreutils[:at:]gnu[:dot:]org
GNU coreutils home page:
General help using GNU software:
Report id translation bugs to
documentation for id is maintained as a Texinfo
manual. If the info and id programs are
properly installed at your site, the command
coreutils 'id invocation'
should give you
access to the complete manual.
Arnold Robbins and David MacKenzie.