More Linux Flashcards

1
Q

How do you check the memory usage of your system?

A

Use the free command or top command and look at the memory section.

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

What command can you use to display the disk usage of a directory?

A

Use the du command (Disk Usage).

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

How do you add a user to a specific group in Linux?

A

Use the usermod -aG command, for example: sudo usermod -aG groupname username.

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

What is the purpose of the chown command?

A

Changes the owner of a file or directory.

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

How do you display the routing table in Linux?

A

Use the netstat -r command or ip route command.

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

What command is used to manage software packages in Red Hat-based systems?

A

Use the yum or dnf command.

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

How do you check the version of your Linux distribution?

A

Use the lsb_release -a command or check the contents of /etc/os-release.

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

What is the purpose of the ps command?

A

Lists the currently running processes.

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

How do you set up SSH key-based authentication?

A

Generate SSH key pair with ssh-keygen, then add the public key to the ~/.ssh/authorized_keys file on the remote server.

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

How do you restart the SSH service in Linux?

A

Use the sudo systemctl restart sshd command.

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

What is the purpose of the /etc/passwd file?

A

Stores essential information about users on the system.

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

How do you check the integrity of system files in Linux?

A

Use the md5sum or sha256sum command to generate checksums and compare them with known good checksums.

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

What command is used to display real-time network statistics?

A

Use the iftop command.

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

How do you set up a static route in Linux?

A

Use the ip route add command to add a static route.

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

What is the purpose of the journalctl command?

A

Used to query and display messages from the systemd journal.

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

How do you install a package from source code in Linux?

A

Use ./configure, make, and make install commands.

17
Q

What is the purpose of the /etc/sudoers file?

A

Configures sudo privileges for users and groups.

18
Q

How do you check the status of all services in Linux?

A

Use the systemctl status command without specifying a service name.

19
Q

What is the purpose of the sysctl command?

A

View, set, and manage kernel parameters in real-time.

20
Q

How do you check the listening ports on your system?

A

Use the netstat -tuln command or ss -tuln command.

21
Q
A