wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz 2: Process Management (Continuation)

Total questions: 67

Worksheet time: 39mins

Name
Class
Date
1.

What does the command "ps aux" do in Linux?

a)

Lists all processes running on the system

b)

Lists all users currently logged in

c)

Lists all network connections established by the system

d)

Lists all files and directories in the current directory

2.

Which command displays only processes belonging to a given user in tree form?

a)

pstree

b)

pstree -u

c)

pstree -U

d)

pstree --user-only

3.

Which command shows a process’s parent-child relationships interactively?

a)

pkill

b)

pgrep

c)

pstree

d)

ppid

4.

Which command displays only processes matching a user and sorts by CPU?

a)

ps --user --cpu

b)

ps -U --cpu

c)

ps -u --sort=-%cpu

d)

ps -C --sort cpu

5.

Which command shows background jobs tied to the current shell?

a)

ps -j

b)

jobs

6.

Which command suspends the foreground job in a terminal?

a)

Ctrl+Z

b)

bg

c)

fg

d)

Ctrl+C

7.

Which top key sorts processes by memory usage?

a)

M

b)

P

c)

T

d)

N

8.

Which top key kills a process by entering its PID?

a)

k

b)

q

c)

d

d)

s

9.

What does /proc//status contain?

a)

Process accounting logs

b)

Kernel build flags

c)

Human-readable process metadata (state, UIDs, memory)

d)

Network firewall rules

10.

Which command is used to install a package in Ubuntu/Debian?

a)

apt install package_name

b)

apt update

11.

Which command lists all installed packages?

a)

apt list

b)

dpkg -l

c)

apt list --installed

d)

apt show

12.

The command sudo apt upgrade nano will:

a)

Upgrade the Nano package to the newest version.

b)

Install Nano if it is missing.

c)

None of the above.

d)

Fail — apt upgrade doesn’t take a package name argument.

13.

Which command is used to remove a package but keep its configuration files?

a)

apt purge package_name

b)

apt clean

c)

dpkg -i package_name

d)

apt remove package_name

14.

What is the purpose of the "chmod" command in Linux?

a)

To change the ownership of a file or directory

b)

To change the permissions of a file or directory

c)

To create a new file or directory

d)

To change the group membership of a file or directory

15.

What is the effect of the setgid bit on a directory?

4 lines
16.

Which command grants group write permission using symbolic mode?

a)

chmod g += w file

b)

chmod g + w file

c)

chmod + g w file

d)

chmod w + g file

17.

What does chmod 700 file set?

a)

Owner rwx; group r-x; others ---

b)

Owner rw-; group r--; others r-

c)

Owner rwx; group ---; others ---

d)

Owner r-x; group r-x; others r-x

18.

What does the command "chmod 755 file.txt" do?

a)

Sets the file.txt permission to read and write for the owner, read-only for the group and others

b)

Sets the file.txt permission to read, write and execute for the owner, read and execute for the group and others

c)

Sets the file.txt permission to read and execute for the owner, read-only for the group and others

d)

Sets the file.txt permission to read-only for the owner, group and others

19.

What numeric mode corresponds to rwxr-x---?

a)

760

b)

740

c)

700

20.

Which chgrp command sets group projectgroup recursively on /home/projectX?

a)

chgrp projectgroup -r /home/projectX

b)

chgrp /home/projectX -R projectgroup

c)

chgrp -aR projectgroup /home/projectX

d)

chgrp -R projectgroup /home/projectX

21.

Which command changes group ownership recursively?

a)

groupmod -R dir group

b)

chgrp -R group dir

c)

chown -gR group dir

d)

chmod -G -R group dir

22.

Which permission string shows setgid on a directory?

a)

drwxr-s---

b)

drwxrwxrwx

c)

d---srwx---

d)

drwxrwsr-x

23.

Which command unlocks a previously locked account?

a)

chage -U

b)

usermod -U

c)

loginctl unlock

d)

passwd --unlock

24.

Which command shows a user’s UID, GID, and group memberships?

a)

users -a

b)

id

25.

Which command sets an account expiration date 30 days from now?

a)

passwd -e +30

b)

chage -E $(date -d "+30 days" +%Y-%m-%d)

c)

usermod --expire "+30"

d)

loginctl expire --days=30

26.

Which command changes a user’s login shell?

a)

chlogin -s /bin/bash

b)

setsh /bin/bash

c)

chsh -s /bin/bash

d)

usermod -S /bin/bash

27.

Which command adds a user to a supplementary group without removing existing groups?

a)

usermod -aG

b)

adduser --replace

c)

usermod -G

d)

gpasswd -S

28.

What does passwd do?

a)

Sets or changes the user’s password

b)

Resets the user’s UID

c)

Switches the login shell

d)

Locks the account immediately

29.

Which command switches to another user’s shell (with authentication)?

4 lines
30.

Which command runs a single command as root (privileged) if configured?

a)

doas -c

b)

sudo

c)

rootrun

d)

su -c

31.

Which account has full administrative privileges on a Linux system?

a)

admin

b)

root

c)

user

d)

sudoer

32.

Which command traces the network path to a host?

a)

hopscan

b)

tracepath or traceroute

c)

iptrace

d)

route

33.

Which command shows the default gateway in a concise form?

a)

ip addr | grep gateway

b)

ip link | grep default

c)

route --default show

d)

ip route show

34.

The ip command that lists the routing table with protocol/source hints is:

a)

ip route show

b)

ip route list

c)

ip route get

d)

ip route show proto all

35.

Which directory typically contains user authentication logs (with rsyslog)?

a)

/var/log/user.log

b)

/var/log/secure.log

c)

/var/log/security.d

d)

/var/log/auth.log

36.

Where are many system logs stored on Ubuntu-style systems?

a)

/opt/log

b)

/var/log

c)

/etc/logs

d)

/usr/logs

37.

Which command shows the kernel ring buffer messages?

a)

dmesg

b)

kmsg

c)

logger

d)

journalctl -u kernel

38.

Which command shows the last few lines of a growing log in real time?

a)

head -f

b)

less -F

c)

watch -l

d)

tail -f

39.

Which file shows the currently running kernel version on a typical Linux system?

a)

/var/log/kern.log

b)

/proc/version

c)

/etc/os-release

d)

/boot/grub/grub.cfg

40.

Which of the following is not part of process management?

a)

Process creation and deletion

b)

Deadlock handling

c)

File organization

d)

CPU scheduling

41.

The kernel is responsible for:

a)

Memory and process management

b)

Editing text files

c)

File organization

d)

GUI design

42.

Which component of OS handles process synchronization?

a)

Cache controller

b)

CPU scheduler

c)

File system

d)

Kernel

43.

The shell of an operating system is:

a)

The device driver

b)

The user interface

c)

The hardware interface

d)

The kernel

44.

The command line interface in Linux is called:

a)

Desktop

b)

GUI

c)

Terminal

d)

Shell

45.

The most common shell in Linux is:

a)

Bash shell

b)

C shell

c)

Korn shell

d)

Bourne shell

46.

Which of the following is an example of open-source OS?

a)

Windows

b)

macOS

c)

Linux

d)

iOS

47.

Which of the following is not a major component of the Linux operating system?

a)

Shell

b)

Kernel

c)

File System

d)

Browser

48.

The Linux file system organizes data in:

a)

Circular lists

b)

Binary trees

c)

A hierarchical directory structure

d)

Tables only

49.

The double ampersand characters (&&) are used to separate commands to be executed conditionally, where if the command to the left of the ampersands fails, then the command to the right of the ampersands will be executed.

a)

True

b)

False

50.

The semicolon (;) can be used to separate multiple commands to be executed in order.

a)

True

b)

False

51.

How do you count the number of lines, words, and characters in a file?

a)

cat filename

b)

ls -l filename

c)

grep -c filename

d)

wc filename

52.

A directory is used to:

a)

Store file names and metadata

b)

Manage memory

c)

Control devices

d)

Store system files only

53.

What is the difference between a file and a directory in Linux?

a)

A file contains only text while a directory contains multimedia files.

b)

A file cannot be deleted while a directory can be deleted.

c)

A file is a collection of data while a directory is a container for files and other directories.

d)

A file is read-only while a directory is read-write.

54.

What is the purpose of a file descriptor?

a)

To allocate resources to a file

b)

To store file attributes

c)

To uniquely identify a file in the file system

d)

To manage file queues

55.

What is a file?

a)

A type of process

b)

A collection of data or information

c)

A type of device driver

d)

A type of device controller

56.

What is the job of the file manager?

a)

To manage file queues

b)

To allocate resources to files

c)

To translate file system requests to disk operations

d)

All of the above

57.

Which of the following is a type of file allocation method?

a)

Linked allocation

b)

All of the above

c)

Direct allocation

d)

Indexed allocation

58.

What is the purpose of a context switch?

a)

To allocate resources to a process

b)

To load a process into memory

c)

To terminate a process

d)

To save the current state of

59.

Which of the following best defines a process?

a)

A program stored on disk

b)

A system call

c)

A compiled code

d)

A program in execution

60.

Which of the following best defines an Operating System?

a)

A compiler that translates user commands into binary code executed directly by the CPU.

b)

A firmware layer embedded in the hardware that initializes devices and controls memory mapping.

c)

A background utility designed to compress executable files and reduce memory usage.

d)

A collection of system software that manages hardware resources, provides common services for application programs, and ensures controlled process execution.

61.

What is the role of the scheduler in processor management?

a)

To allocate resources to processes

b)

To allocate resources to network operations

c)

To allocate resources to memory

d)

To allocate resources to I/O operations

62.

What is the main function of the kernel in an operating system?

a)

To manage user accounts and passwords

b)

To manage hardware resources and provide services to applications

c)

To provide a graphical user interface (GUI) for the user

d)

To run system backup and recovery procedures

63.

The command man -k is the same as the command apropos.

(a)  

64.

True or False: (The statement is not fully visible, but the answer is True.)

a)

True

b)

False

65.

Which command lists groups on the system?

a)

listgroups

b)

cat /etc/group

c)

id -a *

d)

groups --all

66.

Which command shows numeric UIDs/GIDs in ls output?

a)

ls -id

b)

ls -n

c)

ls --ugid

d)

ls --numeric

67.

Which command resumes a stopped job in the background?

a)

disown

b)

fg

c)

jobs

d)

bg