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?
/etc
/var
/dev
/bin
3 Which command is used to display the absolute path of the current working directory?
pwd
cd
path
ls
4
Which flag is used with the ls command to view hidden files (files starting with a dot)?
-R
-a
-l
-h
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?
rn
cp
mv
rm
9 Which file stores the encrypted user passwords in a modern Linux system?
/etc/group
/usr/bin/passwd
/etc/passwd
/etc/shadow
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
cat
find
13 Which command is used to create a new directory?
touch
mkdir
mkfile
newdir
14 In Debian-based systems (like Ubuntu), which command updates the local package index?
apt update
apt install
apt upgrade
apt search
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
chown
chgrp
17 Which file contains the definition of user groups and their members?
/etc/users
/etc/shadow
/etc/group
/var/groups
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?
userdel
users-remove
deluser
rmuser
20
Which package manager is the modern successor to yum in Fedora and RHEL distributions?
pacman
apt
zypper
dnf
21
What is the purpose of the man command?
22 Which command creates an empty file or updates the timestamp of an existing file?
nano
create
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?
/tmp
/var
/proc
/opt
25 Which command allows a user to change their own password?
pwd
usermod
passwd
chpass
26
What is the User ID (UID) of the root user?
27 Which command displays the last few lines of a file?
tail
bottom
head
less
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
cp -l
link
ln -s
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
groupadd
mkgroup
34 What is the package manager used by Arch Linux?
apt
yum
pacman
emerge
35
Which option in rm allows for the recursive deletion of directories and their contents?
-d
-r
-a
-f
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?
user
su
sw
cd
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 remove
apt purge
apt delete
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?
echo $SHELL
ls shell
whoami
cat /etc/shells
44 Which directory contains the device files representing hardware components?
/dev
/mnt
/media
/sys
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?
alias
export
define
link
47 Which command is used to modify the group membership of an existing user?
chmod
groupmod
usermod
chgrp
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?