Unit 4 - Practice Quiz
CSC202
1 Which command is used to display information about the PCI buses in the system and the devices connected to them?
lsusb
lspci
lscpu
lsblk
2 Which directory in the Linux filesystem is a virtual filesystem that provides an interface to kernel data structures, commonly used to gather hardware information?
/sys
/proc
/dev
/etc
3 Which command provides a detailed summary of the hardware configuration of the machine?
hwinfo
lshw
dmidecode
4 To view loaded kernel modules, which command should an administrator use?
lsmod
insmod
modprobe
rmmod
5 In the context of process management, what is the Process ID (PID) of the init or systemd process usually assigned?
6
Which signal is sent to a process when executing the command kill -9 <PID>?
SIGTERM
SIGINT
SIGKILL
SIGHUP
7 What is the range of "nice" values in Linux process scheduling?
8 Which command displays a dynamic, real-time view of running processes?
ps
top
jobs
nice
9 How do you move a process currently running in the foreground to the background?
Ctrl+C
Ctrl+Z then type bg
fg
Ctrl+D
10 Which command is used to find the PID of a process based on its name?
pgrep
fpid
getpid
locate
11 Which command displays the total amount of free and used physical and swap memory in the system?
memdisplay
free
df
du
12 What happens when the system runs out of physical RAM and Swap space?
13
Which file in /proc allows you to adjust the "swappiness" of the kernel (tendency to use swap)?
/proc/sys/vm/swappiness
/proc/meminfo
/proc/swap
/proc/sys/kernel/swap
14 Which command reports virtual memory statistics, including processes, memory, paging, block IO, and CPU activity?
iostat
vmstat
netstat
mpstat
15 Which command outputs the current kernel version?
uname -r
kernel -v
cat /etc/issue
ls -k
16
What is the primary difference between insmod and modprobe?
insmod resolves dependencies, modprobe does not.
modprobe resolves dependencies, insmod does not.
insmod removes modules, modprobe inserts them.
17 Which directory typically stores kernel modules?
/etc/modules
/usr/lib/modules/$(uname -r)
/boot/modules
/var/lib/kernel
18 Which command is used to modify kernel parameters at runtime without rebooting?
sysctl
modinfo
kernctl
param
19 Where are permanent kernel parameter changes typically stored?
/etc/sysctl.conf
/etc/kernel.conf
/proc/sys
/boot/config
20
Which systemctl command is used to ensure a service starts automatically at system boot?
systemctl start <service>
systemctl boot <service>
systemctl enable <service>
systemctl run <service>
21
What is the command to check the current status (running, failed, active) of a service named httpd?
systemctl check httpd
systemctl status httpd
service httpd check
ps httpd
22 Which directory contains systemd unit files installed by the package manager (vendor-supplied)?
/etc/systemd/system
/usr/lib/systemd/system
/var/run/systemd
/home/systemd
23 Which command would you use to reload the systemd manager configuration after creating a new unit file?
systemctl restart
systemctl daemon-reload
systemctl reload-all
init q
24 Which standard port does the SSH (Secure Shell) service listen on by default?
25 Which service is primarily responsible for synchronizing the system clock with network time servers?
26
What is the primary function of the cups service?
27 Which command is used to view and control the system locale and keyboard layout settings?
localectl
timectl
syslocale
langctl
28 If you want to change the system timezone to UTC, which command is correct?
date --set-timezone UTC
timedatectl set-timezone UTC
hwclock --utc
time --utc
29 Which environment variable determines the language and localization settings for the current shell session?
$PATH
$LANG
$SHELL
$HOME
30 An IPv4 address consists of how many bits?
31 Which of the following represents the loopback address in IPv4?
32
In CIDR notation, what is the subnet mask equivalent of /24?
33 What is the function of a Default Gateway?
34 Which file is primarily used to configure static hostname-to-IP address mappings locally?
/etc/hostname
/etc/hosts
/etc/resolv.conf
/etc/nsswitch.conf
35
Which command replaces the deprecated ifconfig for viewing and managing IP addresses?
ip addr
netstat
iwconfig
nmcli
36 Which file stores the addresses of DNS servers used by the system?
/etc/hosts
/etc/nameserver
/etc/resolv.conf
/etc/network
37
Using nmcli, how would you bring up a network connection named 'eth0-con'?
nmcli con up eth0-con
nmcli dev start eth0-con
nmcli net on eth0-con
nmcli eth0-con up
38 What is the unique hardware address assigned to a network interface controller called?
39 Which command allows an administrator to configure the hostname of the system persistently?
hostname set
hostnamectl set-hostname
ip hostname
sysctl hostname
40 Which file contains the main configuration for the SSH server daemon?
~/.ssh/config
/etc/ssh/ssh_config
/etc/ssh/sshd_config
/etc/sshd.conf
41 To allow password-less SSH login, where must the public key be placed on the remote server?
~/.ssh/id_rsa
~/.ssh/authorized_keys
/etc/ssh/keys
~/.ssh/known_hosts
42 Which command generates a new SSH public/private key pair?
ssh-add
ssh-keygen
ssh-agent
ssh-copy-id
43 Which command is used to securely copy files between hosts using the SSH protocol?
ftp
rcp
scp
telnet
44
Which option in /etc/ssh/sshd_config disables root login via SSH?
PermitRootLogin no
BlockRoot yes
RootLogin deny
DisableRoot 1
45 Which utility sends ICMP Echo Request packets to test connectivity between two hosts?
traceroute
dig
ping
netstat
46 Which command shows the path packets take to reach a network host, displaying each hop?
route
traceroute
ping
nslookup
47 If you cannot access a website by name but can by IP address, which service is likely failing?
48 Which command is used to query DNS nameservers to troubleshoot name resolution?
dig
grep
find
ifconfig
49
Which command is used to display listening ports and established connections (replacing netstat on newer systems)?
ss
ps
top
ls
50 Which command-line packet analyzer is used to capture and analyze network traffic in real-time?
wireshark
tcpdump
netcat
nmap