User Information Flashcards

(21 cards)

1
Q

What does the whoami command do?

A

Displays the username of the currently logged-in user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why is whoami useful?

A

For confirming active session identity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Example command for whoami?

A

whoami

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Example output for whoami?

A

admin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the id command display?

A

Detailed information about the current user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What details does id include?

A

User ID (UID), group ID (GID), and group memberships.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why is id useful?

A

Managing file permissions and troubleshooting access issues.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Example command for id?

A

id

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Example output for id?

A

uid=1001(admin) gid=1001(admin) groups=1001(admin),27(sudo)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is UID?

A

The user’s unique identifier.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is GID?

A

The primary group’s identifier.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does groups command show?

A

All groups the current user belongs to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why use groups command?

A

To verify user access and permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Example command for groups?

A

groups

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Example output for groups?

A

admin sudo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does getent passwd do?

A

Queries the system’s user database for all user entries.

17
Q

What data does getent passwd retrieve?

A

Data for both local and networked users.

18
Q

Why is getent passwd useful?

A

Auditing and troubleshooting user-related issues.

19
Q

Example command for getent passwd?

A

getent passwd

20
Q

Example output for getent passwd?

A

admin:x:1001:1001:Admin User:/home/admin:/bin/bash

21
Q

What details are included in getent passwd output?

A

Username, UID, GID, home directory, and login shell.