wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linux - Up to Disk Partition

Total questions: 50

Worksheet time: 25mins

Name
Class
Date
1.

Which command is used to display information about the Linux operating system?

a)

`osinfo`

b)

`uname`

c)

`sysinfo`

d)

`lsb_release`

2.

What is the core component of the Linux operating system?

a)

Shell

b)

Kernel

c)

File system

d)

Command interpreter

3.

Which command is used to initiate a Linux session?

a)

`startx`

b)

`reboot`

c)

`login`

d)

`halt`

4.

How do you terminate a Linux session?

a)

`logout`

b)

`exit`

c)

`terminate`

d)

`close`

5.

Which version of CentOS is widely used for server environments?

a)

CentOS 5

b)

CentOS 6

c)

CentOS 7

d)

CentOS Stream

6.

What is the file extension of a compressed file created using `gzip`?

a)

.tar

b)

.gz

c)

.bz2

d)

.zip

7.

Which command is used to create an archive of files in Linux?

a)

`tar`

b)

`gzip`

c)

`zip`

d)

`unzip`

8.

Which command decompresses a `.bz2` file?

a)

`tar`

b)

`bzip2`

c)

`bunzip2`

d)

`gunzip`

9.

What is the topmost directory in the Linux file system hierarchy?

a)

/bin

b)

/root

c)

/

d)

/home

10.

Which command is used to navigate to the parent directory in Linux?

a)

cd /

b)

cd ..

c)

cd -

d)

cd ~

11.

How do you list all files, including hidden files, in a directory?

a)

`ls`

b)

`ls -a`

c)

`ls -l`

d)

`dir`

12.

Which command is used to copy files in Linux?

a)

`mv`

b)

`cp`

c)

`cut`

d)

`copy`

13.

Which command is used to change the ownership of a file?

a)

`chmod`

b)

`chown`

c)

`chgrp`

d)

`passwd`

14.

What permission does `chmod 755` grant to the owner of a file?

a)

Read and write

b)

Read, write, and execute

c)

Read and execute

d)

Write and execute

15.

Which text editor is most commonly used in command-line environments?

a)

Notepad

b)

Nano

c)

Vim

d)

Gedit

16.

Which command is used to start editing a file in Vim?

a)

`start`

b)

`edit`

c)

`vi`

d)

`open`

17.

How do you save and exit a file in Vim?

a)

:q

b)

:wq

c)

:save

d)

:exit

18.

Which text editor is known for its simplicity in Linux?

a)

Nano

b)

Vim

c)

Gedit

d)

Emacs

19.

How many types of user accounts exist in Linux?

a)

One

b)

Two

c)

Three

d)

Four

20.

What does the `>` operator do in Linux?

a)

Redirects output to another file

b)

Redirects input to another file

c)

Pipes output to a command

d)

Displays error messages

21.

Which command is used to concatenate and display file content?

a)

`ls`

b)

`cat`

c)

`touch`

d)

`grep`

22.

What is the function of the pipe (`|`) operator?

a)

Combines files

b)

Filters input

c)

Passes output of one command as input to another

d)

Creates new directories

23.

Which command filters content based on a pattern?

a)

`cat`

b)

`grep`

c)

`awk`

d)

`sed`

24.

Which file represents the standard output in Linux?

a)

/dev/null

b)

/dev/stdin

c)

/dev/stdout

d)

/dev/stderr

25.

Which command displays the partition table of a disk?

a)

`lsblk`

b)

`fdisk`

c)

`parted`

d)

`blkid`

26.

What is the maximum number of primary partitions a disk can have?

a)

Two

b)

Four

c)

Eight

d)

Unlimited

27.

Which type of partition can extend primary partitions?

a)

Logical

b)

Physical

c)

Swap

d)

Primary

28.

What is the purpose of LVM in Linux?

a)

Increase disk speed

b)

Simplify disk management

c)

Create backups

d)

Compress files

29.

Which command initializes a physical volume for LVM?

a)

`pvscan`

b)

`pvcreate`

c)

`vgcreate`

d)

`lvcreate`

30.

Which command is used to create an LVM volume group?

a)

`vgscan`

b)

`lvcreate`

c)

`vgcreate`

d)

`pvcreate`

31.

How do you mount a partition in Linux?

a)

`lsblk`

b)

`mount`

c)

`fdisk`

d)

`blkid`

32.

Which command displays the amount of free disk space?

a)

`df`

b)

`du`

c)

`lsblk`

d)

`free`

33.

Which file contains information about mounted file systems?

a)

/etc/fstab

b)

/etc/mount

c)

/etc/mtab

d)

/etc/filesystems

34.

Which command compresses files using `gzip`?

a)

`compress`

b)

`gzip`

c)

`tar`

d)

`zip`

35.

What is the default file extension for a `tar` archive?

a)

.tar

b)

.gz

c)

.bz2

d)

.zip

36.

Which command extracts `.tar.gz` files?

a)

`gzip`

b)

`tar -xzf`

c)

`bzip2`

d)

`zip`

37.

Which directory contains device files in Linux?

a)

/var

b)

/etc

c)

/dev

d)

/proc

38.

What does the `/dev/null` file do?

a)

Stores logs

b)

Deletes unwanted output

c)

Acts as a temporary directory

d)

Stores kernel files

39.

Which command displays a file with line numbers?

a)

`grep`

b)

`nl`

c)

`cat`

d)

`awk`

40.

Which command searches for patterns in text files?

a)

`sed`

b)

`grep`

c)

`awk`

d)

`find`

41.

Which command creates an empty file?

a)

`touch`

b)

`mkdir`

c)

`rm`

d)

`cp`

42.

What is the function of the `man` command?

a)

Creates manual pages

b)

Displays manual pages

c)

Opens files

d)

Executes programs

43.

Which command shows the current directory path?

a)

`ls`

b)

`pwd`

c)

`cd`

d)

`locate`

44.

Which type of file stores executable code?

a)

Text file

b)

Directory

c)

Binary file

d)

Configuration file

45.

What is the function of the `chmod` command?

a)

Change user ownership

b)

Modify file permissions

c)

Copy files

d)

Rename directories

46.

If a Directory is not empty, can we remove it using `rmdir`

a)

YES

b)

NO

47.

What does the `chmod 644` command do?

a)

Grants read and write permissions to the owner, and read permissions to the group and others

b)

Grants read, write, and execute permissions to the owner

c)

Grants read permissions to everyone

d)

Grants write permissions to the group

48.

Which command is used to display the current working directory?

a)

`pwd`

b)

`cd`

c)

`ls`

d)

`dir`

49.

You are a system administrator managing a shared server for a development team. The team needs access to a project directory (/home/projects/dev) where they can create and edit files collaboratively. However, the files should not be readable or writable by any other users outside the group.

Question:
Which commands will you use to set the appropriate permissions and ownership for the dev directory?

a)

chown developer:devgroup /home/projects/dev; chmod 755 /home/projects/dev

b)

chown developer:devgroup /home/projects/dev; chmod 770 /home/projects/dev

c)

chown root:root /home/projects/dev; chmod 777 /home/projects/dev

d)

chown admin:users /home/projects/dev; chmod 755 /home/projects/dev

50.

Your company’s server is running out of storage, and you have added a new hard disk to the system. You need to create a new partition on the disk, format it with the ext4 file system, and mount it to /data.

Question:
What sequence of commands will you use to perform this task?

a)

fdisk /dev/sdb; mkfs.ext4 /dev/sdb1; mount /dev/sdb1 /data

b)

parted /dev/sdb; mkfs.ext3 /dev/sdb1; mount /dev/sdb1 /mnt/data

c)

fdisk /dev/sdb; mkfs.xfs /dev/sdb; mount /dev/sdb /data

d)

mkpart /dev/sdb; mkfs.ext4 /dev/sdb1; umount /data