wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Final_quiz

Total questions: 97

Worksheet time: 50mins

Name
Class
Date
1.

In the command “echo -n hello”, what is “echo”

a)

argument

b)

command

c)

option

d)

switch

2.

In the command echo Welcome, what does the word Welcome represent with respect to the command?

a)

 

argument

b)

command

c)

flag

d)

switch

3.

Which of the following command can be used to remove the link?

a)

user can’t remove

b)

rm

c)

delete

d)

pwd

4.

Linux default shell is

a)

BAH shell

b)

SH shell

c)

ASH shell

d)

BASH shell

5.

Help for all commands is available at

a)

Man command

b)

Help command

c)

Join command

d)

Tput command

6.

The complete path name of a file or directory is

a)

Root name

b)

Tree name

c)

Relative path name

d)

Absolute path name

7.

What is a regular file in Linux?



a)

a) A file that stores data such as text, binaries, and media

b)

b) A container for organizing other files

c)

c) A type of device file used for hardware communication

d)

d) A shortcut to another file

8.

How can you identify a regular file using the ls -l command?


a)

a) It is marked with a d in the first column

b)

b) It is marked with a - in the first column

c)

c) It is marked with a c in the first column

d)


d) It is marked with a b in the first column

9.

What is a directory in Linux?

a)

a) A file used for inter-process communication

b)

b) A file used to store character data

c)

c) A container for organizing files and directories

d)

d) A shortcut to another file

10.

What is the primary role of the root (super user) in Linux?

a)

a) Managing services like SSH and mail

b)

b) Performing day-to-day tasks for regular users

c)

c) Full system administration with unrestricted access

d)

d) Running background tasks like logging

11.

How is the root user typically identified in Linux?

a)

a) By the prompt $

b)

b) By the username daemon

c)

c) By the prompt #

d)

d) By the home directory /home/root

12.

Which of the following is an example of a system user?

a)

a) john

b)

b) mail

c)

c) root

d)

d) developer

13.

What happens if a regular user tries to modify system files without sudo?

a)

a) The modification is successful.

b)

b) The system warns about insufficient permissions.

c)

c) The user automatically gains root privileges.

d)

d) The file is deleted.

14.

Which command can be used to switch to the root user?

a)

a) sudo

b)

b) su

c)

c) Both sudo and su

d)

d) useradd

15.

What are the three basic types of permissions in Unix/Linux?

a)

a) Read, Write, Execute

b)

b) Owner, Group, Others

c)

c) User, Group, World

d)

d) Read, Write, Delete

16.

Which command is used to display the current working directory?

a)

a) ls

b)

b) pwd

c)

c) cd

d)

d) mkdir

17.

How can you identify a regular file using the ls -l command?


a)

a) It is marked with a d in the first column

b)

b) It is marked with a - in the first column

c)

c) It is marked with a c in the first column

d)


d) It is marked with a b in the first column

18.

Which command can be used to switch to the root user?

a)

a) sudo

b)

b) su

c)

c) Both sudo and su

d)

d) useradd

19.

What is the first step before detaching a disk from an Azure VM?


a)

a) Stop the target VM

b)

b) Format the disk

c)

c) Unmount the disk

d)

d) Delete the disk from Azure

20.

Which command is used to unmount a disk in Linux?

a)

a) umount

b)

b) detach

c)

c) disk-remove

d)

d) mount-off

21.

What should be done after attaching a disk to a new VM to use it?

a)

a) Stop the VM

b)

b) Unmount the disk

c)

c) Format the disk

d)

d) delete the disk

22.

What happens if you do not unmount a disk before detaching it in Azure?




a)

a) The VM will crash.

b)

b) The disk will be formatted automatically.

c)

c) Data might get corrupted.

d)

d) The disk cannot be detached.

23.

Which option in the useradd command ensures a home directory is created for the new user?

a)

a) -s

b)

b) -d

c)

c) -m

d)

d) -u

24.

What is the primary purpose of the passwd command?

a)

a) To create a user

b)

b) To delete a user

c)

c) To set or change a user's password

d)

d) To list user details

25.

When you execute sudo passwd alice, what happens?


a)

a) The user alice is deleted.

b)

b) You are prompted to set or update the password for the user alice.

c)

c) The user alice is added to a group.

d)

d) The home directory of alice is updated.

26.

What is the purpose of the groupadd command?



a)

a) To add a user to a group

b)

b) To delete a group

c)

c) To create a new group

d)

d) To view group membership

27.

What does the -aG option in the usermod command do?



a)

a) Adds the user to a specified group and retains existing groups.

b)

b) Deletes the user from the specified group.

c)

c) Assigns a new shell for the user.

d)

d) Changes the user's home directory.

28.

Which chmod value gives read, write, and execute permissions to the owner and group, but no permissions to others?

a)

a) 777

b)

b) 755

c)

c) 770

d)

d) 700

29.

What does the command sudo chown alice:developers file.txt do?



a)

a) Changes the file's group to alice and owner to developers.

b)

b) Changes the file's owner to alice and group to developers.

c)

c) Changes the file's permissions to 770.

d)

d) Deletes the file file.txt.

30.

Which of the following is the correct sequence to create a user, add them to a group, and set up file ownership?



a)

a) useradd -> passwd -> chgrp -> chmod

b)

b) useradd -> passwd -> usermod -> chown

c)

c) groupadd -> userdel -> chown -> chmod

d)

d) passwd -> usermod -> chown -> chmod

31.

Which command is used to archive multiple files into a single uncompressed file?




a)

a) gzip

b)

b) tar

c)

c) bzip2

d)

d) xz

32.

What is the file extension for files compressed using bzip2?




a)

a) .gz

b)

b) .bz2

c)

c) .xz

d)

d) .tar

33.

Which command decompresses a .xz file?

a)

a) xz file.xz

b)

b) xz -d file.xz

c)

c) tar -Jvf file.xz

d)

d) gzip -d file.xz

34.

Which of the following is true about a primary partition?



a)

a) It can contain multiple logical partitions.

b)

b) It is used to install and boot the operating system.

c)

c) Only one primary partition can exist on a hard disk.

d)

d) It cannot be marked as active.

35.

What is the maximum disk size supported by MBR?



a)

a) 1 TB

b)

b) 2 TB

c)

c) 4 TB

d)

d) Unlimited

36.

Which of the following is a feature of GPT?



a)

a) Supports only 4 partitions.

b)

b) Compatible only with BIOS.

c)

c) Allows disks larger than 2 TB.

d)

d) Does not support backup partition tables.

37.

What does the r permission allow in rwx?

a)

a) Executing a file

b)

b) Reading a file's contents

c)

c) Writing to a file

d)

d) Changing file ownership

38.

What does the ls -l command display?



a)

a) File size only

b)

b) File permissions, ownership, and metadata

c)

c) File extensions only

d)

d) All files in a directory

39.

What do the three permission categories (user, group, others) represent?

a)

a) File type, file size, and file name

b)

b) File owner, group owner, and everyone else

c)

c) Permissions for system users only

d)

d) Hidden, read-only, and executable

40.

What numerical value corresponds to rw- permissions?

a)

a) 7

b)

b) 6

c)

c) 5

d)

d) 4

41.

What is the purpose of system users in Linux?

a)

a) For regular users to log in and perform tasks

b)

b) To provide specific services like ssh or mail

c)

c) To create and delete files

d)

d) To manage sudo privileges

42.

What is the default UID range for regular users in Linux?

a)

a) 0–100

b)

b) 1–999

c)

c) 1000 and above

d)

d) No specific range

43.

Which user type has unrestricted access to all files and commands in Linux?

a)

a) Regular user

b)

b) System user

c)

c) Superuser (root)

d)

d) Group owner

44.

Who is the creator of the Linux kernel?

a)

a) Dennis Ritchie

b)

b) Ken Thompson

c)

c) Linus Torvalds

d)

d) Richard Stallman

45.

What is the primary difference between Unix and Linux?

a)

a) Linux is proprietary, while Unix is open-source.

b)

b) Linux is open-source, while Unix is proprietary.

c)

c) Both are open-source.

d)

d) Both are proprietary.

46.

What is the role of the kernel in an operating system?

a)

a) To manage system hardware and software resources.

b)

b) To provide a user interface for interacting with the OS.

c)

c) To handle only file system management.

d)

d) To manage web applications.

47.

What is a shell in an operating system?

a)

a) The hardware interface of a computer.

b)

b) A graphical program that replaces the kernel.

c)

c) A program that interprets user commands and communicates with the kernel.

d)

d) A web browser tool.

48.

How is the root user typically identified in Linux?

a)

a) By the prompt $

b)

b) By the username daemon

c)

c) By the prompt #

d)

d) By the home directory /home/root

49.

What is a shell in an operating system?

a)

a) The hardware interface of a computer.

b)

b) A graphical program that replaces the kernel.

c)

c) A program that interprets user commands and communicates with the kernel.

d)

d) A web browser tool.

50.

What is the role of the kernel in an operating system?

a)

a) To manage system hardware and software resources.

b)

b) To provide a user interface for interacting with the OS.

c)

c) To handle only file system management.

d)

d) To manage web applications.

51.

What is the default UID range for regular users in Linux?

a)

a) 0–100

b)

b) 1–999

c)

c) 1000 and above

d)

d) No specific range

52.

Which of the following is true about a primary partition?



a)

a) It can contain multiple logical partitions.

b)

b) It is used to install and boot the operating system.

c)

c) Only one primary partition can exist on a hard disk.

d)

d) It cannot be marked as active.

53.

Which of the following is the correct sequence to create a user, add them to a group, and set up file ownership?



a)

a) useradd -> passwd -> chgrp -> chmod

b)

b) useradd -> passwd -> usermod -> chown

c)

c) groupadd -> userdel -> chown -> chmod

d)

d) passwd -> usermod -> chown -> chmod

54.

Which chmod value gives read, write, and execute permissions to the owner and group, but no permissions to others?

a)

a) 777

b)

b) 755

c)

c) 770

d)

d) 700

55.

What does the -aG option in the usermod command do?



a)

a) Adds the user to a specified group and retains existing groups.

b)

b) Deletes the user from the specified group.

c)

c) Assigns a new shell for the user.

d)

d) Changes the user's home directory.

56.

What is the primary purpose of the passwd command?

a)

a) To create a user

b)

b) To delete a user

c)

c) To set or change a user's password

d)

d) To list user details

57.

What is the purpose of the systemctl get-default command?

a)

a) To check the status of all services

b)

b) To display the default target (runlevel) of the system

c)

c) To list all running processes

d)

d) To restart the system

58.

How can you change the default system target to multi-user mode?

a)

a) sudo systemctl default multi-user.target

b)

b) sudo systemctl set-default multi-user.target

c)

c) sudo systemctl change multi-user.target

d)

d) sudo systemctl reset multi-user.target

59.

Which command is used to restart a systemd service?




a)

a) systemctl reboot <service>

b)

b) systemctl reload <service>

c)

c) systemctl restart <service>

d)

d) systemctl enable <service>

60.

What does sudo systemctl enable apache2 do?

a)

a) Starts the Apache2 service immediately

b)

b) Enables the Apache2 service to start on boot

c)

c) Stops the Apache2 service

d)

d) Disables the Apache2 service

61.

What is the primary purpose of the crontab command in Linux?

a)

A) To execute a command immediately

b)

B) To schedule repetitive tasks at specific times

c)

C) To monitor system performance

d)

D) To install software packages

62.

What does the following crontab entry do?

0 2 * * 7 /home/user/backup.sh

a)

A) Runs backup.sh at 2:00 AM every Sunday


b)

B) Runs backup.sh at 2:00 AM on the first day of the month

c)

C) Runs backup.sh at 2:00 PM every Sunday

d)

D) Runs backup.sh every minute on Sundays

63.

What does * * * * * mean in a crontab entry?

a)

A) Runs every second

b)

B) Runs every hour

c)

C) Runs every minute

d)

D) Runs every day at midnight

64.

Which command lists all scheduled cron jobs for the current user?

a)

A) cron -l

b)

B) list-cron

c)

C) crontab -l

d)

D) crontab --show

65.

What does the at command do in Linux?




a)

A) Schedules a task to run at a specific future time

b)

B) Runs a command every minute

c)

C) Displays system logs

d)

D) Monitors active processes

66.

How do you schedule a job to run in 10 minutes using at?

a)

A) at +10 minutes "command"

b)

B) echo "command" | at now + 10 minutes

c)

C) schedule 10m command

d)

D) crontab -e 10m command

67.

How can you list all pending at jobs?

a)

A) atq

b)

B) at -l

c)

C) jobs -a

d)

D) queue -at

68.

What does this crontab entry do?

0 0 1 * * /sbin/reboot

a)

A) Reboots the system daily at midnight


b)

B) Reboots the system on the first day of every month at midnight

c)

C) Reboots the system every Sunday at midnight

d)

D) Never executes

69.

Which package manager is used in Debian and Ubuntu-based distributions?

a)

A) dnf

b)

B) pacman

c)

C) apt

d)

D) zypper

70.

What does the following command do?

sudo apt update && sudo apt upgrade -y

a)

A) Removes all installed packages


b)

B) Updates the package list and upgrades installed packages

c)

C) Installs a new package

d)

D) Deletes unused dependencies

71.

How can you remove a package in Ubuntu?

a)

A) apt remove <package_name>

b)

B) dnf uninstall <package_name>

c)

C) rpm -e <package_name>

d)

D) pacman -R <package_name>

72.

What is a process in Linux?

a)

a) A collection of files stored in the system

b)

b) A running instance of a program

c)

c) A command stored in the shell history

d)

d) A type of kernel module

73.

What is a zombie process in Linux?




a)

a) A process that is running in the background

b)

b) A process that has completed execution but still has an entry in the process table

c)

c) A process that consumes all system resources

d)

d) A process that cannot be terminated

74.

Which command lists all background jobs in the current shell?

a)

a) jobs

b)

b) list

c)

c) bg

d)

d) top

75.

What is the difference between a foreground and a background process in Linux?

a)

a) A foreground process runs in the terminal, while a background process runs in the background

b)

b) A background process cannot be stopped

c)

c) Foreground processes use more CPU than background processes

d)

d) There is no difference

76.

What is the parent process of all processes in a Linux system?

a)

a) init or systemd

b)

b) bash

c)

c) kernel

d)

d) cron

77.

Which command updates the package index in Ubuntu?

a)

A) sudo apt upgrade

b)


B) sudo apt update

c)


C) sudo apt install

d)


D) sudo apt remove

78.

What does the apt install command do in Linux?




a)

A) Updates all installed packages

b)

B) Downloads and installs a new package

c)

C) Removes a package from the system

d)

D) Displays package details

79.

Which Linux distribution uses the dnf package manager?




a)

A) Ubuntu

b)

B) Debian

c)

C) Fedora

d)

D) Arch Linux

80.

Which command lists installed packages in Ubuntu?




a)

A) dnf list installed

b)

B) apt list --installed

c)

C) pacman -Q

d)

D) zypper lr

81.

What command installs Apache2 on Ubuntu?

a)

A) sudo apt install apache2

b)

B) sudo yum install apache2

c)

C) sudo pacman -S apache2

d)

D) sudo zypper install apache2

82.

What is the purpose of sudo systemctl enable apache2?




a)

A) Start Apache2 immediately

b)

B) Make Apache2 start automatically on boot

c)

C) Restart Apache2

d)

D) Uninstall Apache2

83.

Which command is used to check the IP address of your Linux machine?



a)

A) netstat -rn

b)

B) ip a

c)

C) ping

d)

D) traceroute

84.

What is the purpose of DNS?

a)

A) Assign IP addresses dynamically

b)

B) Convert domain names to IP addresses

c)

C) Block unauthorized network access

d)

D) Establish a VPN connection

85.

What is the default port for SSH?



a)

A) 22

b)

B) 80

c)

C) 443

d)

D) 53

86.

Which command checks if firewalld is running?



a)

A) firewalld --status

b)

B) sudo systemctl status firewalld

c)

C) firewalld --reload

d)

D) sudo firewall-cmd --get-zones

87.

Which command is used to make a shell script executable?




a)

A) chmod +r script.sh

b)

B) chmod +w script.sh

c)

C) chmod +x script.sh

d)

D) chmod -r script.sh

88.

What does #!/bin/bash at the start of a script indicate?


a)

A) It specifies the location of the script

b)

B) It defines the default shell for execution

c)

C) It comments out the first line of the script

d)

D) It sets the script to execute in the background

89.

Which command is used to display disk usage in Linux?



a)

A) ls -l

b)

B) df -h

c)

C) top

d)

D) free -m

90.

What is the purpose of the nmcli command in Linux?



a)

a) Manage network connections

b)

b) Monitor CPU usage

c)

c) List running processes

d)

d) Configure firewall settings

91.

Which nmcli command is used to display available Wi-Fi networks?



a)

a) nmcli connection show

b)

b) nmcli device wifi list

c)

c) nmcli radio wifi

d)

d) nmcli general status

92.

What is the primary purpose of the ping command?



a)

a) Transfer files between servers

b)

b) Test network connectivity

c)

c) Display system logs

d)

d) Monitor CPU performance

93.

What is the nslookup command used for?



a)

a) To look up network processes

b)

b) To check disk space

c)

c) To query DNS records

d)

d) To analyze network speed

94.

How can you use nslookup to find the IP address of a domain (e.g., google.com)?



a)

a) nslookup google.com

b)

b) nslookup -ip google.com

c)

c) nslookup --resolve google.com

d)

d) nslookup -dns google.com

95.

What does the ssh command do?



a)

a) Securely logs into a remote system

b)

b) Copies files between directories

c)

c) Checks disk space usage

d)

d) Lists open ports

96.

What is the purpose of the scp command?

a)

a) Securely copy files between systems

b)

b) Securely compress files

c)

c) Display system logs

d)

d) Scan open ports

97.

Which command correctly copies file.txt from a local system to a remote server?



a)

a) scp file.txt user@server:/home/user/

b)

b) scp user@server:/home/user/ file.txt

c)

c) scp file.txt /home/user/ user@server

d)

d) scp -copy file.txt user@server:/home/user/