Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linux Commands Chapter 3 Quiz

Total questions: 75

Worksheet time: 38mins

Name
Class
Date
1.

Which command is used to list directory contents in a Linux system?

a)

file

b)

less

c)

ls

d)

cat

2.

What does the 'file' command do in a Linux system?

a)

List directory contents

b)

Determine file type

c)

View file contents

d)

Delete files

3.

How can you specify a directory to list using the 'ls' command?

a)

ls -a

b)

ls -l

c)

ls [directory_name]

d)

ls -r

4.

What is the purpose of the 'less' command in a Linux system?

a)

List directory contents

b)

Determine file type

c)

View file contents

d)

Copy files

5.

What does the command "ls -l" do in a Linux system?

a)

Lists files in a short format

b)

Lists files in a long format

c)

Deletes files

d)

Copies files

6.

Which of the following is a directory listed under /usr in the document?

a)

Desktop

b)

Documents

c)

libexec

d)

lib

7.

What is the purpose of adding options to a command in Linux?

a)

To delete files

b)

To modify the behavior of the command

c)

To create new files

d)

To rename files

8.

What does the "-l" option do in the "ls" command?

a)

Lists files in reverse order

b)

Produces long format output

c)

Sorts files by modification time

d)

Lists all files, including hidden ones

9.

Which option is used with the "ls" command to sort files by modification time?

a)

-a

b)

-l

c)

-t

d)

--reverse

10.

How do you reverse the order of the sort in the "ls" command?

a)

-a

b)

-l

c)

-t

d)

--reverse

11.

What does the "-a" option do in the "ls" command?

a)

Lists files in reverse order

b)

Produces long format output

c)

Lists all files, even hidden ones

d)

Sorts files by modification time

12.

Are command options in Linux case-sensitive?

a)

Yes

b)

No

c)

Only for certain commands

d)

Only for certain options

13.

What does the '-d' option do when used with the 'ls' command?

a)

Displays results in long format

b)

Lists the contents of the directory

c)

Sorts results by file size

d)

Displays file sizes in human-readable format

14.

Which option appends an indicator character to the end of each listed name in the 'ls' command?

a)

-h

b)

-F

c)

-t

d)

-r

15.

What does the '-h' option do in the 'ls' command?

a)

Displays results in reverse order

b)

Sorts results by modification time

c)

Displays file sizes in human-readable format

d)

Lists the contents of the directory

16.

How does the '-r' option affect the output of the 'ls' command?

a)

Displays results in long format

b)

Sorts results by file size

c)

Displays results in reverse order

d)

Lists the contents of the directory

17.

What is the purpose of the '-l' option in the 'ls' command?

a)

Sorts results by file size

b)

Displays results in long format

c)

Lists the contents of the directory

d)

Displays file sizes in human-readable format

18.

What does a leading dash in the file permissions indicate?

a)

A) A directory

b)

B) A regular file

c)

C) A symbolic link

d)

D) An executable file

19.

In the file permissions, what do the first three characters after the file type indicate?

a)

A) Access rights for the file's group

b)

B) Access rights for everyone else

c)

C) Access rights for the file's owner

d)

D) Access rights for the system administrator

20.

What does the term "root" refer to in the context of file permissions?

a)

A) The file's group name

b)

B) The file's owner username

c)

C) The file's type

d)

D) The file's size

21.

What command is used in Linux to determine a file's type?

a)

ls

b)

file

c)

cat

d)

grep

22.

What does the 'file' command in Linux do when invoked?

a)

Deletes the file

b)

Prints a brief description of the file's contents

c)

Copies the file

d)

Renames the file

23.

Which of the following is an example of a file type mentioned in the text?

a)

PNG

b)

MP3

c)

DOCX

d)

PDF

24.

What is the purpose of the 'less' command in Linux?

a)

To edit text files

b)

To view text files

c)

To delete text files

d)

To copy text files

25.

What does ASCII stand for?

a)

American Standard Code for Information Interchange

b)

American System Code for Internet Interchange

c)

American Standard Code for International Interchange

d)

American System Code for Information Interchange

26.

What is the primary function of ASCII?

a)

To map keyboard characters to numbers

b)

To compress video files

c)

To create word processor documents

d)

To translate languages

27.

How many bytes of data does fifty characters of text translate to in ASCII?

a)

Fifty bytes

b)

Twenty-five bytes

c)

One hundred bytes

d)

Seventy-five bytes

28.

What is a key characteristic of ASCII text?

a)

It is a simple one-to-one mapping of characters to numbers

b)

It is used for complex video compression

c)

It contains many non-text elements

d)

It is primarily used for word processing

29.

What type of files contain only characters and a few rudimentary control codes like tabs and line feeds?

a)

Binary files

b)

Plain ASCII text files

c)

Executable files

d)

Image files

30.

Which program is mentioned as an editor for plain ASCII text files in Windows?

a)

WordPad

b)

Microsoft Word

c)

NOTEPAD.EXE

d)

Excel

31.

What is the purpose of examining text files in a Linux system?

a)

To modify system settings and write scripts

b)

To play multimedia files

c)

To run executable programs

d)

To edit images

32.

Which command is used to view the contents of a text file in Linux?

a)

cat

b)

view

c)

less

d)

open

33.

What key do you press to exit the 'less' program?

a)

e

b)

x

c)

q

d)

z

34.

What is the function of the 'Page Up' or 'b' command in the 'less' program?

a)

Scroll back one page

b)

Scroll forward one page

c)

Move to the end of the text file

d)

Display help screen

35.

Which command in the 'less' program is used to quit the application?

a)

h

b)

q

c)

G

d)

n

36.

What is the purpose of the 'less' program in Unix systems?

a)

To edit text files

b)

To view text documents page by page

c)

To compile code

d)

To manage system processes

37.

What does the 'G' command do in the 'less' program?

a)

Move to the end of the text file

b)

Scroll up one line

c)

Search forward for characters

d)

Display help screen

38.

What is the published standard that specifies the design of Linux file systems?

a)

Linux File System Design Standard

b)

Linux Filesystem Hierarchy Standard

c)

Linux System Architecture Standard

d)

Linux Directory Structure Standard

39.

Which command is used to list the directory contents in Linux?

a)

ls -a

b)

ls -l

c)

dir

d)

list

40.

What should you do if a command complains about something in Linux?

a)

Restart the system

b)

Ignore it and move on

c)

Reinstall the command

d)

Contact support

41.

What is the purpose of the /bin directory in Linux?

a)

Contains user documents

b)

Contains system configuration files

c)

Contains binaries (programs) that must be present for the system

d)

Contains temporary files

42.

What does the /boot directory contain in a Linux system?

a)

User account information

b)

Device nodes

c)

Linux kernel and boot loader

d)

System-wide configuration files

43.

Which file in the /boot directory is used to configure the boot loader?

a)

/boot/vmlinuz

b)

/etc/crontab

c)

/boot/grub/grub.conf or menu.lst

d)

/etc/passwd

44.

What is the purpose of the /dev directory in a Linux system?

a)

Contains system-wide configuration files

b)

Contains device nodes

c)

Contains user account information

d)

Contains the Linux kernel

45.

What type of files does the /etc directory contain?

a)

Device nodes

b)

Boot loader configuration files

c)

System-wide configuration files

d)

Linux kernel files

46.

Which file in the /etc directory defines when automated jobs will run?

a)

/etc/fstab

b)

/etc/passwd

c)

/etc/crontab

d)

/boot/vmlinuz

47.

What is the purpose of the /home directory in Linux?

a)

To store shared library files

b)

To provide each user with a personal directory

c)

To install optional software

d)

To contain mount points for removable media

48.

Which directory contains shared library files used by core system programs in Linux?

a)

/home

b)

/lib

c)

/media

d)

/opt

49.

What is the /lost+found directory used for in a Linux file system?

a)

To store user files

b)

To hold commercial software

c)

For partial recovery from file system corruption

d)

To mount removable media

50.

Where are mount points for removable media automatically created in modern Linux systems?

a)

/mnt

b)

/media

c)

/opt

d)

/lib

51.

What is the /opt directory used for in Linux?

a)

To store user home directories

b)

To contain shared library files

c)

To install optional software

d)

To recover lost files

52.

What is the purpose of the /proc directory in a Linux system?

a)

It stores user documents.

b)

It is a virtual file system maintained by the Linux kernel.

c)

It contains system binaries.

d)

It is the home directory for the root account.

53.

Which directory is the home directory for the root account in a Linux system?

a)

/usr

b)

/tmp

c)

/root

d)

/sbin

54.

What type of files are stored in the /sbin directory?

a)

User documents

b)

Temporary files

c)

System binaries

d)

Executable programs

55.

What is the primary use of the /tmp directory?

a)

Storing user documents

b)

Storing temporary, transient files

c)

Storing system binaries

d)

Storing executable programs

56.

Which directory is likely the largest one on a Linux system?

a)

/proc

b)

/root

c)

/usr

d)

/sbin

57.

What does the /usr/bin directory contain?

a)

Shared libraries

b)

Executable programs

c)

System binaries

d)

Temporary files

58.

Where are programs compiled from source code normally installed on a Linux system?

a)

/usr/share

b)

/usr/local/bin

c)

/var/log

d)

/usr/sbin

59.

Which directory contains more system administration programs?

a)

/usr/share

b)

/usr/local/bin

c)

/usr/sbin

d)

/var/log

60.

What type of files can be found in the /usr/share/doc directory?

a)

Log files

b)

System administration programs

c)

Documentation files

d)

User mail

61.

Which directory is known for storing data that is likely to change, such as databases and user mail?

a)

/usr/share

b)

/var

c)

/usr/local/bin

d)

/usr/sbin

62.

What does the /var/log directory contain?

a)

Shared data used by programs

b)

Log files and records of various system activities

c)

System administration programs

d)

Documentation files

63.

What is the most useful log file mentioned in the text that should be monitored?

a)

/var/log/errors

b)

/var/log/messages

c)

/var/log/system

d)

/var/log/security

64.

What is a symbolic link also known as?

a)

Hard link

b)

Direct link

c)

Soft link

d)

Permanent link

65.

In the directory listing example, what does the first letter 'l' indicate?

a)

It is a regular file

b)

It is a directory

c)

It is a symbolic link

d)

It is an executable file

66.

Why are symbolic links useful according to the text?

a)

They increase file security

b)

They allow multiple names for a file

c)

They compress files

d)

They encrypt files

67.

What problem do symbolic links help solve in the scenario described?

a)

Tracking file size

b)

Managing file permissions

c)

Handling frequent version changes

d)

Improving file download speed

68.

What is the purpose of a symbolic link in a file system?

a)

To create a copy of a file

b)

To point to another file or directory

c)

To delete a file

d)

To encrypt a file

69.

What happens when a program opens a symbolic link?

a)

It opens the symbolic link itself

b)

It opens the file or directory the link points to

c)

It creates a new symbolic link

d)

It deletes the symbolic link

70.

What is a hard link?

a)

A link that points to a symbolic link

b)

A link that allows files to have multiple names

c)

A link that encrypts files

d)

A link that deletes files

71.

What is one key takeaway about the Linux system mentioned in the text?

a)

It is a closed system

b)

It has many important files that are plain human-readable text

c)

It does not support symbolic links

d)

It only supports encrypted files

72.

What is one advantage of Linux compared to many proprietary systems?

a)

It is more expensive.

b)

It makes everything available for examination and study.

c)

It has fewer features.

d)

It is less secure.

73.

Where can you find the full version of the Linux Filesystem Hierarchy Standard?

a)

http://www.pathname.com/fhs/

b)

http://www.example.com/linux/

c)

http://www.linux.org/fhs/

d)

http://www.filesystem.com/standard/

74.

Which article provides information about the directory structure of Unix and Unix-like systems?

a)

http://en.wikipedia.org/wiki/Unix_directory_structure

b)

http://en.wikipedia.org/wiki/Linux_structure

c)

http://en.wikipedia.org/wiki/Unix_files

d)

http://en.wikipedia.org/wiki/Unix_systems

75.

Where can you find a detailed description of the ASCII text format?

a)

http://en.wikipedia.org/wiki/ASCII

b)

http://en.wikipedia.org/wiki/Text_format

c)

http://en.wikipedia.org/wiki/ASCII_format

d)

http://en.wikipedia.org/wiki/Text_ASCII