wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

linux commands

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

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

a)

rm

b)

ps

c)

mv

d)

ls

2.

Which of the following commands allows for moving one

level up in Linux directory tree?

a)

cd -

b)

cd ..

c)

cd /

d)

cd .

3.

when creating soft link ,if the original file has been removed it won`t be useful any more ?

a)

True

b)

False

4.

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

5.

What is the name of a Linux command used for count the number of lines in a file ?

a)

wc a.txt

b)

count -l a.txt

c)

wc -l a.txt

d)

wc -w a.txt

6.

Which Command Shows Permissions in Files

a)

ls -l

b)

ls -a

c)

ls -h

d)

ls -r

7.

What single character can be used to refer to the active user's home directory?

a)

^

b)

$

c)

~

d)

there is none

8.

If I am in the /home/tator directory and run the command cp Desktop/file1.txt Desktop/file2.txt I am using what type of path for the files?

a)

Parent

b)

Absolute

c)

Relative

d)

Cousin

9.

What is the command to list hidden files & directory?

a)

ls -l

b)

ls -a

c)

ls

d)

None of these

10.

Which of the following commands allows for moving one level up in Linux directory tree?

a)

cd -

b)

cd /

c)

cd --

d)

cd ~

11.

Which permission amongst the following allows only groups to read and execute the file and denies all user as well as others to read, write and execute ?

a)

rwxrwx---

b)

rw-r-x--x

c)

---r-x---

d)

r-x-w-rwx

12.

How to make a file executable the right way?

a)

chmod 777

b)

chmod a-x

c)

chmod +x

d)

chmod 400

13.

Moves to the root directory

a)

cd ~

b)

cd \

c)

cd /

d)

cd ..

14.

The following command can list out all the current active logins.

a)

A - whoami

b)

B - who am i

c)

C - who

d)

D - None of the above.

15.

The mv command changes

a)

Only the directory entry

b)

Only the directory entry and i-node

c)

Only the i-node number

d)

None of the above

16.

change permission of a file to rw-r--r-x?

a)

chmod 546 file

b)

chmod 642 file

c)

chmod 645 file

d)

chmod 655 file

17.
Which meta character takes output of first command as input of second command?
a)
Multiple Choice
b)
;
c)
|
d)
||
18.

which of the following command deletes directory along with its subdirectory and files?

a)

rm -a

b)

rm -rf

c)

rmdir

d)

rm

19.

use of CAT command

a)

allows you to create single

b)

multiple files, view contents of file

c)

redirect output in terminal or files

d)

All Of the Above

20.

chmod 744 ?

a)

The first number stands for the user who is associated with the file

b)

The second number is for the group associated with the file

c)

The third number is associated with everyone else who is not a part of the user or group

d)

All of these