Part2 Flashcards

1
Q

What is a virtual machine?

A

A software-based simulation of a computer that runs an OS independently.

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

What is a hypervisor?

A

Software that creates and manages virtual machines (e.g., VirtualBox).

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

What is an ISO file?

A

A disk image containing the entire OS installation files (e.g., Debian ISO).

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

Why use virtualization?

A

To run multiple operating systems on one machine for testing or development.

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

What is Debian?

A

A stable and widely-used Linux distribution.

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

Name 3 essential Linux commands.

A

ls (list files), cd (change directory), mkdir (create directory).

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

Where are system configurations stored in Linux?

A

/etc directory.

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

How do you update software in Debian?

A

sudo apt update && sudo apt upgrade

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

What is the root user?

A

The superuser with full control over the system.

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

How do you create a new user in Debian?

A

sudo adduser username

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

What does sudo do?

A

Allows a user to run commands with root privileges.

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

How do you add a user to the sudo group?

A

sudo usermod -aG sudo username

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

How do you change a user password?

A

passwd username

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

What is SSH used for?

A

Securely accessing remote servers.

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

How do you connect to a server via SSH?

A

ssh user@ip_address

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

How do you disable root SSH login for security?

A

Edit /etc/ssh/sshd_config and set PermitRootLogin no.

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

How do you restart the SSH service?

A

sudo systemctl restart ssh

18
Q

What does UFW stand for?

A

Uncomplicated Firewall.

19
Q

How do you enable UFW?

A

sudo ufw enable

20
Q

How do you allow SSH through UFW?

A

sudo ufw allow 22

21
Q

How do you deny all incoming traffic?

A

sudo ufw default deny incoming

22
Q

How do you list all UFW rules?

A

sudo ufw status

23
Q

What is crontab used for?

A

Scheduling automated tasks at specified times.

24
Q

How do you open the crontab editor?

A

crontab -e

25
What does this cron job do? 0 2 * * * /path/to/script.sh
Runs the script at 2 AM every day.
26
How do you list current cron jobs?
crontab -l
27
How do you check disk usage?
df -h
28
How do you check running processes?
top or htop
29
Where are system logs stored?
/var/log
30
How do you view the last 20 lines of a log file?
tail -n 20 /path/to/logfile
31
What is partitioning?
Dividing a disk into sections to organize data.
32
What is LVM?
Logical Volume Manager – a flexible way to manage disk space.
33
How do you list all disk partitions?
lsblk
34
How do you create a new partition?
sudo fdisk /dev/sdX
35
What is a LAMP stack?
Linux, Apache, MySQL (MariaDB), PHP – used for web hosting.
36
What does Lighttpd do?
A lightweight web server alternative to Apache.
37
How do you start the Lighttpd service?
sudo systemctl start lighttpd
38
How do you install WordPress on Debian?
1. Install MariaDB, PHP, and Lighttpd. 2. Download WordPress and configure it to connect to the database.
39
How do you enforce password complexity?
Configure pam.d/common-password with rules for length and characters.
40
How do you lock a user after failed login attempts?
Use faillock or pam_tally2.
41
How do you disable unused ports?
sudo ufw deny port_number