wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Cybersecurity PBQ Quiz

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

What does this command do? chmod 600 private.key

a)

Makes the file readable only by the owner

b)

Allows group and others to execute the file

c)

Denies access to everyone

d)

Grants full access to owner

2.

What does this command do? nmap -sV 10.0.0.5

a)

Detect open ports

b)

Bypass firewalls

c)

Identify services and versions

d)

Spoof IP address

3.

Which command blocks inbound SMTP traffic on port 25?

a)

iptables -A INPUT -p tcp --dport 25 -j DROP

b)

iptables -A OUTPUT -p tcp --dport 25 -j ACCEPT

c)

iptables -P INPUT DROP

d)

iptables -F

4.

What does this command do? scp file.txt user@10.0.0.10:/tmp/

a)

Copies file from remote to local

b)

Sends file.txt to a remote machine via SSH

c)

Deletes the file after sending

d)

Works without SSH access

5.

What is the effect of this command? chmod 755 script.sh

a)

Grants execute permission to owner, group, and others

b)

Gives full access to all users

c)

Makes the script readable, written by owner and executable by all

d)

See restrictive permissions denying access to others

6.

What is the purpose of this command?

netstat -a

a)

Displays active listening ports

b)

Lists user login history

c)

Shows hidden processes

d)

Disables network traffic

7.

What does the following command do? chown user1 file.txt

a)

Changes file owner to user1

b)

Adds user1 to the file’s access control list (ACL)

c)

Changes the file’s permissions to match user1’s default

d)

Changes permissions to 777

8.

Which command is used to view the system hostname?

a)

hostname

b)

whoami

c)

uname -r

d)

id

9.

What does this command do? ssh user@10.0.0.5

a)

Establishes a remote login session

b)

Sends a file via SCP

c)

Scans ports on the host

d)

Starts a web server

10.

Which command shows the current working directory?

a)

pwd

b)

cd

c)

ls -la

d)

ls -a

11.

Which command lists currently logged in users?

a)

who

b)

id

c)

groups

d)

hostname

12.

What does this command do? tcpdump -i eth0

a)

Captures packets on the eth0 interface

b)

Disables the firewall

c)

Starts network scanning

d)

Closes all TCP ports

13.

Which nmap command performs a basic TCP scan on a target host at 192.168.1.1?

a)

nmap -sS 192.168.1.1

b)

nmap -A -p 443 192.168.1.1

c)

nmap -u 192.168.1.1

d)

nmap -Pn 192.168.1.1/24

14.

What does this command do? sudo systemctl restart ssh

a)

Restarts the SSH service

b)

Reboots the system

c)

Deletes SSH configuration

d)

Logs the user out

15.

What does the 'ls -l' command show?

a)

Long listing of files with permissions

b)

Files in alphabetical order

c)

Only directories

d)

Hidden files only

16.

What is the output of 'whoami'?

a)

Current logged-in username

b)

Computer hostname

c)

Group ID

d)

Home directory

17.

Which command sets the default permissions mask for new files?

a)

umask

b)

chmod

c)

chown

d)

passwd

18.

What does this command do? ls -la /home/user/

a)

Lists all files including hidden ones in long format

b)

Removes all files in /home/user/

c)

Changes file ownership

d)

Shows running processes

19.

What does the following command do?

netstat -an | grep LISTEN

a)

Lists all active network connections with IP addresses only

b)

Displays all services currently listening for incoming connections

c)

Shows the names of users running network services

d)

Filters all traffic

20.

Which command is used to change directories?

a)

cd

b)

chmod

c)

pwd

d)

ls

21.

What does this command do? sudo systemctl restart apache2

a)

Restarts the Apache2 service

b)

Uninstalls Apache2

c)

Checks Apache logs

d)

Creates a backup of Apache

22.

What does this command accomplish?

id user1

a)

Shows UID and groups for user1

b)

Deletes user1

c)

Changes user1 password

d)

Switches to user1 account

23.

Which command initiates a ping request?

a)

ping 8.8.8.8

b)

tcpdump 8.8.8.8

c)

nmap 8.8.8.8

d)

traceroute 8.8.8.8

24.

What should you select to define a single IP address in a firewall rule?

a)

Any host

b)

Network range

c)

Single host or alias

d)

Multiple hosts

25.

Which iptables command allows incoming HTTP traffic on port 80?

a)

iptables -A INPUT -p tcp --dport 80 -j ACCEPT

b)

iptables -D INPUT -p tcp --dport 80 -j DROP

c)

iptables -A OUTPUT -p tcp --sport 80 -j ACCEPT

d)

iptables -A INPUT -p udp --dport 80 -j ACCEPT