Linux Commands Examples

A great documentation place for Linux commands

id

print real and effective user and group IDs

Synopsis

id [OPTION]... [USERNAME]


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source

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 in 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?

No. 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).

0
source

Remove Google Chrome Unique ID on Linux

Easy, it is in your Local State file.

~/.config/google-chrome/Local State

Look for user_experience_metrics (on mine it's near the bottom of the file) then client_id. Take that out and you should be good.

description

Print user and group information for the specified USERNAME, or (when USERNAME omitted) for the current user.

-a

ignore, for compatibility with other versions

-Z, --context

print only the security context of the current user

-g, --group

print only the effective group ID

-G, --groups

print all group IDs

-n, --name

print a name instead of a number, for -ugG

-r, --real

print the real ID instead of the effective ID, with -ugG

-u, --user

print only the effective user ID

--help

display this help and exit

--version

output version information and exit

Without any OPTION, print some useful set of identified information.

copyright

Copyright © 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

reporting bugs

Report id bugs to bug-coreutils[:at:]gnu[:dot:]org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report id translation bugs to <http://translationproject.org/team/>


see also

The full documentation for id is maintained as a Texinfo manual. If the info and id programs are properly installed at your site, the command

info coreutils 'id invocation'

should give you access to the complete manual.


author

Written by Arnold Robbins and David MacKenzie.

How can this site be more helpful to YOU ?


give  feedback