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
/dev
/bin
/var
3 Which command is used to display the absolute path of the current working directory?
path
cd
ls
pwd
4
Which flag is used with the ls command to view hidden files (files starting with a dot)?
-h
-a
-R
-l
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/passwd
/usr/bin/passwd
/etc/group
/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?
locate
find
cat
grep
13 Which command is used to create a new directory?
mkfile
touch
newdir
mkdir
14 In Debian-based systems (like Ubuntu), which command updates the local package index?
apt install
apt search
apt update
apt upgrade
15 Which character represents the user's home directory in the shell?
#
/
.
~
16 What is the command to change the owner of a file?
chmod
chgrp
usermod
chown
17 Which file contains the definition of user groups and their members?
/etc/users
/etc/shadow
/var/groups
/etc/group
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?
users-remove
rmuser
userdel
deluser
20
Which package manager is the modern successor to yum in Fedora and RHEL distributions?
pacman
zypper
apt
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?
touch
nano
make
create
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
/tmp
/opt
/proc
25 Which command allows a user to change their own password?
passwd
chpass
usermod
pwd
26
What is the User ID (UID) of the root user?
27 Which command displays the last few lines of a file?
less
tail
bottom
head
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?
cp -l
ln -s
ln
link
32
Which file in the /etc directory defines the mapping of hostnames to IP addresses locally?
/etc/network
/etc/resolv.conf
/etc/hostname
/etc/hosts
33 Which command is used to add a new group to the system?
mkgroup
groupadd
newgroup
addgroup
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?
-r
-f
-d
-a
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?
cd
su
sw
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 remove
apt purge
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?
ls shell
echo $SHELL
cat /etc/shells
whoami
44 Which directory contains the device files representing hardware components?
/sys
/mnt
/dev
/media
45
How do you count the number of lines in a file named data.txt?
ls -l data.txt
nl data.txt
count data.txt
wc -l data.txt
46 Which command creates a shortcut command or overrides a command with specific options?
link
export
define
alias
47 Which command is used to modify the group membership of an existing user?
usermod
chmod
chgrp
groupmod
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?