wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Command Line Usage Quiz

Total questions: 40

Worksheet time: 20mins

Name
Class
Date
1.

What is the shell in the context of command line usage?

a)

A graphical user interface

b)

A program that takes keyboard commands and passes them to the operating system

c)

A type of hardware component

d)

A network protocol

2.

What does "bash" stand for?

a)

Basic Shell

b)

Bourne Again SHell

c)

Binary Access Shell

d)

Built-in Advanced Shell

3.

What is a terminal emulator used for?

a)

To play video games

b)

To interact with the shell using a graphical user interface

c)

To edit images

d)

To browse the internet

4.

What does a shell prompt typically include?

a)

The current time and date

b)

The username and machine name, followed by the current working directory and a dollar sign

c)

A list of installed programs

d)

The system's IP address

5.

What does a pound sign ("#") at the end of a shell prompt indicate?

a)

The system is offline

b)

The terminal session has superuser privileges

c)

The shell is in sleep mode

d)

The shell is running a script

6.

What is the function of the up-arrow key in the command line interface?

a)

It deletes the previous command.

b)

It repeats the last command entered.

c)

It opens a new terminal window.

d)

It saves the current command.

7.

What is the term used for the feature that allows recalling previous commands in the terminal?

a)

Command recall

b)

Command memory

c)

Command history

d)

Command storage

8.

Which key combination is NOT used for copying and pasting in the terminal window?

a)

Ctrl-c and Ctrl-v

b)

Middle mouse button

c)

Left mouse button and drag

d)

Double-clicking a word

9.

What is the focus policy setting that requires clicking on a window to make it active?

a)

Focus follows mouse

b)

Click to focus

c)

Hover to focus

d)

Auto-focus

10.

Which command is used to display the current time and date in Linux?

a)

cal

b)

df

c)

date

d)

free

11.

What does the 'cal' command display by default?

a)

Current time and date

b)

Calendar of the current month

c)

Amount of free disk space

d)

Amount of free memory

12.

Which command is used to see the current amount of free space on disk drives?

a)

free

b)

df

c)

date

d)

cal

13.

To display the amount of free memory, which command should be used?

a)

df

b)

cal

c)

date

d)

free

14.

How can you end a terminal session in Linux?

a)

By closing the terminal emulator window

b)

By pressing Ctrl+Alt+F1

c)

By entering the command 'start'

d)

By pressing Alt+F7

15.

What command can be used to end a terminal session at the shell prompt?

a)

start

b)

exit

c)

close

d)

shutdown

16.

What key combination allows you to switch from one virtual console to another in Linux?

a)

Alt+F7

b)

Ctrl+Alt+F1

c)

Alt+F1-F6

d)

Ctrl+F7

17.

Which command is used to print the name of the current working directory in Linux?

a)

cd

b)

ls

c)

pwd

d)

dir

18.

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

a)

List directory contents

b)

Change directory

c)

Print name of current working directory

d)

Create a new directory

19.

What is the first directory in a hierarchical directory structure called?

a)

Root directory

b)

Main directory

c)

Base directory

d)

Top directory

20.

In Unix-like systems, how many file system trees are there regardless of the number of storage devices?

a)

One

b)

Two

c)

Three

d)

Four

21.

Who is responsible for attaching storage devices at various points on the file system tree?

a)

System administrator

b)

File manager

c)

Network administrator

d)

Database administrator

22.

Which command is used to display the current working directory?

a)

ls

b)

cd

c)

pwd

d)

mkdir

23.

What is the initial directory set when a user logs into the system?

a)

Root directory

b)

Home directory

c)

Bin directory

d)

Temp directory

24.

Which command is used to list the contents of a directory?

a)

pwd

b)

ls

c)

cd

d)

rm

25.

What is an absolute pathname?

a)

A pathname that starts from the current directory

b)

A pathname that starts from the home directory

c)

A pathname that starts from the root directory

d)

A pathname that starts from the bin directory

26.

What does the command `pwd` do in a Linux terminal?

a)

Changes the current directory

b)

Lists all files in the directory

c)

Displays the current working directory

d)

Deletes files in the directory

27.

What is the symbol used to represent the parent directory in a relative pathname?

a)

.

b)

..

c)

/

d)

~

28.

Which command would you use to change the directory to `/usr` using a relative pathname?

a)

cd /usr

b)

cd ..

c)

cd /usr/bin

d)

cd ~

29.

What is the difference between an absolute pathname and a relative pathname?

a)

Absolute pathnames start from the root directory, while relative pathnames start from the working directory.

b)

Absolute pathnames use special symbols, while relative pathnames do not.

c)

Absolute pathnames are shorter than relative pathnames.

d)

Absolute pathnames are used only in Windows, while relative pathnames are used in Linux.

30.

What command changes the working directory to your home directory in Linux?

a)

cd ~

b)

cd /

c)

cd ..

d)

cd bin

31.

How can you change the working directory to the home directory of a specific user named "bob"?

a)

cd /bob

b)

cd ~bob

c)

cd bob/

d)

cd /home/bob

32.

What is the result of using the command "cd -" in Linux?

a)

Changes to the root directory

b)

Changes to the previous working directory

c)

Changes to the home directory

d)

Changes to the bin directory

33.

Which of the following commands is equivalent to "cd ./bin"?

a)

cd bin

b)

cd /bin

c)

cd ../bin

d)

cd bin/

34.

What happens to filenames that begin with a period character in Linux?

a)

They are automatically deleted.

b)

They are hidden and not listed unless specified.

c)

They are converted to uppercase.

d)

They are moved to a special folder.

35.

How does Linux treat filenames in terms of case sensitivity?

a)

Linux treats all filenames as lowercase.

b)

Linux treats all filenames as uppercase.

c)

Linux is case sensitive, treating 'File1' and 'file1' as different files.

d)

Linux ignores case sensitivity in filenames.

36.

What is a key difference between Linux and some other operating systems regarding file extensions?

a)

Linux requires file extensions for all files.

b)

Linux does not use file extensions to determine file type.

c)

Linux only uses .txt as a file extension.

d)

Linux automatically adds extensions to files.

37.

What should you avoid when creating filenames in Linux?

a)

Using numbers.

b)

Using spaces.

c)

Using lowercase letters.

d)

Using underscores.

38.

Which command is used to list all files and directories in the current directory?

a)

ls

b)

cd

c)

mkdir

d)

rm

39.

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

a)

rm

b)

touch

c)

mkdir

d)

rmdir

40.

Which command is used to remove a file in Linux?

a)

cp

b)

rm

c)

touch

d)

mv