Linux & Security Foundations Flashcards

(52 cards)

1
Q

What does ls -la do?

A

Lists all files including hidden ones, in long format showing permissions, owner, size, and date.

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

What does the -l flag do in ls -la?

A

Shows the long format — permissions, owner, size, and modification date.

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

What does the -a flag do in ls -la?

A

Shows hidden files — files whose names start with a dot (.).

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

What is the /etc directory?

A

Stores system-wide configuration files. Example: /etc/passwd, /etc/hosts.

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

What does chmod 755 file.sh mean?

A

Owner: read, write, execute. Group: read, execute. Others: read, execute.

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

What do the three digits in chmod represent?

A

First digit = owner permissions. Second = group. Third = others.

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

What number represents read, write, and execute in chmod?

A

7 (4+2+1 = read + write + execute).

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

What is the difference between /dev/sda and /dev/sda1?

A

/dev/sda is the whole physical disk. /dev/sda1 is the first partition on that disk.

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

What does df -h show?

A

Disk space usage for all mounted filesystems in human-readable format.

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

What is a mount point?

A

A directory where a filesystem is attached so the OS can access it.

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

What does grep -r ‘error’ /var/log/ do?

A

Searches recursively through all files in /var/log/ for lines containing the word ‘error’.

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

What does the -r flag do in grep?

A

Makes the search recursive — it searches inside all subdirectories.

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

What is ext4?

A

The default Linux filesystem.

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

What is NTFS?

A

The default Windows filesystem.

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

What does find / -name ‘*.log’ 2>/dev/null do?

A

Searches the entire filesystem for files ending in .log and silences permission errors.

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

What does 2>/dev/null do in a command?

A

Redirects error messages to /dev/null, effectively silencing them.

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

What is the /proc directory?

A

A virtual filesystem that exposes real-time kernel and process information. Not stored on disk.

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

What does /etc/passwd store?

A

One entry per user: username, UID, GID, home directory, and shell.

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

What does the x mean in /etc/passwd?

A

The password hash is stored in /etc/shadow, not here.

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

What is UID 0?

A

The root user. Any account with UID 0 has full system privileges.

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

What does /etc/shadow store?

A

Hashed passwords for all user accounts. Only readable by root.

22
Q

What does sudo -l do?

A

Lists the sudo privileges granted to the current user.

23
Q

What is /etc/sudoers?

A

The file that defines who can use sudo and what commands they can run with elevated privileges.

24
Q

What tool should you use to edit /etc/sudoers?

A

visudo — it validates the syntax before saving to prevent errors that could lock you out.

25
What is the difference between useradd and adduser?
useradd is low-level with no prompts. adduser is interactive and sets up home directory and password.
26
What does usermod -aG sudo fabio do?
Adds fabio to the sudo group without removing them from other groups.
27
What does the -a flag do in usermod?
Appends the user to the group without removing them from existing groups.
28
What is the principle of least privilege?
Users and processes should have only the minimum access needed to do their job.
29
What does passwd -l username do?
Locks a user account, preventing login.
30
Why is direct root login often disabled?
To force use of sudo, which creates an audit trail and reduces attack surface.
31
What does the SUID bit do?
Makes a file run as the file owner (often root), regardless of who launches it.
32
Give a real example of SUID in use.
The passwd command uses SUID so it can modify /etc/shadow even when run by a regular user.
33
What is the CIA Triad?
Confidentiality, Integrity, and Availability — the three core principles of information security.
34
What is Confidentiality in the CIA Triad?
Data is only accessible to authorised people.
35
What is Integrity in the CIA Triad?
Data is accurate and has not been altered.
36
What is Availability in the CIA Triad?
Systems and data are accessible when needed.
37
What is authentication?
The process of proving who you are. Example: entering a password or fingerprint scan.
38
What is authorisation?
What you are allowed to do after your identity has been verified.
39
What is the difference between authentication and authorisation?
Authentication = proving who you are. Authorisation = what you are allowed to do.
40
What is a brute-force attack?
Systematically trying every possible password combination until one works.
41
Name two defences against brute-force attacks.
Account lockout after failed attempts and rate limiting.
42
What is a phishing attack?
A social engineering attack using deceptive emails to trick users into revealing credentials or installing malware.
43
What is MFA?
Multi-Factor Authentication — requiring two or more types of verification to log in.
44
What are the three factors in MFA?
Something you know (password), something you have (phone/token), something you are (biometric).
45
What is a man-in-the-middle attack?
An attacker secretly intercepts communication between two parties who believe they are talking directly.
46
What is a SIEM?
Security Information and Event Management — a system that collects and analyses logs from across an environment to detect threats.
47
Give an example of a SIEM tool.
Splunk or Microsoft Sentinel.
48
What is defence in depth?
A security strategy that uses multiple layers of controls so that if one fails, others still protect the system.
49
What is a CVE?
Common Vulnerabilities and Exposures — a standardised ID for publicly known security vulnerabilities. Example: CVE-2014-0160 is Heartbleed.
50
What is a vulnerability?
A weakness in a system, such as unpatched software.
51
What is a threat?
Something or someone that could exploit a vulnerability.
52
What is risk in a security context?
The likelihood and impact of a threat exploiting a vulnerability.