wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Commanding the Command Line Quiz

Total questions: 15

Worksheet time: 3mins

Name
Class
Date
1.

What command is used to display the current working directory?

a)

showdir

b)

pwd

c)

dir

d)

currentdir

2.

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

a)

mkdir

b)

newdir

c)

mkd

d)

makedir

3.

To navigate to the parent directory, which command should be used?

a)

cd ~

b)

cd ..

c)

cd /

d)

cd home

4.

Which command is used to remove a file in Linux?

a)

delete

b)

remove

c)

rm

d)

del

5.

To display the contents of a file in the terminal, which command is used?

a)

show

b)

cat

c)

display

d)

view

6.

What is the purpose of the `touch` command in Linux?

a)

Creates a new file

b)

Modifies file permissions

c)

Renames a file

d)

Deletes a file

7.

To copy a file from one directory to another, which command is used?

a)

mv

b)

cp

c)

copy

d)

move

8.

How can you recursively remove a directory and its contents in Linux?

a)

rmdir

b)

rm -r

c)

remove -R

d)

del /s

9.

Which command is used to highlight the specified word in a text?

a)

grip

b)

hl

c)

mark

d)

grep

10.

How can you display the disk space usage of a file or directory?

a)

df

b)

du

c)

diskusage

d)

showspace

11.

To rename a file in Linux, which command is used?

a)

rename

b)

change

c)

mv

d)

ren

12.

What does the ls -a command do?

a)

Lists all files, including hidden ones

b)

Lists only hidden files

c)

Lists files in alphabetical order

d)

Lists all files in long format

13.

Which command is used to display the inode of a file?

a)

inode

b)

ls -i

c)

showinode

d)

fileinode

14.

To view the last few lines of a text file, which command is used?

a)

tail

b)

view

c)

last

d)

end

15.

What command is used to display the file type of a given file in Linux?

a)

filetype

b)

ftype

c)

type

d)

file