Skip to content

Instantly share code, notes, and snippets.

@mekicha
Created March 1, 2018 14:24
Show Gist options
  • Select an option

  • Save mekicha/838281d86ab27cd796834761b113a8f8 to your computer and use it in GitHub Desktop.

Select an option

Save mekicha/838281d86ab27cd796834761b113a8f8 to your computer and use it in GitHub Desktop.
copied from udacity linux course for easy reference.

/etc/passwd This is a very important file on your system! It's used to keep track of all users on the system. Run cat /etc/passwd and look at the output; each line is organized in this format:

username:password:UID:GID:UID info:home directory:command/shell

Let’s run through what each of those mean:

username: the user’s login name password: the password, will simply be an x if it’s encrypted user ID (UID): the user’s ID number in the system. 0 is root, 1-99 are for predefined users, and 100-999 are for other system accounts group ID (GID): Primary group ID, stored in /etc/group. user ID info: Metadata about the user; phone, email, name, etc. home directory: Where the user is sent upon login. Generally /home/ command/shell: The absolute path of a command or shell (usually /bin/bash).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment