wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Mastering Basic Linux Commands

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

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

a)

ls

b)

list

c)

dir

d)

show

2.

What command would you use to change the current working directory to `/home/student`?

a)

cd /home/student

b)

chdir /home/student

c)

move /home/student

d)

goto /home/student

3.

Which command displays the contents of a text file named `notes.txt`?

a)

show notes.txt

b)

cat notes.txt

c)

open notes.txt

d)

read notes.txt

4.

How do you create a new empty file called `report.txt`?

a)

make report.txt

b)

touch report.txt

c)

newfile report.txt

d)

create report.txt

5.

Which command is used to remove a file named `oldfile.txt`?

a)

del oldfile.txt

b)

erase oldfile.txt

c)

rm oldfile.txt

d)

removefile oldfile.txt

6.

What is the command to display the current working directory?

a)

pwd

b)

cwd

c)

whereami

d)

dir

7.

Which command is used to copy a file named `data.csv` to a directory called `backup`?

a)

cp data.csv backup/

b)

copy data.csv backup/

c)

mv data.csv backup/

d)

duplicate data.csv backup/

8.

How do you move a file called `draft.docx` to the directory `Documents`?

a)

move draft.docx Documents/

b)

mv draft.docx Documents/

c)

cp draft.docx Documents/

d)

transfer draft.docx Documents/

9.

Which command is used to display the first 10 lines of a file named `log.txt`?

a)

head log.txt

b)

top log.txt

c)

start log.txt

d)

first log.txt

10.

What command would you use to see a list of all running processes?

a)

ps

b)

jobs

c)

listproc

d)

showproc

11.

Which command is used to search for the word "Australia" in a file called `countries.txt`?

a)

find "Australia" countries.txt

b)

search "Australia" countries.txt

c)

grep "Australia" countries.txt

d)

lookfor "Australia" countries.txt

12.

How do you display the manual page for the `ls` command?

a)

help ls

b)

man ls

c)

info ls

d)

manual ls

13.

Which command is used to display the amount of free and used memory in the system?

a)

meminfo

b)

free

c)

memory

d)

ram

14.

What command would you use to shut down the system immediately?

a)

shutdown now

b)

poweroff

c)

halt

d)

all of the above

15.

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

a)

date

b)

time

c)

datetime

d)

now