WorksheetsLONG QUIZ FIRST YEAR SAM
Total questions: 40
Worksheet time: 20mins
Which command is used to set default file permissions?
chmod
umask
chgrp
passwd
Which of the following is NOT a reason for using text editors in Linux?
Writing scripts
Editing configuration files
Running compiled applications
Modifying text-based data files
Which command is used to change a user's password in Linux?
passwd
password
pwd
chpass
Which LibreOffice tool is used for creating presentations?
Math
Impress
Writer
Base
Which command in vi saves changes to a file?
:x
:w
:q
:save
Which text editor is designed for beginners in Linux?
vi
nano
emacs
gedit
Which Linux text editor is designed to run only in GUI mode?
nano
gedit
vim
emacs
What command in vi moves the cursor one page down?
Ctrl + f
Finds a word in the text
Moves the cursor one character to the right
Deletes a character
What does "rw-r--r--" signify in file permissions?
Only the owner can read and write; others can only read.
Everyone can read and write.
Only the owner can modify the file.
No one has access to the file.
Which file type symbol represents a symbolic link?
d
-
l
b
Which command allows you to change a file's ownership?
chmod
chown
umask
sudo
Which LibreOffice tool is used for creating mathematical formulas?
Writer
Impress
Draw
Math
Which command removes the read and write permissions for all users except the owner and group owner?
go=rw
o-rw
u+x
a=r
Which mode in the vi editor allows you to type text directly into the document?
Command mode
Insert mode
Replace mode
Edit mode
Which of the following is a spreadsheet application in LibreOffice?
Writer
Calc
Impress
Draw
Which command inserts a new line below the current line in vi editor?
O
o
A
I
What does the 'd0' command do in vi editor?
Deletes the entire file
Deletes the current line
Deletes from the cursor position to the beginning of the line
Deletes from the cursor position to the end of the file
What does the "id" command do in Linux?
Changes file permissions
Displays user identity
Deletes a user account
Copies a file
Which command is used to temporarily become the superuser in Linux?
sudo
su
chown
chmod
Which octal value represents full permissions for a file?
755
700
777
644
In LibreOffice Impress, which tool allows users to create 3D text images?
Fontworks
DataPilot
Presenter Console
AutoComplete
Alex wants to change the ownership of a file to another user named mike. What command should he use?
chmod mike file.txt
chown mike file.txt
chgrp mike file.txt
su mike file.txt
A user accidentally pressed 'i' in vi editor. What mode are they in?
Insert mode
Command mode
Replace mode
Visual mode
A student accidentally typed unwanted text in vi. How can they delete the previous character?
x
Ctrl + h
d0
Backspace
James is editing a long text file in vi and wants to move five lines down from the current position. What key sequence should he use?
5j
5k
Ctrl + f
Ctrl + d
A user wants to change ownership of a file named "report.txt" to user "nika". What command should they use?
chown nika report.txt
chmod nika report.txt
umask nika report.txt
chgrp nika report.txt
A Linux administrator wants to change the group ownership of a file to "admins". What command should they use?
chgrp admins filename
chown admins filename
umask admins filename
sudo admins filename
A user needs to allow group members to read and write a file, but not execute it. What command should you use?
chmod 774 filename
chmod 664 filename
chmod 755 filename
chmod 644 filename
An admin wants to make a file readable, writable, and executable by all users. Which command is appropriate?
chmod 777 filename
chmod 755 filename
chmod 700 filename
chmod 644 filename
A user wants to change a directory's permission to allow only the owner to access it. What command should they use?
chmod 700 dirname
chmod 755 dirname
chmod 644 dirname
chmod 777 dirname
A student needs to create a new file in vi. Which command should they use?
vi filename
:new filename
touch filename
:e filename
A user wants to append text to the end of a line in vi. Which command should they use?
A
a
O
o
A Linux administrator needs to switch to the root user temporarily. Which command should they use?
su
sudo
root
sudo su
A user wants to delete the entire line in vi. Which command should they use?
dd
d$
dG
d0
An admin wants to assign read, write, and execute permissions only to the file owner. Which command should they use?
chmod 700 filename
chmod 755 filename
chmod 644 filename
chmod 777 filename
A developer needs to grant a specific user (alice) both ownership and group ownership of a file called project.txt. Which command should they use?
chown alice:alice project.txt
chown 755 project.txt
chown alice project.txt
chgrp alice project.txt
An IT department is configuring a public-facing directory where all users should be able to read files but only the owner should modify them. What permission should be set?
chmod 777 directory
chmod 755 directory
chmod 700 directory
chmod 644 directory
A student wants to copy five lines in vi. What command should they use?
5yy
yy
5y
y5
An IT engineer wants to move the cursor five words forward in vi. What command should they use?
5w
5e
5b
Ctrl + f
A Linux admin wants to restrict a file so that only the owner can read and modify it. Which command should they use?
chmod 600 filename
chmod 644 filename
chmod 700 filename
chmod 755 filename
