wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linux Final Quiz

Total questions: 75

Worksheet time: 38mins

Name
Class
Date
1.

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

a)

createdir

b)

mkdir

c)

mkfile

d)

newdir

2.

Explain the difference between absolute path and relative path in Linux file system.

a)

Absolute path starts with a forward slash, while relative path starts with a backward slash.

b)

Absolute path is used for directories, while relative path is used for files.

c)

Absolute path can be used for remote file systems, while relative path is only for local file systems.

d)

Absolute path includes the full path from the root directory, while relative path is based on the current working directory.

3.

How can you list all the files and directories in a directory in Linux?

a)

list

b)

dir

c)

show

d)

ls

4.

What command is used to change the permissions of a file in Linux?

a)

ls

b)

chown

c)

grep

d)

chmod

5.

Explain the purpose of the 'ls' command in Linux.

a)

The purpose of the 'ls' command in Linux is to create a new file.

b)

The purpose of the 'ls' command in Linux is to delete all files in the current directory.

c)

The purpose of the 'ls' command in Linux is to rename a file.

d)

The purpose of the 'ls' command in Linux is to list the files and directories in the current directory.

6.

How can you add a new user in Linux?

a)

Use the 'createuser' command to add a new user in Linux.

b)

Use the 'newuser' command to add a new user in Linux.

c)

Use the 'adduser' or 'useradd' command to add a new user in Linux.

d)

Use the 'makeuser' command to add a new user in Linux.

7.

What command is used to display the IP address of a Linux system?

a)

ipconfig

b)

ifconfig

c)

netstat

d)

ping

8.

Explain the purpose of the 'chmod' command in Linux.

a)

The purpose of the 'chmod' command in Linux is to change the permissions of a file or directory.

b)

The purpose of the 'chmod' command in Linux is to rename files

c)

The purpose of the 'chmod' command in Linux is to compress files

d)

The purpose of the 'chmod' command in Linux is to delete files

9.

What command is used to install a new package in Linux using the command line?

a)

get-package

b)

add-package

c)

install-package

d)

apt-get install (for Debian-based systems) or yum install (for Red Hat-based systems)

10.

Explain the purpose of the 'echo' command in bash.

a)

The purpose of the 'echo' command in bash is to execute a shell script

b)

The purpose of the 'echo' command in bash is to delete files

c)

The purpose of the 'echo' command in bash is to print the specified text or string to the standard output.

d)

The purpose of the 'echo' command in bash is to create a new directory

11.

Which of the following file permissions belong to a symbolic link?

a)

-rwxrwxrwx

b)

+rwxrwxrwx

c)

lrwxrwxrwx

d)

srwxrwxrwx

12.
Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO.)
a)
esc ZZ
b)
ctrl :w!
c)
esc zz
d)
esc :wq!
e)
ctrl XX
13.
What is the purpose of the Bash built-in export command?
a)
It allows disks to be mounted remotely.
b)
It runs a command as a process in a subshell.
c)
It makes the command history available to subshells.
d)
It sets up environment variables for applications.
e)
It shares NFS partitions for use by other systems on the network.
14.
After running the command umount /mnt, the following error message is displayed: umount: /mnt: device is busy. What is a common reason for this message?
a)
The kernel has not finished flushing disk writes to the mounted device.
b)
A user has a file open in the /mnt directory.
c)
Another file system still contains a symlink to a file inside /mnt.
d)
The files in /mnt have been scanned and added to the locate database.
e)
The kernel thinks that a process is about to open a file in /mnt for reading.
15.
Which of the following is correct when talking about mount points?
a)
Every existing directory can be used as a mount point.
b)
Only empty directories can be used as a mount point.
c)
Directories need to have the SetUID flag set to be used as a mount point.
d)
Files within a directory are deleted when the directory is used as a mount point.
16.
In Bash, inserting 1>&2 after a command redirects:
a)
standard error to standard input.
b)
standard input to standard error.
c)
standard output to standard error.
d)
standard error to standard output.
e)
standard output to standard input.
17.

What is the core of a Linux Operating System?

a)

Kernel

b)

Shell

c)

Command

d)

GUI

18.

A command-line command in Linux that allows to search files for lines containing a match to a given pattern is called:

a)

rm

b)

chmod

c)

find

d)

grep

19.

A Linux command-line command allowing a user to change his/her own password is known as:

a)

pwd

b)

pass

c)

passwd

d)

password

20.

What is the function of the Linux chmod command?

a)

Changes file access permissions

b)

Changes file owner and group permissions

c)

Compares the contents of two files or sets of files

d)

Changes the Linux command prompt

21.

Which of the answers listed below refers to a Linux command that allows for assuming the identity of a different system user and executing commands with security privileges of that user account?

a)

sync

b)

id

c)

usermod

d)

su

22.

What is the name of a Linux command-line utility used for reporting statistics on running processes?

a)

ps

b)

tasklist

c)

nbtstat

d)

id

23.

A Linux command that allows for modifying security privileges in order to be able to execute a single command that requires root access permissions is called:

a)

id

b)

sudo

c)

usermod

d)

su

24.

Which of the following key combinations allows to terminate the current process in Linux shell?

a)

Ctrl + C

b)

Ctrl + A

c)

Ctrl + E

d)

Ctrl + L

25.
su - what it does
a)
Switch to admin account
b)
Switch to root account
c)
Switch to nothing
d)
Outlook
26.
./ What it does
a)
To view how to use man commands
b)
To Open a Windows
c)
Lotus Web Server
d)
To Excute file
27.
Which of the following helps us to create user friendly commands
a)
#alias showme="ls -l"
b)
#friendly "ls -l"
c)
#showme cli
d)
None of the above
28.

What does Bash stand for?

a)

Born Again Shell

b)

Born Again Sign

c)

Born All Shell

d)

None of the above

29.

What does the diff command do in the Terminal?

a)

Compares only directories

b)

Compares two different files or directories

c)

Compares only files

d)

None of the above

30.

What does the command Head do?

a)

Prints out the first 5 lines of a file

b)

Prints out the first 10 lines of a file

c)

Prints out the first 15 lines of a file

d)

Prints out the first 20 lines of a file

31.

What does the command "wc" do?

a)

None of the below

b)

Window Command

c)

Wow Cool!

d)

Word count

32.
A process is a...
a)
program in execution
b)
program on the hard drive
c)
high level program
d)
low level program 
33.

What was special about the Linux?

a)

It's Free.

b)

It's Open-Source.

c)

It's bugs free.

d)

It's hacker proof.

34.

what is the package name for Apache web server in redhat linux?

a)

http

b)

apache

c)

webd

d)

httpd

35.

what is the full form of ssh ?

a)

secure shell

b)

silent shell

c)

service shell

d)

super shell

36.

which Commands used in red hat Linux to create the partition in hard disk.?

a)

lsblk

b)

mount

c)

fdisk

d)

mdisk

37.

What is MBR in hard disk

a)

Master boot recorder

b)

Master Boot Record

c)

Master Bootable Record

d)

None of the above

38.

User Password stored under which file in redhat linux

a)

/etc/passwd

b)

/etc/password

c)

/etc/gshadow

d)

/etc/shadow

39.

How to list an archive content using tar in redhat linux ?

a)

tar -cvf

b)

tar -lvf

c)

tar -xvf

d)

tar -tvf

40.

what is the use of lsblk command

a)

list block device file

b)

list all character device file

c)

both of the above option

d)

none of the above option

41.

what is the use of partprobe command

a)

save the partition table

b)

print the partition

c)

delete the partition

d)

update the partition table changes to kernel

42.

Which command is used to format the partition in redhat linux

a)

fkfs

b)

gkfs

c)

mkfs

d)

rkfs

43.

How can you display the manual page for a specific command in Linux?

a)

man

b)

info

c)

help

d)

manual

44.

User passwords are stored in

a)

/etc/password

b)

/etc/passwd

c)

/root/passwd

d)

/root/password

45.

Different versions of Linux OS is called _________

a)

Kernal

b)

Shell

c)

Wildcard

d)

Distributaries

46.

How do you add execute permission for owner and group in a file?

a)

chmod +x filename

b)

chmod +w filename

c)

chmod +r filename

d)

chmod +e filename

47.

Add the line "Ryan" to the file enemies without removing any other data without using a text editor

a)

echo "Ryan" >> enemies

b)

echo "Ryan" > enemies

c)

echo "Ryan" < enemies

d)

cp "Ryan" enemies

48.

In a BASH Script which of the below would you choose to see if a number is greater than another number

a)

<

b)

>

c)

-gt

d)

-ge

49.

What would type to run a script with the file name test.sh if you are in the same directory as the script

a)

script.sh

b)

/script.sh

c)

./script.sh

d)

exec script.sh

50.

We often say that Ansible is

a)

Simple

b)

Agentless

c)

Extensible

d)

All of the above

51.

Which of the following terms best describes the Ansible architecture?

a)

Client/Server

b)

Event-Driven

c)

Stateless

d)

Agentless

52.

Containers running on a single machine all share the same operating system kernel, so they start instantly and make more efficient use of RAM

a)

TRUE

b)

FALSE

53.

Do virtual Machines run on top of?

a)

Kernal

b)

Operating System

c)

Hypervisor

54.

Running instance of an image is called?

a)

Container

b)

Registry

c)

Daemon

55.

Which command is used for fetching the list of running containers

a)

docker ps

b)

docker images

c)

docker ps -a

56.

what is Docker?

a)

A virtual machine

b)

A container runtime

c)

A hypervisor

d)

A programmimg language

57.

what is docker hub?

a)

A public repository of docker images

b)

A tool for managing docker images

c)

A tool for monitoring docker hosts

58.

what is the command to run container from an image?

a)

docker create

b)

docker run

c)

docker build

59.

why we use -d command in docker?

a)

To attach to the terminal

b)

To get into seconday shell

c)

To run container in detach mood

60.

Default Apache stores its html pages in:

a)

/etc/www

b)

/var/www

c)

/apache/www

d)

/var/www/html

61.

On which port does Apache run by default?

a)

443

b)

80

c)

8080

d)

22

62.

What is the correct syntax for a secure copy command, to copy the file "foobar.txt" from the local host to a remote host?

a)

scp foobar.txt your_username@remotehost.edu:/some/remote/directory

b)

scp your_username@remotehost.edu:/some/remote/directory foobar.txt

c)

scp foobar.txt remotehost.edu:/some/remote/directory -u your_username

d)

scp -u your_username@remotehost.edu:/some/remote/directory foobar.txt

63.

The correct command in Linux to restart the ssh daemon is:

a)

systemctl ssh restart

b)

sshd restart now

c)

sudo service restart sshd

d)

sudo systemctl restart sshd

64.

Which symbol/command is used to move a job from terminal?

a)

&

b)

fg

c)

@

d)

rm

65.

What is the use of grep command?

a)

Filter the output

b)

Remove the output

c)

Delete the directory

d)

Create the file

66.

TAR stands for___

a)

Traditional file

b)

Targeted file

c)

Tape archieve file

d)

Thread renderer

67.

Which shell is the most common and best to use?

a)

Korn shell

b)

C shell

c)

Bourne shell

d)

Bash Shell

68.

command to change the owner of a particular file or directory

a)

iwconfig

b)

clear

c)

dd

d)

chown

69.

Untuk membuka editor teks dilinux, kita dapat menjalankan perintah..

a)

Gedit

b)

notepad

c)

word

d)

text

e)

mcdit

70.

Can you delete a directory with the command: "rm -rf" ?

a)

Only using the Root-user

b)

Yes

c)

No

d)

Only if the directory is empty

71.

What makes a file or folder hidden on Linux?

a)

the -h attribute

b)

having a period ( . ) at the beginning of its name

c)

the "hidden" command

d)

no files or folders can be hidden on Linux

72.

Is it legal to edit Linux Kernel?

a)

Yes

b)

No

c)

Only if you have a valid Licence for the distribution

d)

Sometimes, depending on the distribution

73.

What is command used to print the directory list with detail information?

a)

ls -a

b)

ls -l

c)

ls

d)

ls -v

74.

How to force remove file and directory at the same time

a)

rm -r

b)

rm -rf

c)

rmdir -r

d)

rm -f

75.

What is the NFS?

a)

Null File System

b)

New File System

c)

Network File System

d)

Number File System