SG2 Flashcards

1
Q

4-File Management

Q: What command is used to create an empty file?

A

A: touch filename

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

4-File Management

Q: How do you copy a file?

A

A: cp source destination

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

4-File Management

Q: How do you move a file?

A

A: mv source destination

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

4-File Management

Q: What command removes a file?

A

A: rm filename

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

4-File Management

Q: How do you display the contents of a file?

A

A: Use cat, less, or more.

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

5-User Management

Q: How do you check your username?

A

A: whoami

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

5-User Management

Q: What command shows logged-in users?

A

A: who or w

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

5-User Management

Q: How do you switch users?

A

A: su username or sudo -i

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

5-User Management

Q: How do you change a user’s password?

A

A: passwd username

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

6-File Permissions & Ownership

Q: What does chmod 755 file do?

A

A: Grants the owner full permissions and gives read & execute permissions to others.

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

6-File Permissions & Ownership

Q: How do you change file ownership?

A

A: chown user:group filename

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

6-File Permissions & Ownership

Q: What does ls -l display?

A

A: Detailed file information, including permissions, owner, and size.

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