wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linux essencials

Total questions: 44

Worksheet time: 44mins

Name
Class
Date
1.

What are the differences between hard disk and solid state disk?

a)

Hard disk have a motor and moving parts, solid state disk do not

b)

Hard disk can fail due to physical damage, shile solid state disk cannot fail

c)

/dev/sda is a hard disk devide while /dev/ssda is a solid state disk

d)

Solid state disk provide faster Access to stored data than a hard disk.

2.

Reverse DNS assigns hostnames to IP addresses. How is the name of the IP address 198.51.100.165 stored on a DNS server?

a)

In the A record for 165.100.51.198.ipv4.arpa.

b)

In the PTR record for 165.100.51.198.in-addr.arpa.

c)

In the RNAME record for 198-51-100-165.rev.arpa.

d)

In the ARPA record for 165.100.51.198.rev.

e)

In the REV record for arpa.in-addr.198.51.100.165.

3.

What information can be displayed by top?

a)

Existing files, ordered by their size.

b)

Running processes, ordered by CPU or RAM consumption.

c)

User accounts, ordered by the number of logins.

d)

User groups, ordered by the number of members.

e)

User accounts, ordered by the number of files.

4.

Which of the following commands can be used to resolve a DNS name to an IP address?

a)

dnsname

b)

dns

c)

query

d)

host

e)

iplookup

5.

Which of the following outputs comes from the command free?

a)

b)

c)

d)

e)

6.

what is the UID of the user root?

a)

1

b)

-1

c)

255

d)

65636

e)

0

7.

What is true about the owner of a file?

a)

Each file is owned by exactly one user and one group.

b)

The owner of a file always has full permissions when accessing the file.

c)

The user owning a file must be a member of the file’s group.

d)

When a user is deleted, all files owned by the user disappear.

e)

The owner of a file cannot be changed once it is assigned to an owner.

8.

What information is stored in /etc/passwd? (Choose three.)

a)

The user’s storage space limit

b)

The numerical user ID

c)

The username

d)

The encrypted password

e)

The user\s default shell

9.

Which of the following tar options handle compression? (Choose two.)

a)

-bz

b)

-z

c)

-g

d)

-j

e)

-z2

10.

Which of the following keys can be pressed to exit less?

a)

i

b)

x

c)

e

d)

q

e)

!

11.

Which of the following commands sorts the output of the command export-logs?

a)

export-logs < sort

b)

export-logs > sort

c)

export-logs & sort

d)

export-logs | sort

e)

export-logs <> sort

12.
a)

*.txt

b)

a b

c)

c.cav

d)

a.txt

e)

a. txt

b. txt

13.

Which of the following commands will search for the file foo.txt under the directory /home?

a)

search /home –file foo.txt

b)

search /home foo. txt

c)

find /home – file foo.txt

d)

find /home –name foo.txt

e)

find /home foo.txt

14.
a)

The file’s extension should be changed from .sh to .bin.

b)

The execute bit should be set in the file’s permissions.

c)

The user executing the script should be added to the exec group.

d)

The SetUID bit should be set in the file’s permissions

e)

The script should be run using #!./test. sh instead of ./test.sh.

15.

What is a Linux distribution?

a)

The Linux file system as seen from the root account after mounting all file systems.

b)

A bundling of the Linux kernel, system utilities and other software.

c)

The set of rules which governs the distribution of Linux kernel source code

d)

An operating system based on Linux but incompatible to the regular Linux kernel.

16.

Which package management tool is used in Red Hat-based Linux Systems?

a)

portage

b)

rpm

c)

apt-get

d)

dpkg

e)

packagectl

17.

Why are web browser cookies considered dangerous?

a)

Cookies support identification and tracking of users.

b)

Cookies are always public and accessible to anyone on the internet.

c)

Cookies consume significant amounts of storage and can exhaust disk space.

d)

Cookies store critical data which is lost when a cookie is deleted.

e)

Cookies can contain and execute viruses and malware.

18.

Which of the following are typical services offered by public cloud providers? (Choose three.)

a)

Platform as a Service(PaaS)

b)

Infrastructure as a Service(IaaS)

c)

Internet as a Service(IaaS)

d)

Graphics as a Service (GaaS)

e)

Software as a Service (SaaS)

19.

Which of the following characters in a shell prompt indicates the shell is running with root privileges?

a)

!

b)

#

c)

*

d)

&

e)

$

20.

What is true about a recursive directory listing?

a)

It includes the content of sub-directories.

b)

It includes the permissions of the directory listed.

c)

It includes details of file system internals, such as inodes.

d)

It includes ownership information for the files.

e)

It includes a preview of content for each file in the directory.

21.

Which of the following directories contains information, documentation and example configuration files for installed software packages?

a)

/usr/share/doc/

b)

/etc/defaults/

c)

/var/info/

d)

/doc/

e)

/usr/examples/

22.

Which of the following commands adds the directory /new/dir/ to the PATH environment variable?

a)

$PATH=/new/dir: $PATH

b)

PATH=/new/dir: PATH

c)

export PATH=/new/dir: PATH

d)

export $PATH=/new/dir: $PATH

e)

export PATH=/new/dir: $PATH

23.

A user is currently in the directory /home/user/Downloads/ and runs the command

ls ../Documents/

Assuming it exists, which directory’s content is displayed?

a)

/home/user/Documents/

b)

/home/user/Documents/Downloads/

c)

/home/user/Downloads/Documents/

d)

/Documents/

e)

/home/Documents

24.

Which of the following is a protocol used for automatic IP address configuration?

a)

NFS

b)

LDAP

c)

SMTP

d)

DNS

e)

DHCP

25.

Which of the following devices represents a hard disk partition?

a)

/dev/ttyS0

b)

/dev/sata0

c)

/dev/part0

d)

/dev/sda2

e)

/dev/sda/p2

26.

What can be found in the /proc/ directory?

a)

One directory per installed program.

b)

One device file per hardware device.

c)

One file per existing user account.

d)

One directory per running process.

e)

One log file per running service.

27.

A new server needs to be installed to host services for a period of several years. Throughout this time, the server should receive important security updates from its

Linux distribution.

Which of the following Linux distributions meet these requirements? (Choose two.)

a)

Ubuntu Linux LTS

b)

Fedora Linux

c)

Debian GNU/Linux Unstable

d)

Ubuntu Linux non-LTS

e)

Red Hat Enterprise Linux

28.

Which of the following directories must be mounted with read and write access if it resides on its own dedicated file system?

a)

/opt

b)

/lib

c)

/etc

d)

/var

e)

/usr

29.

The ownership of the file doku.odt should be changed. The new owner is named tux. Which command accomplishes this change?

a)

chmod u=tux doku.odt

b)

newuser doku.odt tux

c)

chown tux doku.odt

d)

transfer tux: doku.odt

e)

passwd doku.odt:tux

30.

What happens to a file residing outside the home directory when the file owner's account is deleted? (Choose two.)

a)

During a file system check, the file is moved to /lost +found.

b)

The file is removed from the file system.

c)

The UID of the former owner is shown when listing the file's details.

d)

The user root is set as the new owner of the file.

e)

Ownership and permissions of the file remain unchanged.

31.

What is true about links in a Linux file system?

a)

A symbolic link can only point to a file and not to a directory.

b)

A hard link can only point to a directory and never to a file.

c)

When the target of the symbolic link is moved, the link is automatically updated.

d)

A symbolic link can point to a file on another file system.

e)

Only the root user can créate hard links.

32.

Which files are the source of the information in the following output? (Choose two.)

uid=1000 (bob) gid=1000 (bob) groups=1000 (bob), 10 (wheel), 150 (wireshark), 989 (docker), 1001 (libvirt)

a)

/etc/id

b)

/etc/passwd

c)

/etc/group

d)

/home/index

e)

/var/db/users

33.

Which of the following tasks can the command passwd accomplish? (Choose two.)

a)

Change a user's username.

b)

Change a user's password.

c)

Create a new user account.

d)

Create a new user group.

e)

Lock a user account.

34.

Which command displays file names only and no additional information?

a)

ls -a

b)

ls -lh

c)

ls -l

d)

ls -alh

e)

ls -nl

35.

Which of the following commands puts the lines of the file data.csv into alphabetical order?

a)

a..z data.csv

b)

sort data.csv

c)

abc data.csv

d)

wc -s data.csv

e)

grep --sort data.csv

36.

Which of the following examples shows the general structure of a for loop in a Shell script?

a)

for *.txt as file => echo $file

b)

for *.txt ( echo $i )

c)

for file in *.txt

do

echo $i

done

d)

for ls *.txt exec {} \;

e)

foreach @{file} {

echo $i

}

37.

What is the return value of a shell script after successful execution?

a)

1

b)

0

c)

-1

d)

-255

e)

255

38.

Which of the following statements are true regarding a typical shell script? (Choose two.)

a)

It has the executable permission bit set.

b)

It starts with the two carácter sequence #!.

c)

It is located in /usr/local/scripts/.

d)

It is located in /etc/bash/scripts/.

e)

It is compiled into a binary file compatible with the current machine architecture.

39.

Which of the following commands extracts the contents of the compressed archive file1.tar.gz?

a)

tar -czf file1.tar.gz

b)

ztar file1.tar.gz

c)

tar -xzf file1.tar.gz

d)

tar --extract file1.tar.gz

e)

detar file1.tar.gz

40.

Which of the following commands finds all lines in the file operating-systems.txt which contain the term linux, regardless of the case?

a)

igrep linux operating-systems.txt

b)

less -i linux operating-systems.txt

c)

grep -i linux operating-systems.txt

d)

cut linux operating-systems.txt

e)

cut [Ll] [Ii] [Nn] [Uu] [Xx] operating-systems.txt

41.

Which of the following programs are web servers? (Choose two.)

a)

Apache HTTPD

b)

Postfix

c)

Curl

d)

Dovecot

e)

Nginx

42.

Which of the following Linux Distributions is derived from Red Hat Enterprise Linux?

a)

Raspbian

b)

OpenSUSE

c)

Debian

d)

Ubuntu

e)

CentOS

43.

What are the differences between a private web browser window and a regular web browser window? (Choose three.)

a)

Private web browser windows do not allow printing or storing websites.

b)

Private web browser windows do not store cookies persistently.

c)

Private web browser windows do not support logins into websites.

d)

Private web browser windows do not keep records in the browser history.

e)

Private web browser windows do not send regular stored cookies.

44.

What is the preferred source for the installation of new applications in a Linux based operating system?

a)

The vendor's version management system

b)

A CD-ROM disk

c)

The distribution's package repository

d)

The vendor's website

e)

A retail store