WorksheetsLinux CLI (ChatGPT)
Total questions: 166
Worksheet time: 1hrs 23mins
Name
Class
Date
1.
What information does the first part of the prompt show you?
a)
Linux
b)
A prompt
c)
The user you are logged in as
d)
The terminal
2.
What do you use to navigate through the CLI?
a)
Linux
b)
A prompt
c)
Commands
d)
The terminal
3.
When you first open the terminal, what are you presented with?
a)
Linux
b)
A prompt
c)
Commands
d)
The terminal
4.
What is the command line interface also known as?
a)
Linux
b)
A prompt
c)
Commands
d)
The terminal
5.
What does the CLI provide to cyber professionals, developers, and system administrators?
a)
Speed and flexibility
b)
The user you are logged in as
c)
Commands
d)
The terminal
6.
What operating system is the CLI a core part of?
a)
Linux
b)
A prompt
c)
Commands
d)
The terminal
7.
What does CLI stand for?
a)
Computer Language Interface
b)
Command Line Interface
c)
Console Language Interface
d)
Computer Line Interaction
8.
When interacting with a CLI, how does a user input commands?
a)
Clicking on icons
b)
Typing text commands
c)
Using gestures
d)
Dragging and dropping
9.
Which component of the command prompt indicates the user's home directory?
a)
[username]
b)
@[computerName]
c)
:[path]
d)
[user]
10.
In a Linux command prompt, what does the $ character at the end indicate?
a)
Running as a standard user
b)
Running as an administrator
c)
Accessing the root directory
d)
System error
11.
What is the main advantage of using the CLI over GUI for cybersecurity professionals?
a)
More visually appealing
b)
Allows for multiple windows
c)
Tasks can be performed quickly and flexibly
d)
Requires less memory
12.
Why is a base understanding of the CLI crucial for up-and-coming cybersecurity professionals?
a)
It's a graphical alternative to the GUI
b)
It impresses existing or future employers
c)
It only applies to offensive teams
d)
It's slower than GUI interactions
13.
Which operating system is mentioned as having the CLI as a core part in the text?
a)
Mac OS
b)
Windows
c)
Linux
d)
Android
14.
What is the primary function of commands in the CLI?
a)
Change the system theme
b)
Navigate the terminal
c)
Decorate the user interface
d)
Play media files
15.
What may not immediately provide a visible response in the CLI?
a)
Opening a file
b)
Running a command
c)
Changing file permissions
d)
Creating a new folder
16.
Why are command line basics considered essential for cybersecurity professionals?
a)
They are less secure than GUI interactions
b)
They are only used for offensive tasks
c)
They allow quick and flexible task execution
d)
They are not relevant in cybersecurity
17.
What does the ls command stand for in the Linux CLI?
a)
List System
b)
List Directory
c)
List Files
d)
Load Software
18.
How would you execute the ls command to display all files, including hidden files, in a long list format?
a)
ls -h
b)
ls -la
c)
ls -l -a
d)
ls -al
19.
What does the -h or --help parameter provide when added to a command?
a)
Halt the command execution
b)
Hidden files display
c)
Human-readable output
d)
Help information
20.
How can multiple parameters be combined in a command, such as in ls -la?
a)
Separate each with a comma
b)
Use a plus sign (+)
c)
Chain them under a single hyphen
d)
Enclose them in parentheses
21.
What should you do if a command fails to run, and you need more information about its usage?
a)
Type -m for manual
b)
Run ls --info
c)
Use -i or --inspect
d)
Try -h or –help
22.
Which key is pressed to exit the manual pages when using the man command?
a)
M
b)
X
c)
Q
d)
E
23.
What does the command man [command] do in the Linux CLI?
a)
Opens a text editor for command editing
b)
Displays manual pages for the specified command
c)
Runs the command with default settings
d)
Creates a new command
24.
Which parameter should you use to list files in your current directory in a long list format without showing hidden files?
a)
ls -a
b)
ls -l
c)
ls -al
d)
ls -lh
25.
What is the purpose of chaining parameters in a command?
a)
Reduces command length
b)
Enhances command speed
c)
Avoids parameter conflicts
d)
Improves command readability
26.
What action should you take if you encounter difficulties understanding a command's error message?
a)
Retry the command with different parameters
b)
Use the -r or --retry parameter
c)
Read the manual pages using man [command]
d)
Ignore the error and proceed with the next command
27.
What command is used to print the contents of a file in the Linux terminal?
a)
cp
b)
mv
c)
cat
d)
ls
28.
To move to a directory called "my-folder" within your current directory, which command would you use?
a)
mv my-folder
b)
cd my-folder
c)
ls my-folder
d)
cp my-folder
29.
How can you navigate back to the parent directory in Linux?
a)
cd ..
b)
cd parent
c)
cd /parent
d)
cd ../
30.
What does the command "ls -la" do in the Linux terminal?
a)
Lists all files in the current directory, including hidden ones
b)
Lists only hidden files
c)
Lists all directories
d)
Lists files with detailed information
31.
To view the manual pages for a specific command in Linux, which command would you use?
a)
man [command]
b)
help [command]
c)
info [command]
d)
manual [command]
32.
Which command is used to print the current working directory in the Linux terminal?
a)
printwd
b)
currentdir
c)
pwd
d)
printdir
33.
What is the purpose of using two full-stops (..) with the "cd" command in Linux?
a)
Move to the root directory
b)
Move to the previous directory
c)
Move to the next directory
d)
Move to the home directory
34.
How can you quickly return to your previous directory using the "cd" command in Linux?
a)
cd /previous
b)
cd -
c)
cd --
d)
cd ..
35.
What does a hidden file or directory in Linux typically start with?
a)
!
b)
@
c)
.
d)
#
36.
In Linux, what does the "TAB" key help you do when working with the terminal?
a)
Create a new file
b)
Auto-complete file and folder names
c)
Delete a file
d)
Rename a file
37.
What command is used to create a new directory in Linux?
a)
touch
b)
cp
c)
mkdir
d)
mv
38.
How can you create an empty file using the Linux command line?
a)
cp
b)
touch
c)
mv
d)
rm
39.
Which command is used to move a file to the parent directory in Linux?
a)
cp
b)
mv ..
c)
mkdir
d)
touch
40.
What does the 'touch' command do if the specified file already exists?
a)
Deletes the file
b)
Renames the file
c)
Updates the last-modified-time
d)
Moves the file
41.
Which command is used to copy a file to create an exact duplicate while keeping the original file intact?
a)
mv
b)
rm
c)
cp
d)
mkdir
42.
How do you rename a file using the Linux command line?
a)
mv ..
b)
cp
c)
rm
d)
mv [oldname] [newname]
43.
What is the consequence of using the 'rm' command on a file in Linux?
a)
Moves the file to Trash
b)
Renames the file
c)
Permanently removes the file
d)
Copies the file
44.
How can you remove a directory and all of its contents in Linux?
a)
rm
b)
mv
c)
rmdir
d)
rm -r
45.
Which command is used to copy a file to a new location in Linux?
a)
cp
b)
rm
c)
mv
d)
touch
46.
What does the 'rm -r' command do in Linux?
a)
Renames a directory
b)
Removes a directory and its contents
c)
Moves a directory
d)
Creates a new directory
47.
What does the "d" character indicate in the file permissions output "drwxr-xr-x 1 linux linux 4096 Jun 1 11:23"?
a)
Data file
b)
Directory
c)
Document
d)
Download
48.
In the file permission "rw-r--r--," what permissions does the file owner have?
a)
Read and write
b)
Read only
c)
Write only
d)
Execute only
49.
What does the numerical representation 642 represent in file permissions?
a)
rw-r--r--
b)
rwx-wx-wx
c)
-rw-r---w-
d)
r--r-xr—
50.
How would you add execute permissions to a file using symbolic notation?
a)
chmod +e myfile
b)
chmod +x myfile
c)
chmod -e myfile
d)
chmod -x myfile
51.
To remove write permissions for a file named "example.txt," which command would you use?
a)
chmod -r example.txt
b)
chmod -w example.txt
c)
chmod +w example.txt
d)
chmod +r example.txt
52.
What does the SUID permission do in Linux file permissions?
a)
Forces the file to run as the user who started it
b)
Forces the file to run as the file owner
c)
Allows only the file owner to delete it
d)
Sets execute permission for everyone
53.
How is the SGID permission different from the SUID permission?
a)
SGID forces the file to run as the group owner; SUID forces the file to run as the file owner.
b)
SGID allows only the file owner to delete it; SUID sets execute permission for everyone.
c)
SGID sets execute permission for everyone; SUID forces the file to run as the file owner.
d)
SGID forces the file to run as the file owner; SUID forces the file to run as the group owner.
54.
What is the purpose of the StickyBit in file permissions?
a)
Forces the file to run as the user who started it
b)
Allows only the file owner to delete it
c)
Sets execute permission for everyone
d)
Inherit permissions from the parent directory
55.
How can you apply chmod recursively to all files in a directory and its subdirectories?
a)
chmod -R /path/to/directory
b)
chmod +R /path/to/directory
c)
chmod -R 755 /path/to/directory
d)
chmod +R 755 /path/to/directory
56.
In the command "chmod 421 myfile," what permissions are granted to the file owner?
a)
Read and write
b)
Read only
c)
Write only
d)
Execute only
57.
What command is used to create a new empty file in the Linux command line?
a)
make
b)
touch
c)
create
d)
new
58.
Which text editor is considered more user-friendly and provides shortcuts for basic functions like saving and quitting?
a)
Vi
b)
Emacs
c)
Nano
d)
Pico
59.
In Nano, what is the shortcut to quit the editor?
a)
CTRL+Q
b)
CTRL+Z
c)
CTRL+X
d)
CTRL+S
60.
What is the command to open a file using Nano?
a)
open [filename]
b)
edit [filename]
c)
nano [filename]
d)
touch [filename]
61.
Which text editor is an improved version of the Vi text editor and has more features?
a)
Nano
b)
Vim
c)
Emacs
d)
Pico
62.
In Vim, which mode allows you to move the cursor, cut, copy, and paste text, as well as save and quit the document?
a)
Insert mode
b)
Visual mode
c)
Command mode
d)
Replace mode
63.
How do you switch to Insert mode in Vim?
a)
Press ESC
b)
Press R
c)
Press V
d)
Press I
64.
Which mode in Vim allows you to select and manipulate blocks of text?
a)
Visual mode
b)
Select mode
c)
Replace mode
d)
Insert mode
65.
What is the command to open a file in Vim and display options, particularly helpful for editing large configuration files?
a)
vim -options [file]
b)
vim -h [file]
c)
vim +options [file]
d)
vim -help [file]
66.
In Vim, what key should be pressed to return to Command mode from any other mode?
a)
CTRL+X
b)
CTRL+Z
c)
ESC
d)
CTRL+S
67.
What does the wc command do by default?
a)
Counts only lines
b)
Counts lines, words, and characters
c)
Counts only words
d)
Counts only characters
68.
Which parameter is used to count only the number of words in a file using the wc command?
a)
-l
b)
-w
c)
-m
d)
--help
69.
What does the output of wc -l my_file.txt represent?
a)
Number of characters
b)
Number of lines
c)
Number of words
d)
Number of lines and words
70.
If you want to count the number of characters in a file using the wc command, which parameter should you use?
a)
-l
b)
-w
c)
-m
d)
--help
71.
How can you view all the available options for the wc command?
a)
wc -a
b)
wc --show
c)
wc --options
d)
wc --help
72.
What happens when you run the command wc my_text_file without any additional parameters?
a)
Counts only lines
b)
Displays an error
c)
Counts lines, words, and characters
d)
Counts only words
73.
If you want to count only the number of lines in a file using the wc command, which parameter should you use?
a)
-w
b)
-l
c)
-m
d)
--help
74.
Which command is used to count the number of lines, words, and characters in a file?
a)
wc -a [file]
b)
wc -l [file]
c)
wc -w [file]
d)
wc -m [file]
75.
What is the purpose of adding the -m parameter to the wc command?
a)
Counts lines
b)
Counts words
c)
Counts characters
d)
Displays help information
76.
If you only want to count the number of characters and words in a file, which command would you use?
a)
wc -w [file]
b)
wc -m [file]
c)
wc -l [file]
d)
wc -a [file]
77.
What is the purpose of the tr command in text manipulation?
a)
Search and replace specific string patterns
b)
Capitalize all instances of a name
c)
Convert lowercase characters to uppercase
d)
Remove character sets from a file
78.
How does tr perform replacement on a file's content?
a)
It waits for input from the command line
b)
It uses the less than (<) and greater than (>) characters for redirection
c)
It automatically detects the file and performs replacement
d)
It requires manual input for each replacement
79.
What does the command tr [:alnum:] [:alpha:] do?
a)
Converts lowercase characters to uppercase
b)
Removes all punctuation characters from a file
c)
Converts all letters and digits to letters only
d)
Converts all letters to uppercase
80.
Which character grouping in tr represents all digits (0–9)?
a)
[:alnum:]
b)
[:alpha:]
c)
[:digit:]
d)
[:punct:]
81.
How does sed differ from tr in text manipulation?
a)
sed converts lowercase characters to uppercase
b)
tr can search and replace specific string patterns
c)
sed only works with punctuation characters
d)
tr converts all instances of a character in the text
82.
In sed, what does the 'g' in 's/pattern_to_find/pattern_to_replace/g' stand for?
a)
Global
b)
Generate
c)
Group
d)
Gather
83.
When using sed, what does the command 'sed -d [:chars:]' do?
a)
Converts lowercase characters to uppercase
b)
Searches and replaces specific string patterns
c)
Removes a character set from a file
d)
Capitalizes all instances of a name
84.
What is the purpose of the '> filename' in the tr command 'tr [a] [b] < myfile.txt > newfile.txt'?
a)
Capitalizes all instances of a name
b)
Removes a character set from a file
c)
Converts lowercase characters to uppercase
d)
Saves the results to a file
85.
Which command would you use to replace all instances of the string 'alice' with 'Alice' in a file using sed?
a)
sed s/Alice/alice/g file.txt
b)
sed s/alice/Alice/g file.txt
c)
tr [a] [A] < file.txt
d)
sed s/alice/Alice/ file.txt
86.
What is the purpose of the sed command 'sed ‘s/pattern_to_find/pattern_to_replace/g’ filewitherror.txt'?
a)
Remove all instances of a character in the text
b)
Search and replace specific string patterns
c)
Convert lowercase characters to uppercase
d)
Replace lowercase 'a' characters with uppercase
87.
What is stdin in the context of Linux command line?
a)
'Normal' application output
b)
Data going into the terminal
c)
Error messages generated by the application
d)
None of the above
88.
How can you pass a file as input using stdin?
a)
tr [a] [b] > myfile
b)
tr [a] [b] << myfile
c)
tr [a] [b] < myfile
d)
tr [a] [b] & myfile
89.
What does stdout handle in Linux command line?
a)
'Normal' application output
b)
Data going into the terminal
c)
Error messages generated by the application
d)
None of the above
90.
How can you redirect the output of a command to a file, overwriting if the file already exists?
a)
ls > list
b)
ls >> list
c)
ls < list
d)
ls & list
91.
What file descriptor number is associated with Standard Input (stdin)?
a)
0
b)
1
c)
2
d)
3
92.
To redirect both stdout and stderr to different files, you would use:
a)
some-program 1> output.txt 2> error.txt
b)
some-program 1> output.txt & 2> error.txt
c)
some-program 1>> output.txt 2>> error.txt
d)
some-program 1&> output.txt 2&> error.txt
93.
What does the command "2>&1" mean in stream redirection?
a)
Redirect the standard output to the same location as the standard error
b)
Redirect the standard error to the same location as the standard output
c)
Redirect both stdout and stderr to the same file
d)
Ignore both stdout and stderr
94.
How do you append the output of a command to an existing file?
a)
ls > list
b)
ls >> list
c)
ls < list
d)
ls & list
95.
What file descriptor number is associated with Standard Output (stdout)?
a)
0
b)
1
c)
2
d)
3
96.
In the command "some-program 1> output-and-error.txt 2>&1", what does "2>&1" do?
a)
Redirect stdout to a file
b)
Redirect stderr to a file
c)
Redirect stderr to the same location as stdout
d)
Ignore stderr
97.
What does the sudo command stand for?
a)
Super User Directory Option
b)
Switch User and Override
c)
Super User Do
d)
Secure User Operations
98.
Where is the list of users allowed to run commands with sudo typically tracked?
a)
/etc/sudoers
b)
/etc/permissions
c)
/var/security
d)
/usr/superusers
99.
What is the purpose of the sudo -l command?
a)
List all users on the system
b)
List available commands with sudo
c)
Display system logs
d)
Switch to root user
100.
How can you check the permissions for a specific user, such as Alice, using sudo?
a)
sudo -p Alice
b)
sudo -u Alice -p
c)
sudo -l Alice
d)
sudo -u Alice -l
101.
Which command allows you to switch user privileges on the terminal?
a)
sudo -s
b)
su -u
c)
switchuser
d)
su
102.
What is the primary purpose of the su command?
a)
Switch user permissions without password prompt
b)
Execute superuser commands
c)
Run commands as another user with sudo
d)
Switch to the superuser account
103.
To run a command as a user other than root using sudo, what parameter is used?
a)
-user
b)
-runas
c)
-u
d)
-execute
104.
What does the sudo -u [username] [command] syntax allow you to do?
a)
Execute a command as the specified user
b)
Switch to the superuser account
c)
List available commands with sudo
d)
Check user permissions
105.
What happens if you attempt to run a sudo command without sufficient permissions?
a)
Command is executed with default permissions
b)
System prompts for root password
c)
Error message is displayed
d)
User is switched to root account
106.
How would you switch to the 'bob' user account using the su command?
a)
su -user bob
b)
su bob
c)
switch bob
d)
sudo -u bob
107.
How does SSH differ from Telnet?
a)
SSH provides secure data transfer over networks
b)
Telnet uses a better authentication system
c)
Telnet encrypts sessions for secure communication
d)
SSH is designed for faster data transfer
108.
What is the primary purpose of the -i parameter in the SSH command?
a)
Specify the IP address of the remote system
b)
Enable interactive mode for the connection
c)
Specify the private key for public-key authentication
d)
Set the username for the SSH connection
109.
Which authentication system is commonly used on SSH servers and involves entering a password?
a)
Public-key authentication
b)
Two-factor authentication
c)
Certificate-based authentication
d)
Password authentication
110.
In public-key authentication, what does the user need to have in order to access a remote system?
a)
Username and password
b)
Only a private key
c)
Both public and private key pair
d)
Only a public key
111.
What is SCP used for in the context of remote access?
a)
Running commands on a remote system
b)
Copying files between local and remote systems
c)
Authenticating users on a remote server
d)
Configuring secure network connections
112.
How is SCP related to SSH in terms of security?
a)
SCP uses a different encryption algorithm than SSH
b)
SCP provides less secure file transfer compared to SSH
c)
SCP uses the same level of encryption and security as SSH
d)
SCP doesn't support encryption during file transfer
113.
What is the basic syntax for copying a file from a remote system to a local system using SCP?
a)
scp /path/to/localfile user@system:/path/to/remotefile
b)
scp user@system:/path/to/remotefile /path/to/localfile
c)
scp -i /path/to/privatekeyfile user@system
d)
scp /path/to/remotefile user@system:/path/to/localfile
114.
How can you perform SCP with public-key authentication?
a)
Use a different SCP command for public-key authentication
b)
Include the -i parameter followed by the private key file
c)
Specify the public key in the SCP command
d)
SCP doesn't support public-key authentication
115.
Which command is used to connect to a remote system using public-key authentication?
a)
ssh -i /path/to/privatekeyfile user@system
b)
ssh user@system
c)
ssh -p 22 user@system
d)
ssh -k user@system
116.
What command is used to display the contents of a file in the Linux CLI?
a)
ls file_name
b)
read file_name
c)
display file_name
d)
cat file_name
117.
What is the basic syntax for searching a directory for a file with a specific name using the find command?
a)
find / -file [filename]
b)
find . -file [filename]
c)
find /[directory-to-search] -name [filename]
d)
find / -filename [filename]
118.
How can you search for a file with a partial match using the find command?
a)
find / -partial [filename]
b)
find . -match [filename]
c)
find /[directory-to-search] -partial [filename]
d)
find /[directory-to-search] -name ‘[word]*’
119.
Which flag is used with the find command to search for files or directories with particular permissions?
a)
-p
b)
-perm
c)
-permissions
d)
-findperm
120.
To find everything owned by a particular user in the root directory, what command would you use?
a)
find . -user [username]
b)
find / -owner [username]
c)
find / -user [username]
d)
find /[directory-to-search] -owner [username]
121.
How can you search for a file in the current directory using the find command?
a)
find . -search [filename]
b)
find /[directory-to-search] -find [filename]
c)
find / -name [filename]
d)
find ./ -name [filename]
122.
What is the purpose of the -name flag in the find command?
a)
Search by file name
b)
Search by file size
c)
Search by file permissions
d)
Search by file type
123.
Which command is used to search for everything with certain user permissions in a specific directory?
a)
find /[directory-to-search] -permissions [numerical value]
b)
find / -perm [numerical value]
c)
find ./ -permissions [numerical value]
d)
find /[directory-to-search] -perm [numerical value]
124.
To search for files that have a particular extension (pattern), which command would you use?
a)
find /[directory-to-search] -ext [extension]
b)
find / -pattern [extension]
c)
find / -type [extension]
d)
find /[directory-to-search] -name ‘*[extension]’
125.
What does the find command help you do when searching for empty files and directories?
a)
-empty flag
b)
-null flag
c)
-void flag
d)
-blank flag
126.
How can you search for a string within multiple files using the find command?
a)
find / -string [text]
b)
find . -text [text]
c)
find /[directory-to-search] -search [text]
d)
find /[directory-to-search] -exec grep [text] {} ;
127.
What is the primary purpose of the grep command in Linux CLI?
a)
Sorting data
b)
Searching for plaintext patterns
c)
Outputting to a new file
d)
Displaying file contents
128.
Which command is used to search for a specific word in multiple files simultaneously?
a)
find
b)
grep
c)
sort
d)
ls
129.
How can you redirect the output of the grep command to a new file?
a)
grep 'word' > [output-filename]
b)
grep > [output-filename] 'word'
c)
grep 'word' [filename] [output-filename]
d)
grep 'word' [filename] > [output-filename]
130.
What is the default sorting order of the sort command when used without any parameters?
a)
Descending order
b)
Random order
c)
Ascending order
d)
Alphanumeric order
131.
Which parameter is used with the sort command to reverse the order of sorting?
a)
-r
b)
-reverse
c)
-s
d)
-descend
132.
What does the command sort --help do in Linux CLI?
a)
Sorts the file in ascending order
b)
Displays help and available options for the sort command
c)
Sorts the file in descending order
d)
Prints the contents of the file to the command line
133.
Which command is used to search for a word in all files within a directory?
a)
grep 'word' *
b)
grep 'word' .
c)
find 'word'
d)
search 'word' *
134.
In the grep command, what is a regular expression used for?
a)
Sorting data
b)
Searching for plaintext patterns
c)
Outputting to a new file
d)
Displaying file contents
135.
What does the sort -r command do?
a)
Sorts the file in random order
b)
Reverses the order of sorting
c)
Sorts the file in ascending order
d)
Displays help and available options for the sort command
136.
How can you sort a file's contents alphabetically and output it to a new file using the sort command?
a)
sort [filename]
b)
sort [filename] > [output-filename]
c)
sort > [output-filename] [filename]
d)
sort [filename] [output-filename]
137.
What is the primary advantage of using Screen for running terminal sessions?
a)
It enhances graphical user interfaces.
b)
It allows multiple terminal sessions without the risk of losing progress.
c)
It provides advanced text formatting options.
d)
It speeds up internet connectivity.
138.
How can you view all available options when using the Screen tool?
a)
screen -s
b)
screen -options
c)
screen -h
d)
screen -view
139.
What command is used to list all currently active screens?
a)
screen -list
b)
screen -show
c)
screen -ls
d)
screen -status
140.
How do you create a new screen with a custom-defined name?
a)
screen -N [new-screen-name]
b)
screen -new [new-screen-name]
c)
screen -S [new-screen-name]
d)
screen -create [new-screen-name]
141.
How do you connect to an existing screen named "screen1"?
a)
screen -connect screen1
b)
screen -a screen1
c)
screen -r screen1
d)
screen -join screen1
142.
What keys do you press to detach from a screen?
a)
CTRL+A followed by CTRL+C
b)
CTRL+B followed by CTRL+D
c)
CTRL+A followed by CTRL+D
d)
CTRL+D followed by CTRL+A
143.
How do you completely kill a screen session?
a)
screen -kill [screen-name]
b)
CTRL+A followed by CTRL+X
c)
CTRL+A, K, Y (in sequence)
d)
screen -terminate [screen-name]
144.
What command is used to view all available options for Screen?
a)
screen -options
b)
screen -info
c)
screen -h
d)
screen -display
145.
What does detaching from a screen session do?
a)
Ends the screen session.
b)
Terminates the screen.
c)
Removes the user from using that screen without ending it.
d)
Pauses the screen session.
146.
How can you check if any screens are already running?
a)
screen -check
b)
screen -verify
c)
screen -ls
d)
screen -status
147.
What is hashing in digital terms?
a)
Two-way process
b)
One-way process
c)
Bi-directional process
d)
Non-directional process
148.
Which term is used to refer to the result of a hash function?
a)
Cipher
b)
Digest
c)
Key
d)
Code
149.
In hashing, the data is often represented as a unique combination of:
a)
Symbols and emojis
b)
Letters and numbers
c)
Colors and shapes
d)
Sounds and images
150.
What is the primary purpose of hashing in file verification?
a)
File compression
b)
Data encryption
c)
Integrity assurance
d)
File deletion
151.
Changing a single character in a file will result in:
a)
No change in hash
b)
Slight change in hash
c)
Drastic change in hash
d)
Bi-directional change in hash
152.
Which hash function produces a 256-bit hash value?
a)
SHA-1
b)
SHA-256
c)
MD5
d)
SHA-512
153.
How many characters are typically used to express the hash value of SHA-256?
a)
32
b)
40
c)
64
d)
128
154.
Which command is used for SHA1 hashing in the command line?
a)
sha1sum
b)
sha256sum
c)
md5sum
d)
hashsum
155.
To ensure file integrity, what can you do with hashing in the CLI?
a)
Generate random hashes
b)
Compare hash values
c)
Encrypt the file
d)
Change file permissions
156.
Which hash function produces a 128-bit hash value?
a)
SHA-1
b)
SHA-256
c)
MD5
d)
SHA-512
157.
What does the "&&" operator do in Linux command line?
a)
Executes the second command only if the first command has failed.
b)
Executes the second command only after the first command has been executed successfully.
c)
Executes both commands simultaneously.
d)
Sends the first command to the background
158.
When using the ";" operator in Linux command line, what happens to the commands following the semicolon?
a)
They execute only if the preceding command fails.
b)
They execute only if the preceding command is successful.
c)
They execute regardless of the success or failure of the preceding command.
d)
They execute in the background.
159.
What does the "|" operator do in Linux command line?
a)
Executes the command before the pipe operator.
b)
Sends the output of one command as the input to the next command.
c)
Executes both commands in parallel.
d)
Sorts the contents of a file.
160.
How does the "||" operator behave in Linux command line?
a)
Executes the second command only if the first command is successful.
b)
Executes the second command only if the first command fails.
c)
Executes both commands simultaneously.
d)
Sends the first command to the background.
161.
What does the "&" operator do when used in Linux command line?
a)
Sends the command to the background and waits for its completion.
b)
Executes both commands simultaneously.
c)
Executes the command in the background while running the second command in the foreground.
d)
Sends the command to the background and terminates it.
162.
Which command is used to search for a particular word in a file?
a)
find
b)
locate
c)
grep
d)
search
163.
What does the command "sort -r [filename]" do in Linux?
a)
Sorts the file contents into alphabetical order.
b)
Sorts the file contents in reverse order.
c)
Outputs the sorted file contents to a new file.
d)
Generates the MD5 hash of a file.
164.
How is the output of the "grep 'word' [filename] > [output-filename]" command used?
a)
It prints the output to the terminal.
b)
It overwrites the original file with the search results.
c)
It creates a new file with the search results.
d)
It appends the search results to the original file.
165.
What is the purpose of the command "md5sum [filename]" in Linux?
a)
Counts the number of lines in a file.
b)
Generates or checks the MD5 hash of a file.
c)
Searches for a word in a file.
d)
Sorts the contents of a file.
166.
How do you execute a command in the background in Linux?
a)
Using the ">" operator.
b)
Using the "&" operator.
c)
Using the ";" operator.
d)
Using the "||" operator.
100 %
