Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 384 Bytes

File metadata and controls

21 lines (14 loc) · 384 Bytes

Check If A User Exists

We can check if a user exists on Linux System by id command.

id - print real and effective user and group IDs

Example

id -u jungle
1000

If a user does not exists on system, it throws an error. For example -

id -u unknown
id: ‘unknown’: no such user

Source: StackOverFlow