Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linux Commands

Total questions: 15

Worksheet time: 5mins

Name
Class
Date
1.
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
2.
Which command shows all the files, including hidden files?
a)
Is -a
b)
Is -l
c)
Is -all
d)
Is -h
3.
Arrange the commands in the following order: Switch to root, Add user, Remove user, Create a new group.
a)
sudo deluser [user] -> sudo adduser [user] -> sudo groupadd [group] -> sudo su
b)
sudo su -> sudo deluser [user] -> sudo adduser [user] -> sudo groupadd [group]
c)
sudo su -> sudo adduser [user] -> sudo deluser [user] -> sudo groupadd [group]
d)
sudo groupadd -> [group] sudo su -> sudo deluser [user] -> sudo adduser [user]
4.
What is the command to change file permissions in Linux?
a)
chown
b)
chmod
c)
cmod
d)
cp
5.
How do you add execute permission for owner and group in a file?
a)

chmod 110 filename

b)

chmod 767 filename

c)

chmod 700 filename

d)

chmod 666 filename

6.
What is the permission code for read and execute permission for owner, read permission for group, and no permission for others?
a)
757
b)
777
c)
720
d)
750
7.
What is the permission code for read, write, and execute permission for owner, no permission for group, and no permission for others?
a)
666
b)
777
c)
700
d)
600
8.
How do you remove all permissions for others in a file?
a)
chmod 770 filename
b)
chmod 111 filename
c)
chmod 001 filename
d)
chmod 707 filename
9.
What is the name of a Linux command used for renaming files and directories?
a)
mv
b)
rm
c)
ls
d)
rename
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.
what is the Linux command segment used to append data to the "s.txt" file ?
a)
cat >> s.txt
b)
cat > s.txt
c)
cat >>> s.txt
d)
add > s.txt
12.
What is the name of a Linux command used for count the number of lines in a file ?
a)
count -l a.txt
b)
wc -w a.txt
c)
wc a.txt
d)
wc -l a.txt
13.
Which Command Shows Permissions in Files
a)
ls -h
b)
ls -r
c)
ls -l
d)
ls -a
14.
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
15.
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