Unit 1 - Practice Quiz
1 Which of the following components constitutes the core interface between a computer's hardware and its processes in the Linux ecosystem?
2 In the Linux Filesystem Hierarchy Standard (FHS), which directory is primarily used for system-wide configuration files?
/dev
/var
/bin
/etc
3 Which command is used to display the absolute path of the current working directory?
cd
ls
path
pwd
4
Which flag is used with the ls command to view hidden files (files starting with a dot)?
-h
-l
-R
-a
5
Which Linux distribution family uses rpm as its low-level package manager?
6
What is the primary function of the sudo command?
7
In the context of file permissions, what is the numeric (octal) value of r-x?
8 Which command is used to rename a file or move it to a different directory?
cp
rm
mv
rn
9 Which file stores the encrypted user passwords in a modern Linux system?
/etc/group
/usr/bin/passwd
/etc/shadow
/etc/passwd
10 Which operator is used to redirect standard output to a file, overwriting the file if it exists?
>
>>
<
|
11
What is the PID (Process ID) of the init process or systemd (the first process started by the kernel)?
12 Which command allows you to search for a specific pattern of text within files?
grep
locate
find
cat
13 Which command is used to create a new directory?
touch
mkdir
newdir
mkfile
14 In Debian-based systems (like Ubuntu), which command updates the local package index?
apt install
apt search
apt upgrade
apt update
15 Which character represents the user's home directory in the shell?
~
/
#
.
16 What is the command to change the owner of a file?
usermod
chmod
chgrp
chown
17 Which file contains the definition of user groups and their members?
/etc/users
/var/groups
/etc/group
/etc/shadow
18
What does the | (pipe) operator do in the command line?
19 Which command is used to delete a user account and optionally their home directory?
deluser
userdel
rmuser
users-remove
20
Which package manager is the modern successor to yum in Fedora and RHEL distributions?
apt
dnf
pacman
zypper
21
What is the purpose of the man command?
22 Which command creates an empty file or updates the timestamp of an existing file?
create
nano
touch
make
23
When using chmod, what does the permission set 755 represent?
24
Which directory typically contains variable data files such as logs (/log), mail, and print spools?
/var
/opt
/proc
/tmp
25 Which command allows a user to change their own password?
pwd
passwd
chpass
usermod
26
What is the User ID (UID) of the root user?
27 Which command displays the last few lines of a file?
less
head
bottom
tail
28 Which symbol is used as a wildcard to represent any number of characters in a filename?
%
$
?
*
29
In the command ls -l > filelist.txt, what is filelist.txt?
30 Which of the following is NOT a Debian-based Linux distribution?
31 Which command is used to create a soft (symbolic) link?
ln -s
link
cp -l
ln
32
Which file in the /etc directory defines the mapping of hostnames to IP addresses locally?
/etc/hostname
/etc/hosts
/etc/network
/etc/resolv.conf
33 Which command is used to add a new group to the system?
addgroup
newgroup
mkgroup
groupadd
34 What is the package manager used by Arch Linux?
emerge
apt
yum
pacman
35
Which option in rm allows for the recursive deletion of directories and their contents?
-f
-a
-r
-d
36
What does the command history do?
37 If a user wants to append output to a file without overwriting it, which operator should be used?
>
>>
2>
|
38 Which command allows you to switch to another user account in the terminal?
sw
cd
su
user
39
What is the function of the cat command?
40
In the /etc/passwd file, what does the x in the second field represent?
/etc/shadow
41 Which command removes a package on a Debian/Ubuntu system but leaves the configuration files intact?
apt delete
apt purge
apt remove
apt erase
42 What is the standard input (stdin) file descriptor number?
43 Which command would you use to verify which shell you are currently using?
whoami
echo $SHELL
cat /etc/shells
ls shell
44 Which directory contains the device files representing hardware components?
/mnt
/sys
/media
/dev
45
How do you count the number of lines in a file named data.txt?
ls -l data.txt
wc -l data.txt
count data.txt
nl data.txt
46 Which command creates a shortcut command or overrides a command with specific options?
link
alias
define
export
47 Which command is used to modify the group membership of an existing user?
groupmod
chgrp
usermod
chmod
48
What does the dpkg command handle?
.deb files
49 If you want to move up one level in the directory tree, which command do you use?
cd /
cd .
cd ~
cd ..
50 What is a 'Repository' in Linux package management?