Unit 1 - Practice Quiz
CSC202
1 Which component of the Linux operating system is responsible for managing hardware resources and acts as the bridge between software and hardware?
2 What is the primary license under which the Linux kernel is released, ensuring it remains free and open-source software?
3 In the context of Linux user interaction, what is Bash?
4 Which key combination is used in Bash to complete a command or file path automatically?
5
Which command allows a user to view the manual page for a specific command, such as ls?
help ls
man ls
doc ls
ls --manual
6
In a manual page (man), which section number typically contains information about configuration files (e.g., /etc/passwd)?
7 Which file contains the definitions of all user accounts on a Linux system, including the username, UID, and default shell?
/etc/shadow
/etc/group
/etc/passwd
/etc/users
8 Where are the encrypted password hashes for user accounts stored securely?
/etc/passwd
/etc/shadow
/etc/security
/boot/passwords
9 Which command is used to create a new user account on the system?
mkuser
useradd
newuser
usermod
10
What is the purpose of the /etc/skel directory?
11 Which command is used to modify an existing user's attributes, such as their login shell or home directory?
useradd
usermod
groupmod
chown
12 Which command deletes a user account and simultaneously removes their home directory?
userdel user
userdel -r user
rmuser user
deluser --home user
13
In the /etc/passwd file, what does the value 0 in the UID field signify?
14 Which command allows a standard user to execute a command with superuser (root) privileges?
admin
sudo
exec
root
15
Which file defines the users and groups allowed to use the sudo command?
/etc/admin
/etc/su
/etc/sudoers
/etc/shadow
16
What is the safest way to edit the /etc/sudoers file?
nano /etc/sudoers
vi /etc/sudoers
visudo command
cat > /etc/sudoers
17
A user is unable to login. You check /etc/passwd and see their shell is set to /sbin/nologin. What does this mean?
18 Which command is used to add a new group to the system?
groupadd
addgroup
mkgroup
usergroup
19
You need to add the user jdoe to the existing group developers without removing them from their other groups. Which command should you use?
usermod -g developers jdoe
usermod -aG developers jdoe
useradd -G developers jdoe
groupmod -U jdoe developers
20 Which command displays the current user's UID, GID, and group memberships?
who
w
id
finger
21 During Linux installation, which partition is strictly used as virtual memory when physical RAM is full?
/boot
/home
/var
22 Which filesystem is the most common default for modern Linux distributions?
23 What is the root of the Linux filesystem hierarchy?
C:\
/
/root
/home
24 Which directory typically contains the Linux kernel and bootloader files?
/bin
/boot
/sys
/dev
25 What is the very first step in the boot process of a computer, occurring before the Linux bootloader starts?
systemd
26 Which software is responsible for loading the Linux kernel into memory?
27
What is the process ID (PID) of the init process or systemd, which is the first process started by the kernel?
28
Under systemd, what is the equivalent of a 'runlevel' used to define the state of the system (e.g., graphical mode vs. text mode)?
29
Which systemd target corresponds to a multi-user text-mode environment with networking enabled (formerly runlevel 3)?
poweroff.target
rescue.target
multi-user.target
graphical.target
30 Which command allows you to view the kernel ring buffer messages, often used to troubleshoot boot hardware issues?
cat /var/log/messages
dmesg
journalctl
uptime
31 Where is the main configuration file for GRUB 2 typically located?
/etc/grub.conf
/boot/grub2/grub.cfg
/etc/sysconfig/grub
/proc/grub
32
Which command is used to set the default boot target in systemd?
systemctl isolate
systemctl default
systemctl set-default
init default
33 When troubleshooting a user who cannot run a specific command due to permissions, which command displays the permissions of a file?
ls -l
ps -ef
chmod
chown
34 If a user's password has expired, which command can an administrator use to force or manage password expiration policies?
passwd
chage
usermod
expire
35 Which Bash history expansion command repeats the last command executed?
!!
!$
!-
^r
36 Which variable represents the current user's home directory in Bash?
$USER
$HOME
$PATH
$PWD
37
What is the effect of the command su - (or su -l) compared to just su?
38
Which file system type is required for the partition mounted at /boot/efi on UEFI systems?
39 A user gets a 'Permission denied' error when trying to enter a directory. Which permission bit do they lack on that directory?
40 Which command is used to lock a user account password so they cannot login?
passwd -l user
passwd -u user
userdel user
chmod 000 user
41
In the /etc/group file, what is the format of each line?
42
What does the command echo $? display?
43 Which utility provides a concise, single-line description of a command?
man
whatis
whereis
info
44
If you modify /etc/default/grub, which command must run to apply changes on a standard BIOS/MBR system (Debian/Ubuntu based example)?
update-grub
grub-install
systemctl restart grub
reboot
45
What is the function of the initramfs (Initial RAM Filesystem) during boot?
46 Which command removes a group from the system?
delgroup
groupdel
rmgroup
groupremove
47
What is the result of running type ls in Bash?
ls command.
ls is an alias, a built-in, or an external file.
ls.
ls.
48 Which directory contains device nodes representing hardware components?
/dev
/proc
/sys
/mnt
49
A user reports they cannot save a file because the 'Disk is full', but df -h shows space is available. What else should you check?
df -i).
50 Which boot parameter can be added to the kernel line in GRUB to boot directly into a root shell for recovery?
root=shell
init=/bin/bash
mode=rescue
boot=recovery