Unit 1 - Practice Quiz
CSE325
1 Which component of the Linux operating system is responsible for managing system resources and acting as an interface between hardware and software?
2 Which of the following distributions is directly based on Debian?
3 In the Linux File System Hierarchy (FHS), which directory is primarily used for system-wide configuration files?
/bin
/etc
/var
/dev
4 What is the primary function of the Shell in Linux?
5
Which Linux distribution family uses the .rpm package format?
6 Which command is used to display the current working directory?
ls
cwd
pwd
cd
7
To list all files, including hidden files (those starting with a dot), which flag should be used with the ls command?
ls -l
ls -a
ls -h
ls -R
8 Which command is used to change the current directory to the user's home directory?
cd ..
cd /
cd ~
cd -
9
What is the result of the command cd ..?
10 Which command allows you to create an empty file or update the timestamp of an existing file?
mkdir
touch
cat
nano
11 Which operator is used to redirect standard output to a file, overwriting the file if it exists?
>>
|
<
>
12 Which command is used to display the contents of a file on the terminal?
cat
ls
echo
touch
13
To copy a directory and all its contents recursively, which flag must be used with cp?
-f
-r
-i
-v
14 Which command removes a directory that is not empty?
rmdir directory_name
rm -r directory_name
rm directory_name
del directory_name
15
What does the mv command do?
16 Which command shows the first 10 lines of a file by default?
tail
top
less
head
17 Which symbol is used to pipe the output of one command as input to another command?
>
&
|
/
18
What is the correct syntax to search for the string "error" inside logfile.txt?
find "error" logfile.txt
search "error" logfile.txt
grep "error" logfile.txt
cat logfile.txt > "error"
19 Which file stores the list of all users on a Linux system?
/etc/users
/etc/passwd
/etc/shadow
/etc/group
20 Which file contains the encrypted passwords for users?
/etc/passwd
/etc/shadow
/etc/security
/etc/gshadow
21 What is the User ID (UID) of the root user?
22 Which command allows a standard user to execute a command with superuser (root) privileges?
su
admin
sudo
root
23 Which command is used to create a new user account?
newuser
useradd
mkuser
usermod
24 If we assign octal permissions 755 to a file, what is the equivalent symbolic representation?
-rwxr-xr-x
-rwxrwxrwx
-rw-r--r--
-r-xr-xr-x
25 How do you calculate the octal value for Read and Execute permission (no write)?
26 Which command is used to change the owner of a file?
chmod
chown
chgrp
passwd
27 Which command allows you to change a user's password?
chpass
passwd
usermod
setpass
28
To add an existing user john to the group developers, which command is appropriate?
usermod -aG developers john
groupadd john developers
useradd -g developers john
chmod developers john
29 Which command is used to delete a user account and their home directory?
userdel user
userdel -r user
deluser user
rmuser user
30
The file /etc/sudoers is edited safely using which command?
nano /etc/sudoers
visudo
sudoedit
vi /etc/sudoers
31 What is a package repository in Linux?
32 Which package manager command is used on Ubuntu/Debian systems to update the local package index?
apt update
apt upgrade
apt install
dpkg -i
33 Which command actually installs a new version of the packages currently installed on the system (Debian/Ubuntu)?
apt update
apt upgrade
apt refresh
apt dist
34 What is the primary package manager for CentOS 7 and RHEL 7?
apt
yum
pacman
zypper
35
Which low-level tool is used to manage .deb files directly?
rpm
dpkg
tar
make
36 What is a dependency in package management?
37 On an Arch Linux system, which command installs a package?
pacman -S package_name
apt install package_name
yum install package_name
dnf install package_name
38 Which command is used to remove a package and its configuration files on Debian-based systems?
apt remove
apt purge
apt delete
rm
39
What does the command man ls do?
ls command
ls in manual mode
ls
40 Which directory contains device files representing hardware components?
/hw
/dev
/proc
/sys
41 Which environment variable stores the directories the shell searches for executable commands?
$HOME
$USER
$PATH
$SHELL
42
To toggle the execute permission for the group on a file script.sh, which command is used?
chmod g+x script.sh
chmod u+x script.sh
chmod o+x script.sh
chmod a+x script.sh
43
What is the function of the history command?
44 Which wildcard character represents 'zero or more characters' in filename expansion?
?
*
#
%
45
What is the purpose of the /tmp directory?
46 How do you switch to the previous user account you were logged in as?
exit
back
return
switch
47
What is the output of the command whoami?
48 Which file permission set is represented by the octal number 644?
rw-r--r--
rwxr-xr-x
rw-rw-rw-
r--r--r--
49
When compiling software from source code, which command typically follows ./configure and make?
make install
install start
apt install
run
50 Which of the following is NOT a Linux Desktop Environment?