Q91
Q91 In vi, which key allows you to switch from insert mode to command mode?
Esc
Ctrl
Shift
Alt
Q92
Q92 Which command saves changes and exits the vi editor?
:w
:q
:wq
:exit
Q93
Q93 What does the nano editor offer that vi does not by default?
Syntax highlighting
Easy undo
Line numbers
Graphical interface
Q94
Q94 In vi, which command deletes the current line?
dd
x
dl
:delete
Q95
Q95 How would you search for the word "example" in vi?
find example
/example
search example
example/
Q96
Q96 In nano, which shortcut is used to save the file?
Ctrl+X
Ctrl+S
Ctrl+O
Ctrl+Q
Q97
Q97 Which command is used to enter insert mode in vi?
Esc
Ctrl+I
i
Insert
Q98
Q98 A user can't exit nano after editing. What should they press to quit?
Esc
:q
Ctrl+X
Alt+Q
Q99
Q99 A user accidentally deletes a line in vi. Which command undoes this action?
Ctrl+U
Ctrl+Z
u
:u
Q100
Q100 After saving changes, a user can't see the updated content in nano. What might be the issue?
File was not saved
File permissions issue
Wrong file opened
Buffer not written
Q101
Q101 Which command in Unix is used to add a new user?
useradd
adduser
newuser
createuser
Q102
Q102 What is the purpose of the /etc/passwd file in Unix?
Stores user passwords
Contains user account details
Manages group policies
Lists directories
Q103
Q103 Which command is used to change a user’s password in Unix?
password
passwd
chpass
changepwd
Q104
Q104 What is the primary role of groups in Unix?
To manage disk usage
To organize users
To create user profiles
To run multiple programs
Q105
Q105 Which command allows you to modify an existing user’s attributes in Unix?
usermod
useradd
passwd
changeuser
Q106
Q106 How do you list all the groups a user belongs to in Unix?
groups username
listgroups username
usergroups username
group -l username
Q107
Q107 Which command adds a user to a group called developers?
adduser username developers
usermod -aG developers username
useradd developers username
groupadd username developers
Q108
Q108 How would you delete a user and their home directory in Unix?
deluser -h username
userdel -r username
rmuser username
removeuser username
Q109
Q109 A user cannot access a file despite having read permissions. What could be the issue?
User is in the wrong group
File permissions are wrong
File is deleted
File is corrupted
Q110
Q110 A user cannot change their own password due to "Permission denied." What could be the cause?
Incorrect password
No permission to change password
User account is disabled
Password file is locked
Q111
Q111 What does the $PATH environment variable do in Unix?
Sets user directory
Specifies terminal type
Lists directories for executable files
Changes file permissions
Q112
Q112 Which command displays all environment variables in Unix?
env
printenv
echo
export
Q113
Q113 What is the purpose of the $HOME variable in Unix?
Stores root directory
Specifies user’s home directory
Defines terminal size
Sets command history
Q114
Q114 What does the $USER variable represent in Unix?
User’s password
User’s home directory
Current username
Admin privileges
Q115
Q115 How do you make an environment variable available to child processes in Unix?
Use set command
Use export command
Use printenv command
Use chmod command
Q116
Q116 Which command displays the value of the variable $SHELL?
print $SHELL
echo $SHELL
env $SHELL
show $SHELL
Q117
Q117 How do you temporarily set the variable MY_VAR to "Hello" in the current session?
set MY_VAR="Hello"
export MY_VAR=Hello
MY_VAR=Hello
env MY_VAR=Hello
Q118
Q118 A script can't find a command in $PATH. What is a likely cause?
$PATH variable is missing
File permissions are restricted
Script syntax error
$USER variable is incorrect
Q119
Q119 A variable does not persist after logout. What is a likely solution to make it permanent?
Add it to .bash_profile
Use export command
Add it to $HOME
Add it to $USER
Q120
Q120 What does the df command display in Unix?
Disk usage
File system structure
Directory permissions
User groups