wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz 1 | Information Security | Kali Linux Commands

Total questions: 20

Worksheet time: 7mins

Name
Class
Date
1.

You need to list all the files and directories in your current directory, including hidden ones. Which command would you use?

a)

ls -a

b)

ls -l

c)

ls -R

d)

ls -1

2.

You’re working on a project, and you need to create a new folder named "Project". Which command will you use to create it?

a)

mkdir -p Project

b)

mkdir Project

c)

touch Project

d)

mkdir -v Project

3.

You want to move to your home directory using the terminal. Which command would you use?

a)

cd ~

b)

cd /home/user

c)

cd -

d)

cd ..

4.

After creating a new file using touch, you want to add some content into it while preserving content. Which command do you use?

a)

echo "Some text" > filename.txt

b)

cat filename.txt

c)

nano filename.txt

d)

All of these

5.

Which command will you use to display the current working directory in the terminal?

a)

sudo

b)

pwd

c)

ls

d)

ls ./

6.

You are in the /home/user/Documents directory and want to go up one level above. In which directory you will be?

a)

/home/user

b)

/home/

c)

~

d)

~/home

7.

You’ve just created a .txt file named notes.txt and now want to rename it to tasks.txt. What command do you use?

a)

mv notes.txt /tasks.txt

b)

rename notes.txt tasks.txt

c)

mv notes.txt tasks.txt

d)

cp notes.txt tasks.txt

8.

You need to delete a folder called "OldFiles" and all of its contents, including subdirectories. Which command would you use?

a)

rm OldFiles

b)

rm -r OldFiles

c)

rm -f OldFiles

d)

rmdir -r OldFiles

9.

You want to find a file named report.txt somewhere in the /Documents directory. Which command helps you locate it?

a)

locate report.txt

b)

search -name report.txt /Document

c)

find /Documents -name report.txt

d)

ls report.txt

10.

You need to check the disk usage of a folder called "Project". Which command would you use?

a)

df -h Project

b)

du -sh Project

c)

du -ah Project

d)

df Project

11.

After downloading a file from the internet using wget, you notice that the download was interrupted. You need to continue downloading the file from where it left off. What command would you use?

a)

wget -r [URL]

b)

wget --resume [URL]

c)

wget -c [URL]

d)

wget -O [filename]

12.

You’re editing a Python file and want to create a directory to store it under /home/user/projects. What would be the appropriate command?

a)

mkdir projects

b)

mkdir -p /home/user/projects

c)

mkdir /home/user/projects

d)

mkdir -v /home/user/projects

13.

You’ve created a new file test.py and want to write a code inside it using nano. Which key combination will save the file after editing?

a)

Ctrl+S then Enter

b)

Ctrl+C then S

c)

Ctrl+X then Y

d)

Ctrl+Z then Y

14.

After moving greeting.txt to a directory named "backup", you now want to copy it back to the original directory. Which command will you use?

a)

cp backup/greeting.txt .

b)

mv backup/greeting.txt .

c)

cp greeting.txt backup/

d)

cp greeting.txt backup/

15.

You need to change the permissions of a file named hello.txt to allow the owner to read, write, and execute, while others can only read, write, execute. Which command should you use?

a)

chmod 755 hello.txt

b)

chmod 777 hello.txt

c)

chmod 644 hello.txt

d)

chmod 7777 hello.txt

16.

You need to install a package named gcc on a system that uses the apt package manager. What command should you run?

a)

sudo apt install gcc

b)

apt install gcc

c)

sudo apt-get gcc

d)

sudo install gcc

17.

You created a file message.txt and want to append the text "Welcome" to it without overwriting the current content. Which command do you use?

a)

echo "Welcome" >> message.txt

b)

echo "Welcome" > message.txt

c)

cat "Welcome" message.txt

d)

nano welcome.txt

18.

You want to quickly delete a file named old_report.txt with confirmation. Which command do you use?

a)

rm -f old_report.txt

b)

rm -I old_report.txt

c)

rm old_report.txt

d)

None of these

19.

You need to check the kernel version of your Kali Linux system. Which command will show it?

a)

uname -a

b)

uname -r

c)

uname -v

d)

uname

20.

You’re using echo to write some text into a file. What is the correct command? Select all that apply.

a)
echo 'text' > filename
b)
echo 'text' | filename
c)
echo 'text' >> filename
d)
echo 'text' < filename