wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linux File Permissions / commands Basic Quiz

Total questions: 36

Worksheet time: 21mins

Name
Class
Date
1.

What does the 'w' permission allow a user to do in Linux?

a)

Modify the file

b)

Read the file

c)

Execute the file

d)

Delete the file

2.

Which group in Linux file permissions includes all other users on the system?

a)

Others (o)

b)

Owner (u)

c)

Group (g)

d)

Admin (a)

3.

What is the symbolic representation for write permission in Linux?

a)

w

b)

r

c)

x

d)

-

4.

Which permission allows a user to list a directory's contents in Linux?

a)

Read (r)

b)

Write (w)

c)

Execute (x)

d)

None

5.

What does the 'g' in Linux file permissions stand for?

a)

Group

b)

Global

c)

General

d)

Guest

6.

What is the symbolic representation for execute permission in Linux?

a)

x

b)

r

c)

w

d)

-

7.

In numeric (octal) representation, what value is assigned to the read permission?

a)

1

b)

2

c)

3

d)

4

8.

How is execute permission represented numerically?

a)

1

b)

2

c)

3

d)

4

9.

What is the numeric representation for r-x permissions for the group?

a)

4

b)

5

c)

6

d)

7

10.

What does the numeric value 4 represent in file permissions?

a)

Execute

b)

Write

c)

Read

d)

None

11.

What does the command "chmod 644 filename" do?

a)

Sets permissions to rw-r--r--

b)

Sets permissions to rwxr-xr-x

c)

Sets permissions to r-xr-xr-x

d)

Sets permissions to rwxrw-r--

12.

What does the "ls -l" command do?

a)

Lists files in a directory

b)

Changes file permissions

c)

Deletes files

d)

Copies files

13.

What is the effect of the command "chmod 755 /mydirectory"?

a)

Sets directory permissions to rwxr-xr-x

b)

Sets directory permissions to rw-r--r--

c)

Sets directory permissions to r-xr-xr-x

d)

Sets directory permissions to rwxrw-r--

14.

What is the numeric value for read-only permissions?

a)

1

b)

2

c)

3

d)

4

15.

What is the numeric value for write and execute permissions?

a)

1

b)

2

c)

3

d)

4

16.

Change permissions of a file in Linux

a)

chown

b)

chgrp

c)

chmod

d)

chperm

17.

What does the 'r' permission stand for in Linux file permissions?

a)

Rename

b)

Read

c)

Run

d)

Remove

18.

Which command is used to change file permissions in Linux?

a)

chown

b)

chmod

c)

chgrp

d)

chperm

19.

In the octal representation of permissions, what does the number '7' represent?

a)

Read and write

b)

Read, write, and execute

c)

Write and execute

d)

Execute only

20.

If a file has permissions set to 644, what permissions does the group have?

a)

Read and write

b)

Read only

c)

Write only

d)

Execute only

21.

How would you change the permissions of a file to allow the owner to read and write, the group to read, and others to have no permissions using chmod?

a)

chmod 640 filename

b)

chmod 750 filename

c)

chmod 644 filename

d)

chmod 600 filename

22.

Explain the significance of the three sets of permissions in Linux file systems.

a)

They determine the file size.

b)

They control who can read, write, or execute the file.

c)

They define the file type.

d)

They set the file's creation date.

23.

A file has permissions set to 755. What does this mean for the 'others' category?

a)

No permissions

b)

Read and execute

c)

Read, write, and execute

d)

Write and execute

24.

Why might a system administrator choose to set a directory's permissions to 700?

a)

To allow everyone to access the directory

b)

To restrict access to only the owner

c)

To allow group members to modify the directory

d)

To make the directory read-only for everyone

25.

Given a scenario where a file needs to be shared with a group but not modified, which permission setting would be most appropriate?

a)

777

b)

755

c)

644

d)

600

26.

How would you verify the current permissions of a file named 'document.txt'?

a)

ls -l document.txt

b)

chmod document.txt

c)

chown document.txt

d)

chgrp document.txt

27.

Which chmod command sets the "other" permissions on a file to read, write, and execute?

a)

A) chmod 776 file

b)

B) chmod 777 file

c)

C) chmod 775 file

d)

D) chmod 774 file

28.

Change permissions of a file in Linux

a)

chown

b)

chgrp

c)

chmod

d)

chperm

29.

What does the command su - do when executed in a terminal?

a)

A. Switches to the root user without changing the current directory.

b)

B. Switches to the root user and changes to the root user's home directory.

c)

C. Switches to the specified user without changing the current directory.

d)

D. Switches to the specified user and keeps the environment variables unchanged.

30.

Which chmod command sets the "other" permissions on a file to read, write, and execute?

a)

A) chmod 776 file

b)

B) chmod 777 file

c)

C) chmod 775 file

d)

D) chmod 774 file

31.

Change permissions of a file in Linux

a)

chown

b)

chgrp

c)

chmod

d)

chperm

32.

Fill in the command below to set the file to read only by the owner and the group students setup by Mr. Cusack.

chmod ??? happy.txt

(a)  

33.

Fill in the command below to set the file to have no permission.

chmod ??? happy.txt

(a)  

34.

Fill in the command below to set the file to write only by the owner of the file and read only for anyone else.

chmod ??? happy.txt

(a)  

35.

Fill in the command below to set the file to read, write, and execute only by the owner of the file.

chmod ??? happy.txt

(a)  

36.

Fill in the command below to set the file to execute only by the owner of the file.

chmod ??? happy.txt

(a)