Linux Exam B

Ace your homework & exams now with Quizwiz!

When connecting to a VNC server, which of the following ports should be used through the web browser client method?

5800

When running a script, you want it to always run in a particular shell, regardless of what shell the user is currently executing the script from. Which of the following lines would set your script to always be run by the bash shell?

#!/bin/bash

When running the which command, what is the primary in-memory source of information consulted for the output?

$PATH

As you are about to execute a command that will take a while to finish, you are asked to look for a file on the filesystem. What can you add to your command-line to allow you to have almost immediate access to the shell prompt after you hit Enter?

&

When specifying what elements in a directory will be affected by a shell script construct, what is the most appropriate character to use to indicate all elements should be acted on?

*

What option to the useradd command causes the user's home directory to be created during the user creation process?

-m

The venerable and inspirational Slackware distribution uses which of the following package formats?

.tgz

Your system's kernel and other startup files are located in which directory?

/boot

Which specification is used for both SCSI devices and USB storage devices?

/dev/sd*

AppArmor profiles are stored and read from which of the following directories?

/etc/apparmor.d

Your system attempts to resolve the remote computer named "snowblower", but times out with no resolution possible. Which of the following files should you check first for an incorrect resolution of the name?

/etc/hosts

On a SystemV-based server, what do the links in S## and K## scripts in the runlevel directories point to?

/etc/init.d

When configuring the modprobe command's behavior, which individual file can be used?

/etc/modprobe.conf

After setting up a local name resolution server and removing all static name resolution entries from the server, which file should you alter to properly configure the name resolution order?

/etc/nsswitch.conf

Which configuration file/directory holds the system mapping of daemons to access ports?

/etc/services

When a new user account is created, which of the following directories is copied and named accordingly to form the new user's home directory?

/etc/skel

You have a secure server that you want to ensure users must sign in with their own login first, before accessing privilege elevation options. What file and configuration option will you use to implement this security measure for all users?

/etc/sshd_config, PermitRootLogin no

What is the major source of information that is displayed by the ps, top, and pstree commands when executed?

/proc

Modules for the kernel are kept in what directory structure?

/usr/lib/modules

Timezone information in traditional Linux systems is kept in the file /etc/localtime. On modern Linux systems, this file is kept in which of the following folder?

/usr/share/zoneinfo

While using a custom-compiled kernel, which of the following is the most likely log file to watch for any troubleshooting messages?

/var/log/kern.log

On older Linux systems, or those still using System V init services, what is the main log file typically named?

/var/log/messages

You are looking for a record of the users who have successfully signed in, those who have had unsuccessful logins and indications of any authentication issues. Which of the following log files is most likely to contain two or more of these types of information?

/var/log/secure

Because of regulations and rules about 3rd party software running on your organization's infrastructure, you cannot use local helper applications to extract needed monitoring information, only installed and normally running services. What would using ssh connections and localized commands to export information from these systems be referred to as?

Agentless monitoring

While signed in as a user in a GUI environment, you desire to go from the GUI session to a text console, /dev/tty2. Which keystrokes would you use? Choose the best answer.

Ctrl+Alt+F2

Your environment contains several functions, which depend on the presence of a particular type of variable to run. This variable type is available to all the functions in your shell environment. What best describes the type of the variable being referred to?

Global

You need to use a server application to store data in records and to allow for sorting, ordering, and retrieval of those records. Which of the following best describes this server application?

Database

As a busy Apache application services manager, you need to automate the detection of entries in your access logs that indicate users that are likely bots, trying to sign in inappropriately or attempting to exploit your system. What utility would you likely use on your Apache error logs to accomplish this most efficiently?

Fail2ban

You are constructing a set of definitions of your cloud-based infrastructure and have placed those definitions in files in github. What is the process of using machine-readable definition files to construct a computing environment such as you are doing commonly known as?

IaC

Your infrastructure automation mechanism keeps track of all instances that are managed as a part of your infrastructure in a database. The entries or pieces of information being tracked are commonly known as what?

Inventory

Users report that they cannot use cd into a subdirectory to access some information. What might be true about the directory that contains the subdirectory?

It does not have execute permissions set.

You have run the jobs command in the shell and received the below output. What will be the result if you were to issue the fg command in the shell? $ jobs[1]- Running command1[2] Running command2[3]+ Running command3

Job ID 3 will be brought to the foreground.

Red Hat-based systems have been setup in an automated fashion by using which of the following tool?

Kickstart

When setting up a number of hosts to serve the exact same set of content via http servers, what can you configure as a method of ensuring that requests are spread evenly across the available web servers?

Load balancer

When configuring a system that will have a number of console-based users, what would be an efficient method of warning the users that security measures are in effect and other helpful messages?

MOTD

When running the command sudo zypper ref, you get a message about something not being available to be refreshed. What is being refreshed when you issue this command?

Metadata

You need a host that will accept names and perform a lookup on the IP address. This host would be identified as which of the following servers?

Name

When a user or system queries a local or remote server for the match between a host or domain name and an IP address, what is that process commonly known as?

Name Resolution

If you want to hide the configuration file from the usual ls and other user-level commands, what precaution can you take?

Preceed it with the character dot.

When writing a script, you want to allow sections of code to be run by invoking a keyword that identifies those sections of code at the script's execution point. Which of the following best describes the function you'd most likely use?

The case statement

When a server boots, an error shows briefly on the screen that indicates that a device was unable to be mounted. A review of the /etc/fstab shows the device was supposed to be mounted at boot. The device is present in the lsblk output. What is the most likely cause of the error?

The device mount point is missing.

When connecting from a Windows client system to a properly configured Linux server, which of the following protocols will provide a GUI session both via a client app or through a Browser?

VNC

Which of the following was designed to be a more streamlined and easier to use replacement for the X Window System?

Wayland

Your cloud admin has given you a file that can be used to initiate the setup of a cloud server; all you have to do is refer to it during the instantiation. Which of the following is the most likely format for this file?

YAML

When a process has terminated but still has an entry in the process table, what is that process commonly known as?

Zombie

You are concerned that a particular host is getting or keeping in a cache the incorrect MAC (Media Access Controller) addresses for other hosts. On the suspect host, what command will show you the list of known MAC addresses?

arp

What command uses the formatted string shown below? %a %b %d %H:%M:%S %Y

ascii-time

In your orchestrated environment, you have set up certain tasks to be performed without any human intervention, such as instigating a procedure based on hosts reaching a particular level of CPU and network activity. This is commonly known as infrastructure _________.

automation

Your cloud servers are configured to use a particular data type for large media files that are uploaded by your users. Which of the following describes this data type?

blob

Your network configuration needs to be configured to allow two disparate networks to be connected together, allowing a free flow of traffic through your server from network to network. Which of the following commands would be used to accomplish this?

brctl

When using git for version control, if you make a copy of a repository and store it on your local system, complete with its metadata, it can be said you have made a _______ of the project.

clone

When scheduling jobs on a Linux system, which of the following allows for the most options for scheduling tasks to run at varying intervals and times?

cron

You have used a command to generate a special file that will be used to boot your system from a disk array that requires a driver to access. The file contains an initial root filesystem that is used to boot the system and allow it to access the needed drivers from the disk array. Which of the following commands will create the special file needed to boot this system?

dracut

Your system's disk space is getting misused by a number of users and so you have instituted disk quotas. Which of the following commands should you use to set and then edit your user's disk quota allowances?

edquota

After declaring and populating a variable, you write a script that uses that variable in its operation. Upon executing the script, you find the variable is not found. What command will help you make the variable and its contents available to the script?

export

When you execute a new script you've written, one of the environment variables you created in your current shell for use in that script doesn't appear to be present. Which of the following commands would help you to fix this issue?

export

Which of the popular firewall options includes the use of zones to separate traffic and can be configured temporarily to test, and then commit that working configuration to permanent status?

firewalld

You are interviewing security managers and ask them some questions, including what firewall they recommend that allows a separation of the runtime and permanent configuration, no need to restart the daemon when changes are made and were most recently introduced through various distributions. Choose the answer that meets all of the question's criteria.

firewalld

A junior system administrator is attempting to install a somewhat large application on a system and is getting messages from the rpm command requiring additional software. Upon checking, you recommend to use a particular option with the rpm command to instruct the system to ignore the requirement. Which of the following options might you have recommended?

nodeps

Which utility, when run with a search term, will return back only the Process ID (PID) of that process so, you can use it as the standard input to a command such as kill?

pgrep

When writing an orchestration plan, you gather together all the steps needed to accomplish the result and this is commonly called a _______.

procedure

Users report that the system is sluggish, and upon investigation, you find that the backup process you started earlier is consuming a lot of resources. Which of the following will allow the adjustment of this process's priority while still keeping it running?

renice

You wish to query the listing of files that will be installed by a package that is on disk, and not installed. Which of the following commands will do this?

rpm -qpl package1.rpm

When migrating an application from one server to another, you need to run a utility that can compare the local data with a remote location, and do it securely over the network via the ssh protocol. Which of the following would you most likely use to perform this task?

rsync

You want to run a given command with options and get an overall report of your systems CPU, memory activity, interrupt requests, swap utilization, and network traffic. Which of the following can do all of this?

sar

You have been using ssh and other related utilities to remotely connect to a server for administration purposes and are tired of typing in a password. Which of the following utilities will allow you to generate files that would make it possible to sign in to this system without entering a password each time you connect? Choose the best answer.

ssh-keygen

Which of the following commands will restart or reload a systemd service named tuned without interrupting existing user connections to the service?

systemctl daemon-reload tuned

A systemd-based computer that you are managing is taking an inordinately long time to boot without any obvious errors or explanations. Which of the following options to the systemd-analyze command should you use to determine what is causing the system to take so long to boot?

systemd-analyze blame

You are trying to archive and compress a set of files so they can be sent to another system. Which of the following commands will allow you to both archives and compress this set of files?

tar

Which command will show you a frequently-updated listing of the processes on your system that can be sorted to find a given process and allow you to adjust the priority of that process as well as kill it if needed, all in the same interface?

top

You want to keep an eye on your system's most active processes, but don't want to continue to run the ps command over and over. Which of the following will best accomplish this?

top

Which of the following commands could you use to change the individual characters of a stream to other characters? Choose the most direct and simple option.

tr

When setting up a policy for how users can access your systems, it is important to realize that good security occurs where?

All of these

Due to security concerns about password aging, users are writing down login information. Your company has determined that a hardware solution is the best route. Which of these best names this solution as known in the industry?

Multi-factor authentication tokens

Modern package management schemes depend on sets of software in local or remotely-accessible locations that are used to provide the packages, updates, and security fixes that affect a given set of packages. Which of the following describe these sets of software?

Repositories

You have run the command file `which ls` and get the desired output. What best describes the use of the (`) characters to surround the command?

Substitution

Sometime during the night, your server became unresponsive and you have gone to troubleshoot the issue. You find the system has a number of pieces of information on its console, including a Call Trace, some hexadecimal codes and what appears to be some stack output as a number of 8 character strings. What has most likely happened to your server?

The kernel has panicked.

While running a command that is processing slowly and will take some time to finish, you press the keystrokes Ctrl-Z. What is the result of this action?

The running command will be suspended.

When attempting to access a shared directory owned by another user, a user reports they can see the directory, but cannot enter the directory. Which of the following would prevent the user from entering the directory properly?

The user does not have execute for the directory

When backing up your system, you execute the backup utility with a set of options that produces a backup file that contains all the files changed since the last full backup performed. Which of the following best defines this command's results?

differential

You need to know what the MX servers are for a remote domain. Which of the following commands will allow you to display that information most directly?

dig

One of your servers reboots unexpectedly and during the boot cycle, a number of error messages are shown, but you can't write them all down fast enough. Which command would show you the messages that have been logged in the last boot cycle?

dmesg

When on a support call with a Linux vendor regarding a system, you are asked to provide a text report of the system's current System Management BIOS (SMBIOS) from the /sys directory. Which of the following commands most directly would provide an output that can be sent to a file and given to the vendor for troubleshooting?

dmidecode

When starting to work on some files for a project, you want to see what branches exist both locally and remotely, so you would issue the command _________.

git branch -a

Which git command would you use to retrieve files from the remote repository and store them in the working directory for the project?

git pull

Which of the following commands allows you to sync the Linux system time with the hardware clock on the system, or vice versa?

hwclock

While setting up another large website on an older but still serviceable Linux server, you encounter errors when trying to copy files to the filesystem. This could be a result of __________.

inode exhaustion

Your system seems to be accessing disk a lot, but you are not using much swap memory. Which tool will give you accurate information about your storage input and output statistics?

iostat

On your newly-installed systemd-based server, you want to view log files that pertain to the systems booting and any error messages. Which command would you use on this system to view the desired information?

journalctl

You need to see the device structure of a disk that you are about to partition. After partitioning, you run a command, which displays the following output at the command prompt: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 20G 0 disk├─sda1 8:1 0 8M 0 part├─sda2 8:2 0 12.6G 0 part /usr/local├─sda3 8:3 0 5.4G 0 part /home└─sda4 8:4 0 2G 0 part [SWAP]sr0 11:0 1 6.7G 0 rom Which of the following commands will you run to get the above output?

lsblk

You run a command and the below output is the result. What is the most likely command to produce this output? class type subclass descriptionlogical_volume vgtype vgsubclass Volume grouplvm lvdd lvm LVM Device Driverposix_3io posix_3io node Posix Asynchronous I/O3p0 3p0 node Asynchronous I/O (Legacy)pts pts pty Asynchronous Pseudo-Terminalmouse 040506 usbif USB mousekeyboard 070809 usbif USB keyboard

lsdev

A remote sysadmin reports a secure system is not functioning properly, including it's networking capability. Unable to remotely login, you ask the sysadmin to run a report on the system that includes details about the system configuration, including Memory, Motherboard, CPU, Cache, Bus, and other details. What command will the remote sysadmin run to get these required details and send them to you?

lshw

When finished with further development of two branches of the original code base, you wish to bring both code segments into a coherent single branch again. Which command should you use to do this?

merge

Your server boots from a specialized disk array and the instructions require you to use the ______ command to create a RAM disk that contains a driver.

mkinitrd

A user on a secure system is reporting that an application they have run has given an indication that the number of files open has exceeded the number allowed. What command should you have the user run to determine the number of allowed open files?

ulimit

You have a user who has a security requirement that all files they create should by default have a set of more restrictive permissions for a government-funded project. What command on the system should you use to restrict their default permissions on objects they create?

umask

If you are on a terminal that doesn't recognize your arrow keys and have to use hjkl for cursor navigation, what editor will you likely use for compatibility?

vim

Your virtualization environment is running on KVM, and you find out that there is a handy command-line interface tool that allows you to create, run, stop, manage, and delete virtual machines. What is the name of this command?

virsh

You have a comprehensive and active sudo environment on your system but are suffering from having multiple active editors of the /etc/sudoers file, with some sysadmins overwriting other's changes accidentally. Which of the following, when used by all editors of the file would ensure the file is edited properly?

visudo

Your system seems to be using swap a lot, so you want to get near-realtime statistics on its memory, processes, paging, block i/o, and interrupts being requested. Which of the following will accomplish this most directly?

vmstat


Related study sets

Chapter 3 -PrepU - Chronic Illness and End-of-Life Care

View Set

The Gas Laws Unit Test Review and Test 96%

View Set

Chapter 5: Therapeutic Relationships PrepU

View Set

Trauma, Crisis, Disaster, and Related Disorders RN

View Set