Unit 1: Linux Ecosystem & Infrastructure - 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?
/bin
/var
/dev
/etc
3 Which command is used to display the absolute path of the current working directory?
path
pwd
cd
ls
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?
rn
rm
cp
mv
9 Which file stores the encrypted user passwords in a modern Linux system?
/usr/bin/passwd
/etc/passwd
/etc/shadow
/etc/group
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?
find
cat
grep
locate
13 Which command is used to create a new directory?
newdir
mkdir
touch
mkfile
14 In Debian-based systems (like Ubuntu), which command updates the local package index?
apt update
apt upgrade
apt search
apt install
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
chown
usermod
chgrp
17 Which file contains the definition of user groups and their members?
/etc/shadow
/etc/group
/var/groups
/etc/users
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?
rmuser
users-remove
userdel
deluser
20
Which package manager is the modern successor to yum in Fedora and RHEL distributions?
zypper
apt
dnf
pacman
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
touch
make
nano
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
/proc
/var
/opt
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?
bottom
head
less
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?
cp -l
ln -s
ln
link
32
Which file in the /etc directory defines the mapping of hostnames to IP addresses locally?
/etc/hostname
/etc/resolv.conf
/etc/network
/etc/hosts
33 Which command is used to add a new group to the system?
mkgroup
newgroup
groupadd
addgroup
34 What is the package manager used by Arch Linux?
yum
pacman
apt
emerge
35
Which option in rm allows for the recursive deletion of directories and their contents?
-a
-d
-f
-r
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?
su
user
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 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?
cat /etc/shells
ls shell
whoami
echo $SHELL
44 Which directory contains the device files representing hardware components?
/mnt
/media
/dev
/sys
45
How do you count the number of lines in a file named data.txt?
wc -l data.txt
nl data.txt
count data.txt
ls -l data.txt
46 Which command creates a shortcut command or overrides a command with specific options?
alias
define
link
export
47 Which command is used to modify the group membership of an existing user?
usermod
chmod
groupmod
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?
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →