Linux

To display a current working directory
Cd
Pwd
Cwd
Pd
What does cd~ do? Select one correct answer from the following
Brings you to your previous directory of the current directory
Brings you to the parent directory
Brings you to your home directory
Brings you to the systems root directory
One of the following commands will allow you to list the hidden files in Linux
Ls -a
Ls -al
Ls -h
What are the two ways you can view the file from the following options
Less
View
Show
Cat
Identify the 2 editors from the following options
Nano
Vim
Getdit
Gedit
Which command will find the file in the current directory and sub directories
Find /home -name <*.jpg>
Find /home/documents/usr - name *.jpg
Find /home/mydocuments-name *.jpg
What is the symbol for appendng a text or a command output to the last line of the file
#!
>>
$
<<
Man db is to
Update the kernel system
Is to install desktop with GUI
Update the search commands or function
Grep command is used to apply a filter. True or false?
True
False
What is the short cut key used to cancel a running command or a process in your Linux terminal
Ctrl + d
Ctrl + alt + del
Ctrl + c
Ctrl + e
To view the users logged in to your system and their processes
Whoami
Who
W
Rename a file in terminal. Select the correct answer
Rn
Rm
Mv
Rn
Used for version control system and for tracking changes in source code during software development. Select one answer from the following
Get
Git
Cron
Bash
How to create a file in terminal. Select any3 ways to do
>> new file
Cat> new file
More new file
Touch new file
Echo new file
Linux permission, o refers to owner
True
False
To change file permission
Changemod
Chmod
Chper
Changeowner
To display the hardware platform in Linux terminal
$Linux -v
$os -r
$uname -i
$uname -r
There is only one bashrc file for an operating system in Linux. True of false?
True
False
#mv dir1/* dir2
Will move dir1 to dir2
Will move the contents of the source dir1 to target dir2
Will move dir2 to dir1
In Linux hidden files are preceded with period symbol. True or false?
True
False
Initrd in Linux used to create one of the following
To create a Linux OS in another machine
Is a temporary root file system used in mounting
Which of the following command display information about the system Ethernet device
Lsmod
Lsusb
Lsdevis
None of these are correct
Which partition table allows you to have the largest number of primary partitions
Master boot record
GUID partition table
Logical partition
Primary partition
Identify 2 of the Linux shell environments
Kornshell
VC shell
Bourneshell
Getshell
A bash comment start with what character?
"
!
#
-
Used to store hashed version of password in Linux
Etc /passwd file
Etc/ shadow file
Etc/hashed file
Linux command follows one of the following syntax. Select the correct one
Command [arguments] options
Command [options] arguments
Command [options]
Set expiration date for users using one of the following commands
Useradd -e 2020/12/31
Useradd -D 2020/12/31
Useradd -d 2020/12/31
What will happen if you use the command Export HISTSIZE=5
You can only see the recent 5KB O/S data
You can only see the recent 5 commands using UP arrow key
You can only see the recent 5 reboot of your system
The last command in Linux is to
Displays last 10 lines of the file
Displays history of user login/logout
List history of previously executed commands in the session
Which of the following commands display memory usage of local machine
Free
Lostat
Vmstat
Netat
Select any two Linux utility that are used to configure systems networking information
Nmcli
Nmpcp
Telnet
Dishnet
Basic configuration files are stored at ____ directory?
/bin
/dev
/boot
/etc
/lib
Wc -l command in Linux is used to
Count words in a file
Count lines in a file
Count characters in a file
Count words, lines and characters in a file
Umount command in Linux is used to
Umount mounts in the file system
Umount overwrites your files
Umount umounts the file system
To list the files and directories that start with the character "s"
Ls | grep s
Ls | grep s$
Ls | grep ^s
What could be the output of the command cat setup.txt install.txt > update.txt
Install the setup file and update as well
Copy the contents of setups.txt and install.txt and create update.txt
Remove setup.txt and install.txt and create update.txt
Head command displays the first 10 lines of a file. True or false?
True
False
Wc command in Linux is used to
Count words in a file
Count lines in a file
Count characters in a file
Count words, lines and characters in a file
Linux command to view the scheduled job in terminal. Select one answer
Abq
Atq
Afq
Select the command to change the ownership of a file to a new user
Touch filename.txt
Chmod user filename.txt
Chown user filename.txt
Cat filename.txt
Which command will list all alias?
Alias
Display alias
View alias
Which syntax will add alias in configuration file
Cc alias -'shutdown now'
Alias cc ='shutdown now'
Cc 'shutdown now' alias
Command which helps us with few keywords if we forget the exact command
Search
Apropos
Find
Grep
Which utility is used to edit sudoers file
Git
Apropos
Visudo
Sudo
What information is normally entered into the edge comment field with the usermod -c
The users schedule
A messaged to the user
The users first and last name
The users password
What 2 commands are used to create a new user and set the password in centos
Useradd
Set password
User-password
Createuser
User-passwd
Passwd
What are the 3 special permissions?
SID
SUID
GUID
SGID
Sticky bit
Which command is used to set or unset immutable attribute on a file in Linux
Attribute
Immutable
Lsattr
Chattr
Who can delete a file with the immutable flag set?
Any user with execute permissions
Only root and the owner
No one
Only root
What are the 2 commands to set access control list
Aclset
Getacl
Setfacl
Jitacl
Getfacl
Viewacl
Select the difference between hard link and soft link?
Soft links for any file can be created with command line
Even if the original file is removed the soft link file will not be affected
Hard link and soft link both will have different permissions
If you delete the original file, the soft link has no value
Select the 2 package managers from the list of options
GVM
DNG
DNF
YUM
What is the effect of using 'i' option in grep command?
It ignores the string of characters that follow the option
It enforces case sensitivity
It causes grep to ignore case
It issues grep as a command
What is the effect of using -f option with rm command
It deleted everything but the following specified file
It forces the deletion without confirming each file
It deletes the folder and all its contents
It tests or fakes the deletion attmept
How does the diff command help compare the contents of the 30 days.txt and 60 days.txt file in the exercise
The diff command sets attribute to differentiate the two files
The diff command displays the differences between the two files
The diff command sets the version number on the two files
What vim mode is used to enter text into the file?
Write mode
Edit mode
Insert mode
Execute mode
Command mode
What is the user of tar command in Linux select 2 answers
Extract the archive file
Used to check the version of a file
Creates a compressed tarball
It allows you to install and update packages
Why is it often necessary to know the PID of a process?
The PID is related to resource consumption
Many tools use the PID to manage processes
Processes do not have recognizable names
Processes do not have names at all
What is the difference between the 'sleep' command and the 'sleep&' command?
The "sleep &' command is started at a lower priority than the 'sleep' command
The 'sleep' command is started at a lower priority than the 'sleep&' command
The two commands are the same
'sleep' is place in the background, 'sleep&' is placed in the foreground
'sleep' is placed in the foreground, 'sleep&' is placed in the background
Which of the following commands is used to change the nice value of a running process?
Nice
Lsof
Renice
Ps
Which of the following best describes the difference between rsyslog facility and severity?
Facility is the level of importance, severity is the service
Facility defines whether the log is forwarded, severity defines where it is forwarded to
Severity defines whether the log is forwarded, facility defines where it is forwarded to
Facility is the service, severity is the level of importance
What command generates test messages for rsyslog?
Rsyslog-test
Log-test
Test-log
Logger
Which of the following is the path to the Apache configuration file?
/etc/conf/httpd/httpd.conf
/var/html/www
/var/www/html
/etc/apache/apache.conf
Which of the following is the path to the index.html file?
/etc/conf/httpd/httpd.conf
/var/html/www
/etc/apache/apache.conf
/var/www/html
What is the purpose of the '-c 6' option with the 'ping' command?
Ping will only use IPv6
Ping will only pass through 5 routers
Ping will send 6 requests
Ping will send requests to 6 different hosts on the subnet
Which of the following best describes the difference between MAC addresses and IP addresses, as seen in the first activity?
MAC addresses are assigned to the sending system, IP addresses are assigned to the receiving computer
MAC addresses and IP addresses are the same thing
MAC addresses are the network interface's physical address, IP addresses are the network interface's logical addresses
IP addresses are the network interface's physical addresses, MAC addresses are the network interface's logical address
Why might a user prefer the nmtui interface over the nmcli interface?
The nmtui command has many options the nmcli does not have
The mntui interface may be simpler to use and understand
The nmcli interface may not always be installed
Which of the following best explain the benefits of SSH key-based authentication? (choose 2)
Automation, as scripting commands are run immediately
Quicker, as there is less network traffic
Quicker, as name resolution is simpler
Automation, as tools such as Ansible authenticate automatically with keys
Convenience, as password challenges disappear
Which of the following best represents a benefit of using the rsync utility
It relies only on IPv6
It only transfers changed, resulting in less network traffic
It automatically encrypts files
It automatically uses tar to bundle files
Which file must be edited to prevent root user authentication over SSH?
/boot/ssh/sshd_config
/var/ssh/sshd_config
/etc/ssh/sshd_config
/etc/sshd/ssh_config
What kind of utility is tcpdump
A command-line tool used to capture network traffic
A graphical interface for managing network settings
An email client
A file compression utility
What is the tcpdump switch used to open a capture file in read mode?
-read
-w
-o
-r
What is the tcpdump switch used to output captured data to a file
-i
-w
-write
-vv
Why could you read the web page content of the HTTP packet capture?
HTTP is encrypted
HTTP is not encrypted
HTTPS is not encrypted
SSH is not encrypted
What web protocol could you use to prevent captured packets from being read?
SSH
HTTP
SSL
HTTPS
FTP
Which of the following best represents a potential benefit of tcpdump over Wireshark?
Tcpdump is always installed on all Linux distributions.
Tcpdump requires a GUI, making it easier to use.
Tcpdump is command-line only, which is useful on servers with no GUI.
What are the two primary aspects of system hardening? (Choose 2)
Delete the root user account.
Review hardware.
Remove what the system doesn't need.
Update system software and configurations.
Stop the sshd daemon.
Why did you need to restart the sshd daemon in the activity above?
You restarted the system and the sshd daemon was not enabled.
Services and daemons must be restarted after a change to their configuration files.
You installed an updated version of SSH.
Editing a configuration file automatically stops a service or daemon.
Which of the following best describes the function of the umask setting?
It sets the default services and daemons for the system.
It configures user access to the system.
It starts the hardening wizard.
It sets default permissions on new files and directories.
How many characters long is the MD5 hash algorithm?
256 characters
40 characters
128 bits
32 hexadecimal digits
Why might checking the integrity of files help secure files? (Select two)
Helps mitigate man-in-the-middle attacks.
Compresses files to consume less drive space.
Scans files for unauthorized changes.
Compresses files for quicker downloads.
Helps identify corrupted files.
How does hashing help with file version control?
Tags the files with version IDs (VIDs).
Lists the differences between two files.
Identifies whether two copies of a file are identical.
Identifies the date of the most recent changes.
Can hashing identify differences in files?
Yes, a hash displays differences.
No, a hash does not display differences.
Undetermined.
How many characters long is the SHA1 hash algorithm
128 characters
40 hexadecimal digits
32 characters
160 bits
Why did the SELinux status reset after using the 'setenforce 1' command and a reboot?
The 'setenforce 0' command is required for persistency.
The SELinux status is part of the Linux kernel and immutable.
The 'setenforce' command is not persistent across reboots.
The SELinux status would have been kept with a graceful shutdown.
How did you make the SELinux status persistent across reboots?
The '0' value makes 'setenforce' persistent.
The '1' value makes 'setenforce' persistent.
Recompiled the Linux kernel.
Edited the /etc/selinux/config file.
{"name":"Linux", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"To display a current working directory, what does cd~ do? select one correct answer from the following, One of the following commands will allow you to list the hidden files in Linux","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Make your own Survey
- it's free to start.