Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linux Commands Part A

Total questions: 28

Worksheet time: 18mins

Name
Class
Date
1.

What does the command `ssh` stand for?

a)

Secure Socket Handler

b)

Secure Shell

c)

Secure Server Host

d)

Secure System Handler

2.

Which command would you use to list the contents of a directory in Linux?

a)

pwd

b)

cd

c)

ls

d)

touch

3.

What is the primary use of the `touch` command in Linux?

a)

To display the current directory

b)

To create empty files

c)

To change directories

d)

To list directory contents

4.

Which command would you use to change the current directory to its parent directory?

a)

cd ..

b)

cd /

c)

cd ~

d)

cd -

5.

If you are in the directory `/home/user/docs` and you run the command `cd ..`, what will be your new current directory?

a)

/home/user

b)

/home

c)

/home/user/docs/..

d)

/

6.

You want to create a new empty file named `example.txt` in your current directory. Which command would you use?

a)

touch example.txt

b)

echo example.txt

c)

ls example.txt

d)

pwd example.txt

7.

What will be the output of the command `pwd` if you are currently in the directory `/home/user/docs`?

a)

/home

b)

/home/user

c)

/home/user/docs

d)

/docs

8.

You need to securely connect to a remote server with the IP address `192.168.1.1` using the username `admin`. Which command would you use?

a)

ssh admin@192.168.1.1

b)

ssh 192.168.1.1 admin

c)

ssh -u admin 192.168.1.1

d)

ssh 192.168.1.1 -l admin

9.

You have a file named `report.txt` and you want to update its modification timestamp without changing its content. Which command would you use?

a)

touch report.txt

b)

echo report.txt

c)

ls -l report.txt

d)

pwd report.txt

10.

You are in the directory `/home/user/docs` and you want to list all files, including hidden ones, in a detailed format. Which command would you use?

a)

ls -a

b)

ls -l

c)

ls -al

d)

ls -lh

11.

What does 'pwd' stand for?

a)

Print Working Directory

b)

Print Directory

c)

Pathway Directory

d)

Previous Working Directory

12.

Which option is used to list files and directories in a long format in Linux?

a)

-m

b)

-F

c)

-a

d)

-l

13.

What is the function of the Linux man command? (There are multiple correct options choose all).

a)

Provide examples of common usage of the command.

b)

Include a list of related commands.

c)

Give a description of the specific Linux command’s purpose.

d)

Provide a list of other unrelated commands.

14.

What is the exit status of the 'pwd' command for success?

a)

1

b)

3

c)

2

d)

0

15.

What does 'cd' stand for in Linux?

a)

Check Disk

b)

Change Directory

c)

Copy Data

d)

Create Directory

16.

Which command is used to switch back to the previous directory where you were working earlier?

a)

cd .

b)

cd /

c)

cd ..

d)

cd -

17.

How can you move two directories up from your current location?

a)

cd ../

b)

cd ../../

c)

cd ../ ../

d)

cd /../

18.

What does the 'cp' command do in Linux?

a)

Copy a file or directory

b)

Display system date

c)

Show disk space statistics

d)

Create a new directory

19.

What is the purpose of the 'cd' command in Linux?

a)

Change directories

b)

Copy files

c)

Move files

d)

Delete files

20.

Which of the Linux command-line commands listed below

is used for directory traversal?

a)

cd

b)

dir

c)

ps

d)

dig

21.

What does the ls command do in Linux?

a)

Delete files

b)

List files and directories

c)

Modify files

d)

Create new files

22.

What does the 'df -h' command do in Linux?

a)

Show disk space statistics

b)

Copy a file or directory

c)

Create a new directory

d)

Display system date

23.

what is the Linux command segment used to append data to the "s.txt" file ?

a)

echo "Hey Ubuntu "

b)

echo "Hey Ubuntu " > s.txt

c)

ls >> s.txt

d)

echo "Hello " > s.txt

24.

is a command-line shell command used to change the current working directory in (or change from one directory to another

a)

pwd

b)

rm

c)

cd

d)

chmod

25.

The syntax for deleting a file is ​ (a)   ​ (b)  

Choose from the below words
rm
text.txt
del
delete
26.

If you are lost and need ​ (a)   in Linux systems you must us this command ​ (b)  

Choose from the below words
help
man "topic"
manual
documents
27.

I'm lost and don't know where I am, I use ​ (a)   to find where I am in the system?

Choose from the below words
pwd
cd?
cd\
cd..
pmd
28.

What is the name of a Linux command used for renaming files and directories?

a)

rm

b)

ps

c)

mv

d)

ls