Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linux 1 -- Commands -- Chapter 1 & 2

Total questions: 14

Worksheet time: 14mins

Name
Class
Date
1.

Match the command to the correct description.

a)

display a message

1.

echo

b)

erase the terminal

2.

clear

c)

display the current logged in user

3.

whoami

d)

display previously entered commands

4.

history

e)

display information about a command

5.

type

2.

Which of the following is a command built into the shell?

a)

internal

b)

external

c)

current

d)

present

3.

Which directories do external commands typically reside in? (choose 3)

a)

/bin

b)

/usr/bin

c)

/usr/local/bin

d)

/etc/passwd

e)

/home

4.

Which command will provide a list of options for the ls command?

a)

ls --help

b)

ls -help

c)

ls -?

d)

ls --?

5.

Match the command to the correct description.

a)

list of directories

1.

ls

b)

list of directories with detailed information

2.

ls -l

c)

list of diretories including hidden files

3.

ls -a

d)

list of directories in reverse order

4.

ls -r

e)

pwd

5.

current directory

6.

Match the command to the correct description.

a)

moves up one level

1.

cd . .

b)

switch to the home directory of the current user

2.

cd ~

c)

switch between the current and the previous directory

3.

cd -

d)

creates a directory

4.

mkdir

e)

deletes an empty directory

5.

rmdir

7.

Match the command to the correct description.

a)

creates an empty file or updates the timestamp on a current file

1.

touch

b)

moves or renames files or directories

2.

mv

c)

copies a single file or directory to another location

3.

cp

d)

removes a directory and its contents

4.

rm -r

e)

deletes a file

5.

rm

8.

Displays the content of a file.

a)

cat

b)

touch

c)

ls

d)

type

9.

Match each part of this path to the correct description.

/home/student/Science

a)

represents the root directory

1.

/

b)

directory under the root directory

2.

home

c)

directory within the home directory

3.

student

d)

subdirectory within the student directory

4.

Science

10.

An "absolute" path starts at the highest level of the file system hierarchy.

Choose 2 answers that apply to this statement.

a)

/

b)

root

c)

cat

d)

ls

e)

cd -

11.

Which command provides detailed information about the ls command?

a)

man ls

b)

cat ls

c)

touch ls

d)

mkdir ls

12.

Match the description to the correct use of the calendar command.

a)

Shows the current month along with the next 2 months.

1.

cal -A 2

b)

Shows the current month along with the previous 2 months.

2.

cal -B 2

c)

Displays the entire calendar for the current year.

3.

cal -y

d)

Shows the calendar for December of 2025.

4.

cal 12 2025

e)

Shows the current month's calendar.

5.

cal

13.

Which is the correct description of the alias command?

a)

to make a command shorter or more descriptive

b)

can use to for command completion

c)

used as a text editor within Bash

d)

to view the contents of a file in ASCII format

14.

What file must you edit to create persistent aliases?

a)

.bashrc

b)

.selected_editor

c)

.profile

d)

.bashetc