linux final quizzes

Ace your homework & exams now with Quizwiz!

Which of the following can be used for comparing values within an if statement? (Choose two.)

-lt =

Which of the following entries could be added to the rsyslog.conf configuration file to have all syslog messages displayed to console 10?

./dev/tty10

What is the complete path and filename of the file where ports and their associated protocols are defined?

/etc/services

Which of the following is a valid APIPA address?

169.254.38.101

Which of the following represents stderr at the command line when used for redirection?

2

The output of the ifconfig shows a HWaddr expressed in hexadecimal. How many bits is the hardware address shown made up of?

48

Which of the following ports would be used to resolve a domain name to an IP address?

53

Which of the following commands can be used to create a BASH variable named CREATOR with the value of Torvalds?

CREATOR="Torvalds"

Violet wants to configure an encrypted partition to mount when her workstation boots up. Which of the following should she do?

Configure /etc/crypttab to open the volume and then /etc/fstab to mount it.

In which of the following zones might a system administrator put the web server hosting the company's publicly accessible website?

DMZ

Which of the following are examples of multifactor authentication?

Password and fingerprint reader

You have set up a TFTP server to support PXE booting of several workstations. Which of the following protocols would this setup make use of?

UDP

When looking at the password-auth file on a Fedora system, you notice part of the syntax that says dcredit=3. What is the significance of this part of the configuration?

Users must use at least 3 characters as numbers in their passwords.

Which of the following can be used to graphically remotely administer a Linux machine?

VCN

Which of the following is the common escape sequence to display a horizontal tab using the echo command

\t

Which of the following commands can be used to install the latest versions of all packages currently installed on the system from the sources configured in sources.list?

apt upgrade

A system administrator wants to schedule a task to run at 11 pm, but knows that she will not be in the office at that time. Which of the following commands can she use to schedule this task to run that night while she is at home?

at

Which of the following commands can be used to back up files in case of system failure, supports long filenames, and can also back up device files?

cpio

Which of the following file extensions are used by the Debian Package Manager?

deb

Emily accidentally created a new user account on the wrong server. Which of the following commands could she use to delete the account she created? (Choose all that apply.)

deluser userdel

Which of the following is the log file where Dandified YUM writes its log entries?

dnf.rpm.log

Which of the following commands can be used to view the quota for a user?

edquota -u jsmith

You have started a job running in the background that you want to now bring to the front so that you can watch it execute. Which of the following commands can be used to display the job's output to the terminal?

fg

You run the command hostname server1 and issue the reboot command. You notice that the host name has reverted back to what it was before the reboot. Which of the following commands should you have used to change the host name instead?

hostnamectl

Which of the following constructs can be used in a shell script to determine whether two values are equal and if so run another set of commands?

if

You want to determine whether your Linux workstation was able to get assigned an IP address from the DHCP server once you connected it to the network. Which of the following legacy commands might help you determine this?

ifconfig eth0

Which of the following commands can you use to view events within the journald database?

journalctl

Which of the following commands will list missing libraries as not found if a necessary library is not installed?

lld

Which of the following commands can you use to send a print job to printer1? (Choose all that apply.)

lp -d Printer1 file lp file

Which of the following commands will display the print jobs in the print queue for printer1 only?

lpstat -o

Which of the following commands can be used to see files that are currently being used by a specific process ID (PID)?

lsof

Which of the following can be used preceding a command to prevent a process from terminating when the parent process terminates?

nohup

Which of the following commands can be used to determine the round trip time that a packet takes to traverse a network connection?

ping

While the top command is running, what key can be pressed to change the nice value of a process?

r

Which of the following commands will display the contents of the /etc/passwd file in alphanumerical order?

sort /etc/passwd

Which of the following commands will display the exit status of the last command used in the BASH shell?

$?

Which of the following commands will generate a GPG public/private key pair?

--gen-key

Which of the following commands will show active UDP connections on a Linux system? (Choose all that apply.)

--udp -u

Which of the following options for the gpg command will attempt to use the gpg agent and if it cannot will ask for a passphrase?

--use-agent

Which of the following options can be used with the usermod command to change the description of the user account that is stored in the GECOS field?

-c

What option can be used with the ps command to display an entire list of processes across all Terminals, including daemons?

-e

When using the compress command to archive a set of files into a single file, which of the following options will display the compression ratio of the individual files making up the new compressed file?

-v

Upon running the ifconfig command, the IP address is listed along with the subnet mask in dotted decimal notation listed as 255.255.255.224. You have installed a remote access software that has an address field that requires the address to be configured in CIDR notation. Which of the following is the equivalent CIDR notation for the subnet mask listed?

/27

Which of the following files does the hostnamectl command modify to set the hostname on a machine?

/etc/hostname

Which of the following files contains the list of shared libraries?

/etc/ld/so.cache

If someone tries to log into a system using a daemon account, but the daemon account does not have a valid shell assigned to it, they would normally see a standard warning. If you want to customize the error, which of the following files can you put a message in that will display upon an attempted login?

/etc/nologin.txt

You currently have a Linux system configured to check the /etc/hosts file before trying to contact a DNS server to resolve host names. You want to reverse the configuration so that it checks with a DNS server before falling back to the /etc/hosts file. Which of the following files should you modify to make this possible? Answer Feedback:Incorrect. The /etc/hosts file contains local mappings for names to IP addresses, but does not specify in which order the system should use different methods of resolving names to IPs

/etc/nsswitch.conf

In which of the following directories can you place files that will be copied to new user directories when new users are created?

/etc/skel

Where does the sudo command check to determine a user's privileges when they attempt to run the sudo command?

/etc/sudoers

What is the path to where the journald.conf file is located?

/etc/systemd

Which of the following files stores information about failed logins on a Linux system?

/var/log/btmp

Which of the following ports should you disable so that they no longer respond to network requests on a Linux system due to a lack of encryption? (Choose all that apply.)

21 23

Which of the following results from the nmap command would let an administrator know that they have an insecure service running on a Linux server?

23/tcp open telnet

Which of the following does the -r option for the gpg command specify?

Encrypt for the user id given

Which kill signal terminates a process by taking the process information in memory and saving it to a file called core on the hard disk in the current working directory?

SIGQUIT

A system administrator wants to allow most users to be able to run cron jobs, but wants to specifically prevent a couple of users from doing so. Which of the following files could the administrator edit to disallow these users from creating cron jobs?

The users that should not be able to run cron jobs should be configured in the /etc/cron.deny file.

Which of the following commands will send the output of the cat command to the grep command to be filtered?

cat /etc/passwd | grep jsmith

Which of the following commands can be used to pause a printer named Printer1?

cupsdisable Printer1

Which of the following are valid statements in the /etc/resolv.conf file? (Choose two.)

domain nameserver

What option can be added to the dpkg command to remove a specified package from the system, including any configuration files used by the package?

dpkg -P

Which of the following commands can be used to modify configuration options for DPM packages after they have been installed?

dpkg-reconfigre

Which of the following is the log file where the Debian Package Manager writes entries for actions taken and packages installed?

dpkg.log

Which of the following commands will display detailed information for network hardware?

ethtool

Which of the following commands can you use to list users who have been locked out by pam_faillock.so?

faillock

Which of the following is the keyword that should be listed after the hosts statement in the /etc/nsswitch.conf file so that the system will consult the /etc/hosts file to resolve a name to an IP address?

files

If you suspect that you have bad blocks on a filesystem, which of the following commands can be used to try and repair the filesystem?

fsck

Which of the following will display entries from the Name Service Switch libraries?

getent /etc/nsswitch.conf

Which of the following commands should you use to specify that you want to use Git for version tracking on them?

git add

Which command can be used to download an updated copy of the master branch from the original Git repository

git pull origin master

Which of the following will look at the /etc/passwd file for any lines containing the word root and display them out to the screen while simultaneously writing the results to a file?

grep root /etc/passwd | tee ~/root.txt

Which of the following commands can be used to remove a group from a Linux system? (Choose all that apply.)

groupdel delgroup

Which of the following commands can a user run to display the groups that they are a member of?

groups

Which of the following commands will send a process's resources to /dev/null to kill the process for process ID 1357?

kill -9 1357

When connecting to a host via SSH for the first time, the user is prompted to accept the encryption fingerprint for the target computer which is stored in ___________ in the ~/.ssh/ directory.

known_hosts

What command looks for a Makefile and uses the information within it to compile the source code into binary programs using the appropriate compiler program for the local hardware architecture?

make

On a system running NetworkManager, which of the following commands can be used to view or modify connection information?

nmcil

Which of the following commands will send 4 ICMP echo requests to a remote host named server1 to determine the round trip time it takes a packet to travel?

ping -c

What command is used to display the lineage of a process by tracing its PPIDs until the init daemon?

pstree

Which of the following can be included in a shell script to ask the user to type in a password and then store it in the variable named $password?

read -s -p "Please enter the password: " password

Levi wants to run 5 commands sequentially, but does not want to create a shell script. He knows that each command is going to take approximately 20 minutes to run individually. However, he would like to go to lunch 15 minutes from now. He knows that he can type all of the commands on the same line and separate them with a certain character to run them sequentially. Which character can he type after each command to have them run one after the next without requiring further input from him?

semi colon

Which of the following commands will allow the root user to switch to another user account without having to enter that user account's password?

su

If a system appears to be having issues with performance for read and write operations to a hard disk, which of the following is not a valid scheduling method that you could try to improve performance?

testwr

Which of the following commands can be used to trace an IPv6 route? (Choose two.)

traceroute6 tracepath6

Which of the following commands can be used to force udev to reload new rules from the /etc/udev/rules directory? (Choose all that apply.)

udevadm control -R udevadm control --reload

How many times will the following loop execute as part of a script: #!/bin/bash COUNTER=0 while [ $COUNTER -lt 7 ] do echo "hello world" done

until ctrl-c is used to terminate it

Which of the following commands can be used to delete a user account?

userdel

Which of the following types of technologies will create a tunneled encrypted connection from a remote location into a corporate network to be able to access resources as if the user was physically connected to the LAN?

vpn

Which of the following commands will count the number of lines in a file named data.csv?

wc -l data.csv

Which of the following can be used at the command line to download a file using the HTTP protocol? (Choose two.)

wget curl

Which of the following is a special group that provides its members with the ability to run the su and sudo commands?

wheel

Which of the following can you use to start network daemons in order to limit which computers are allowed to connect to the network service?

wrapper


Related study sets

Congestive Heart Failure Summary

View Set

AP Language and Composition Mock Exam 2

View Set

World History Practice Questions

View Set

Accounting 202 Final Exam (Quiz Multiple Choice)

View Set