wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linux Week 10, 11, 12, 13

Total questions: 110

Worksheet time: 55mins

Name
Class
Date
1.

Which command is used to install a package using RPM?

a)

rpm -i package_name

b)

rpm -install package_name

c)

rpm -setup package_name

d)

rpm -a package_name

2.

What is the function of the yum update command?

a)

Removes outdated packages

b)

Updates all installed packages

c)

Searches for new repositories

d)

Installs a specific package

3.

Which tool is used for package management on Debian-based systems?

a)

rpm

b)

yum

c)

dpkg

d)

zypper

4.

What does the apt-get remove package_name command do?

a)

Deletes package files and configuration

b)

Removes the package but keeps its configuration

c)

Installs a new package

d)

Updates the packag

5.

What is the purpose of the sha256sum command?

a)

To display package details

b)

To calculate the checksum of a file

c)

To install a package

d)

To search for repositories

6.

Which command can be used to manually configure a package on Debian-based systems?

a)

dpkg-setup

b)

dpkg-reconfigure

c)

apt-configure

d)

dpkg-configure

7.

What is the primary use of the zypper command?

a)

Install packages on SUSE-based systems

b)

Update packages on Ubuntu

c)

Manage packages on Red Hat

d)

Configure repositories on Debian

8.

Which of the following commands is used to verify the integrity of a downloaded file?

a)

sha256sum

b)

yum check

c)

rpm -q

d)

apt-cache

9.

What is the role of rpm2cpio?

a)

Extract files from RPM packages

b)

Update RPM packages

c)

Reinstall RPM packages

d)

Remove RPM packages

10.

Which command lists all installed packages in a Debian-based system?

a)

apt-get show

b)

dpkg -l

c)

rpm -qa

d)

yum list installed

11.

What does the md5sum command do?

a)

Installs packages

b)

Verifies file integrity using an MD5 checksum

c)

Updates repositories

d)

Displays system information

12.

Which command is used to add a repository in SUSE Linux?

a)

zypper addrepo

b)

zypper setuprepo

c)

yum addrepo

d)

dpkg addrepo

13.

What is the difference between apt-get remove and apt-get purge?

a)

apt-get remove removes the package and its dependencies, while apt-get purge removes only the package

b)

apt-get remove removes the package, while apt-get purge also removes configuration files

c)

They are the same command

d)

apt-get remove is for Debian, and apt-get purge is for Red Hat

14.

Which command shows detailed information about a package using RPM?

a)

rpm -q

b)

rpm -i

c)

rpm -ivh

d)

rpm -qi

15.

Which package manager is used for Red Hat-based systems?

a)

dpkg

b)

apt-get

c)

yum

d)

zypper

16.

What does the rpm -U command do?

a)

Installs and updates a package

b)

Removes a package

c)

Verifies a package

d)

Queries a package

17.

Which command lists all available packages in the apt-cache?

a)

apt-cache list

b)

apt-cache search

c)

dpkg -l

d)

apt-get show

18.

What does the dpkg -r package_name command do?

a)

Completely removes a package and its configuration

b)

Removes the package but keeps its configuration

c)

Installs a new package

d)

Updates an existing package

19.

What is the main purpose of rpm -qa?

a)

To display system architecture

b)

To list all installed RPM packages

c)

To query available updates

d)

To remove packages

20.

Which command updates all installed packages on SUSE-based systems?

a)

apt-get upgrade

b)

rpm -Uvh

c)

zypper up

d)

dpkg-reconfigure

21.

Which protocol is commonly used by the X Window system for network-based GUI operations?

a)

HTTP

b)

X11

c)

SSH

d)

FTP

22.

What is the main function of a display manager in the X Window system?

a)

Managing network protocols

b)

Configuring hardware drivers

c)

Providing a graphical login interface

d)

Managing file systems

23.

Which file defines the default runlevel in a Debian-derived Linux system?

a)

/etc/profile

b)

/etc/gdm/custom.conf

c)

/etc/inittab

d)

/etc/xorg.conf

24.

What is the primary role of a window manager in the X Window system?

a)

Manage user accounts

b)

Handle graphical login screens

c)

Manage the placement and appearance of windows

d)

Control network access

25.

Which configuration file is commonly used to manually customize the X server?

a)

/etc/profile

b)

/etc/X11/xorg.conf

c)

/etc/gdm/custom.conf

d)

/var/log/Xorg.0.log

26.

What does the startx command do?

a)

Starts the X server and the default graphical environment

b)

Configures hardware drivers for the X server

c)

Restarts the system in runlevel 1

d)

Terminates the X Window system

27.

Which toolkit is commonly used for C++ development in KDE?

a)

GTK+

b)

Qt

c)

Motif

d)

Xlib

28.

What is the function of the fc-cache command?

a)

Start the X server

b)

Configure display managers

c)

Update the font information cache

d)

Reset the X server

29.

What does the acronym WIMP stand for in the context of GUIs?

a)

Windows, Icons, Menus, Pointers

b)

Widgets, Interfaces, Menus, Protocols

c)

Windows, Interactive Mouse Protocol

d)

Widgets, Icons, Menus, Programs

30.

What is the default color depth setting in the xorg.conf file represented as?

a)

The number of bits per pixel

b)

The exponent of the number 2

c)

The maximum resolution supported

d)

The refresh rate of the display

31.

What does the xhost command do?

a)

Manages access control for X server connections

b)

Configures display settings

c)

Restarts the X server

d)

Changes the default runlevel

32.

What component allows X Window applications to run on remote systems?

a)

Xlib

b)

X server

c)

X11-Forwarding

d)

Xauth

33.

What is the primary purpose of the Wayland protocol?

a)

Replace the X server with a modern display system

b)

Configure display monitors

c)

Create font paths for the X server

d)

Manage network connections

34.

Which desktop environment is considered lightweight and ideal for older hardware?

a)

GNOME

b)

KDE

c)

Xfce

d)

Cinnamon

35.

What does the command sudo dpkg-reconfigure gdm do?

a)

Reinstalls the GNOME desktop environment

b)

Allows selecting the default display manager

c)

Removes the gdm package

d)

Updates the X server

36.

Which configuration file is used to customize the GNOME display manager?

a)

/etc/X11/xorg.conf

b)

/etc/inittab

c)

/etc/gdm/custom.conf

d)

/etc/profile

37.

Which environment variable must be set for remote GUI applications?

a)

PATH

b)

HOME

c)

DISPLAY

d)

SHELL

38.

What is the purpose of xauth in the X Window system?

a)

Generates authorization cookies for remote access

b)

Configures video cards

c)

Manages window placement

d)

Updates font paths

39.

Which display manager is the default for Ubuntu-based distributions?

a)

lightdm

b)

gdm

c)

kdm

d)

xdm

40.

What is a benefit of using virtual network computing (VNC)?

a)

It allows graphical desktops to be shared over a network

b)

It replaces the X server

c)

It encrypts all graphical transmissions

d)

It configures multiple monitors

41.

Which tool is used to change the default theme in GNOME?

a)

Tweaks

b)

Themes

c)

Preferences

d)

Appearance

42.

What does the GNOME desktop environment primarily use for its widgets?

a)

Qt

b)

GTK

c)

Xlib

d)

Motif

43.

Which protocol is used by RDP for remote desktop access?

a)

TCP/IP

b)

SSH

c)

X11

d)

RFB

44.

What command is used to install localization packages in KDE on Debian-based systems?

a)

apt-get install kde-i18n-locale-code

b)

dpkg-reconfigure kde

c)

apt-get kde-setup

d)

locale-gen

45.

What does the xdmcp protocol enable?

a)

Securely forwarding graphical sessions

b)

Sharing screens over the network

c)

Managing multiple desktops

d)

Troubleshooting X server errors

46.

What is the purpose of the fc-cache command?

a)

To update font information for the X server

b)

To manage fonts in XDM

c)

To verify font compatibility with GTK

d)

To load fonts into the display manager

47.

What is the primary advantage of GNOME over Xfce?

a)

Better support for transparency and animations

b)

Requires less memory to run

c)

Faster load times

d)

No dependency on X Window

48.

Which log file contains error messages for the X server?

a)

/var/log/Xorg.0.log

b)

/etc/X11/xorg.conf

c)

/var/log/syslog

d)

/home/.xsession-errors

49.

Which configuration file is used to set a custom banner for the gdm display manager?

a)

/etc/gdm/custom.conf

b)

/etc/X11/xorg.conf

c)

/var/log/Xorg.0.log

d)

/etc/profile

50.

What command would an administrator use to install VNC server on a Debian system?

a)

apt-get install vnc4server

b)

yum install vnc-server

c)

dpkg-reconfigure vnc

d)

zypper install vncserver

51.

Which file contains user account details in Linux?

a)

/etc/shadow

b)

/etc/passwd

c)

/etc/login.defs

d)

/etc/group

52.

What is the purpose of the /etc/shadow file?

a)

Stores user passwords in plaintext

b)

Contains encrypted user passwords

c)

Manages user groups

d)

Stores user login history

53.

What command is used to create a new user in Linux?

a)

usercreate

b)

useradd

c)

adduser

d)

newuser

54.

Which command is used to change a user's password?

a)

passwd

b)

chpass

c)

usermod

d)

passwdchange

55.

What is the function of the /etc/skel directory?

a)

Stores default user environment files

b)

Contains user login shells

c)

Manages user session data

d)

Logs user activity

56.

Which command locks a user account?

a)

usermod -L

b)

passwd -l

c)

useradd -lock

d)

passwd -lock

57.

What does the chage command do?

a)

Creates a new user

b)

Changes user account parameters

c)

Modifies password aging policies

d)

Locks user accounts

58.

Which field in /etc/passwd specifies the user’s home directory?

a)

3rd

b)

5th

c)

6th

d)

7th

59.

Which command displays the groups a user belongs to?

a)

groups

b)

id

c)

groupadd

d)

grouplist

60.

What is the default UID range for regular users on Debian-based systems?

a)

0-499

b)

100-999

c)

1000-60000

d)

500-999

61.

Which file defines default user account creation settings?

a)

/etc/group

b)

/etc/skel

c)

/etc/login.defs

d)

/etc/default/useradd

62.

What command changes a user’s home directory?

a)

usermod -d

b)

useradd -home

c)

chuser -home

d)

chdir -u

63.

What does the -m option in the useradd command do?

a)

Deletes the user

b)

Creates the user’s home directory

c)

Locks the user account

d)

Disables the user

64.

What is the purpose of the crontab command?

a)

View system logs

b)

Edit scheduled tasks

c)

Create new users

d)

Lock user accounts

65.

Which field in a crontab entry specifies the command to execute?

a)

1st

b)

3rd

c)

5th

d)

6th

66.

What does the keyword @daily in a crontab entry indicate?

a)

Run every hour

b)

Run every day at midnight

c)

Run every Monday

d)

Run every week

67.

What file stores user-specific crontab jobs?

a)

/etc/crontab

b)

/var/spool/cron/<username>

c)

/etc/cron.d

d)

/home/<username>/cron

68.

What command is used to delete a user?

a)

userdel

b)

userremove

c)

deluser

d)

remuser

69.

What is the purpose of the /etc/group file?

a)

Stores group account information

b)

Logs group activity

c)

Manages group sessions

d)

Stores encrypted passwords

70.

Which command adds a user to a supplementary group?

a)

usermod -G

b)

groupadd -a

c)

useradd -s

d)

usermod -a -G

71.

What does the -r option in userdel do?

a)

Removes a user from all groups

b)

Deletes the user’s home directory

c)

Reassigns user files

d)

Renames the user

72.

What does the -e option in usermod specify?

a)

Expiration date for the user account

b)

Email address for the user

c)

Environment variables for the user

d)

Extended permissions

73.

Which file stores group passwords in encrypted form?

a)

/etc/passwd

b)

/etc/group

c)

/etc/shadow

d)

/etc/gshadow

74.

What is the default shell for new users?

a)

/bin/sh

b)

/bin/bash

c)

/usr/bin/zsh

d)

/usr/bin/fish

75.

Which command schedules a one-time job in Linux?

a)

cron

b)

batch

c)

at

d)

schedule

76.

What does the gpasswd command do?

a)

Adds a user to a group

b)

Changes the group password

c)

Deletes a group

d)

Lists group memberships

77.

Which command displays detailed password information for a user?

a)

passwd -i

b)

chage -l

c)

passwd -a

d)

chage -p

78.

Which command lists all active crontab jobs for a user?

a)

cronlist

b)

crontab -l

c)

cron -v

d)

crontab -e

79.

What does the newgrp command do?

a)

Switches to a new primary group

b)

Deletes the current group

c)

Creates a new group

d)

Modifies group permissions

80.

What is the function of the /etc/default/useradd file?

a)

Stores system-wide user account defaults

b)

Logs user activity

c)

Configures user permissions

d)

Manages temporary user accounts

81.

What command is used to display the current system time?

a)

date

b)

hwclock

c)

timeview

d)

sysclock

82.

Which command sets the system time from the hardware clock?

a)

hwclock --set

b)

hwclock -s

c)

date -s

d)

hwclock --time

83.

What is the hardware clock also known as?

a)

CMOS/BIOS clock

b)

System clock

c)

Epoch clock

d)

UTC clock

84.

What does the timedatectl command primarily manage?

a)

File system configuration

b)

Time and date settings

c)

Network connections

d)

Disk partitions

85.

Which file stores time zone details on Linux systems?

a)

/etc/timezone

b)

/etc/localtime

c)

/etc/clock.conf

d)

/var/timeinfo

86.

What does the chronyd service do?

a)

Configures hardware clocks

b)

Synchronizes time with NTP servers

c)

Monitors log files

d)

Sets up cron jobs

87.

What is the purpose of the ntpdate command?

a)

Display system logs

b)

Set the system time using NTP

c)

Create NTP configuration files

d)

Restart the ntpd daemon

88.

What is the significance of the --utc option in the hwclock command?

a)

Sets the hardware clock to Coordinated Universal Time

b)

Converts the system clock to the local time zone

c)

Synchronizes the system clock to the internet

d)

Displays logs in UTC format

89.

Which tool manages rotating log files in Linux?

a)

journalctl

b)

logrotate

c)

rsyslogd

d)

syslog-ng

90.

What is the default location for most system log files?

a)

/etc/logs

b)

/var/log

c)

/usr/logs

d)

/home/logs

91.

Which command is used to send messages to the system logging facility?

a)

logger

b)

journalctl

c)

syslog

d)

logviewer

92.

Which logging daemon is commonly used on modern Linux systems?

a)

sysklogd

b)

rsyslogd

c)

logwatch

d)

journald

93.

Which command displays logs stored in the systemd journal?

a)

systemctl log

b)

journalctl

c)

logviewer

d)

syslogctl

94.

What is the purpose of the rsyslog.conf file?

a)

Manages time synchronization

b)

Configures system logging behavior

c)

Sets file permissions

d)

Controls user access

95.

Which file is used to define default logrotate settings?

a)

/etc/logrotate.conf

b)

/var/log/rotate

c)

/etc/syslog.conf

d)

/usr/logrotate.conf

96.

What does the --vacuum-time option do in the journalctl command?

a)

Clears logs older than a specified time

b)

Compresses old logs

c)

Displays logs in reverse order

d)

Deletes logs from volatile memory

97.

What is the primary function of the Mail Transfer Agent (MTA)?

a)

Compose emails

b)

Transfer emails between systems

c)

Encrypt emails

d)

Manage user accounts

98.

What is the default location for user mailboxes on Linux systems?

a)

/var/mail

b)

/home/mail

c)

/etc/mail

d)

/usr/mail

99.

What command is used to read emails on a Linux system?

a)

mail

b)

email-read

c)

inbox

d)

fetchmail

100.

Which file configures the rsyslog daemon?

a)

/etc/rsyslog.conf

b)

/var/log/syslog

c)

/usr/rsyslogd.conf

d)

/etc/system.conf

101.

What is the main purpose of the timedatectl list-timezones command?

a)

Display current time

b)

List all available time zones

c)

Set the system clock

d)

Configure NTP servers

102.

Which tool is best for debugging time synchronization issues in NTP?

a)

ntptrace

b)

ntpdebug

c)

ntpconfig

d)

ntpq

103.

What does the /etc/ntp.conf file configure?

a)

Hardware clock

b)

Network Time Protocol (NTP)

c)

Time zones

d)

System logs

104.

What does the stratum field in NTP represent?

a)

The accuracy of a server's time

b)

The location of the NTP server

c)

The delay in milliseconds

d)

The type of NTP service

105.

What command in logrotate compresses rotated log files?

a)

--compress-logs

b)

gzip-log

c)

rotate --gzip

d)

compress

106.

Which logging facility captures cron job outputs?

a)

mail

b)

authpriv

c)

cron

d)

user

107.

Which directory stores persistent system logs in systemd journal?

a)

/var/log/journal

b)

/etc/journal/logs

c)

/usr/log/journal

d)

/run/log/journal

108.

What is the purpose of the systemd-cat command?

a)

Add messages to systemd logs

b)

View log messages

c)

Delete old logs

d)

Compress logs

109.

What directive specifies the time zone in timedatectl?

a)

set-timezone

b)

configure-tz

c)

timezone-config

d)

time-zone-set

110.

Which component synchronizes time in intermittent network environments?

a)

chronyd

b)

ntpdate

c)

timedatectl

d)

rsync