quizlet
quizlet
1. An administrator has modified the kill -HUP 9. An administrator needs to mount the # mkdir
configuration file for a service. The service is shared NFS file system testhost:/testvolume
still running but is not using the new testhost:/testvolume to mount point at /mt/testvol
configured values. Which of the following will /mnt/testvol and make the mount # mount -a
BEST remediate the issue? persistent after reboot.
2. An administrator has written the following The
Which of the following BEST
Bash script: shebang
demonstrates the commands
points to
necessary to accomplish this task?
/home/user/test.sh the wrong
path 10. An administrator needs to see a list /etc/passwd
#!/usr/bin/sh of the system user's encrypted
for i in 'cat /home/user/iplist.txt' passwords. Which of the following
do Linux files does the administrator
nslookup $i need to read?
done
11. An administrator needs to see the /proc/cpuinfo
echo
type of CPU that a server is running.
3. An administrator is analyze a Linux server pam_tally2 Which of the following files contains
which was recently hacked. Which of the this information?
following will the administrator use to find all
12. An administrator notices that a long- renice
unsuccessful login attempts?
running script, /home/user/script.sh, is
4. An administrator is attempting to block SSH iptables -A taking up a large number of system
connections to 192.168.10.24 using the Linux -p tcp -d resources. The administrator does not
firewall. After implementing a rule, a 192.168.10.24 know the script's function. Which of
connection refused error is displayed when -dropt 22 -j the following commands should the
attempting to SSH to 192.168.10.24. REJECT administrator use to minimize the
Which of the following rules was MOST likely script's impact on system resources?
implemented?
13. An administrator receives a warning lsof | grep
5. An administrator is tasked with increasing the lvextend - about a file system filling up, and largelogfile
size of the volume /dev/vg/lv to 20GB. Which L20G then identifies a large file located at
of the following BEST illustrates the steps the /dev/vg/lg; /tmp/largelogfile. The administrator
administrator should take? resize2fs deletes the file, but no space is
/dev/vg/lg recovered on the file system. Which
of the following commands would
6. An administrator needs to change the IP nohup
BEST assist the administrator in
address on a server remotely. After updating service
identifying the problem?
the configuration files, a network restart is network
needed. However, the administrator fears that restart 14. An administrator reviews the JSON
when the network connection drops, the following configuration file provided
network restart script will be killed before b a DevOps engineer:
the new IP address has been set. Which of
the following commands would prevent the Tasks:
script from being killed? -name: Install php-fpm from repo
yum:
7. An administrator needs to create a shared rwxrwxrwx
name: php-fpm
directory in which all users are able to read,
state: present
write, & execute its content but none of the
-name: Install mysql from rep
regular users are able to delete any content.
yum:
Which of the following permissions should be
name: mysql-server
applied to this shared directory?
state: present
8. An administrator needs to deploy 100 Kickstart
identical CentOS workstations via PXE boot. script
Which of the following should the
administrator use to minimize the amount of
interaction with the consoles needed?
15. After starting a long-running 1. CTRL-Z 18. A(n) _____ backup includes all files incremental
script, a systems administrator 2. bg that have changed since the last
needs to verify the frequency of 3. watch df /var incremental or full backup. An incremental backup
what is filling up the /var partition 4. CTRL-Z includes all files that
and kill it because it is consuming 5. fg have changed since the
too much space. Which of the 6. CTRL-C last incremental or full
following is the correct sequence backup. With a full
given only a terminal is available? backup, everything
from the source is
16. All users are reporting that they Allow SFTP
backed up. A
cannot connect to the SFTP server. connections on port 22
differential backup
The administrator runs a scan: using
archives; any files since
/etc/sysconfig/iptables
the last full backup.
starting nmap 4.11 at 2018-06-16
There is no such term
EST
as a complete backup.
not shown: 1456 closed ports
19. Ann, a junior Linux administrator, wget
PORT STATE. SERVICE needs to copy software from her [email protected]:/tmp
53/tcp. open. dns local machine to assist in -f ~/software.rpm. or
80/tcp. open. http developing a software application scp ~/software.rpm
957. open. unknown on a remote machine with the IP [email protected]:/tmp
address 192.168.3.22. The file
MAC Address 08:00:00:00:00:00 ( needs to be placed on the /tmp
computer systems ) directory. After downloading the
nmap finished = 1 ip address ( 1 RPM to the local machine, which
host up ) scanned in 1.497 seconds of the following commands would
You have mail in be BEST to use to copy the
/var/spool/mail/root software?
20. Ann performs some diagnostics chattr -l /etc/yum.conf
Which of the following would allow
to attempt to find the root cause?
the administrator to fix the
problem?
root@comptia:~# ls -l
17. An analyst is trying to determine $(cat ip-list.txt) should /etc/yum.conf
which public IP addresses are be changed to 'cat ip- -rw-r-r-1 root root 970 Jan 30
managed by Company A, but the list.txt' in the for 2018 /etc/yum.conf
script is not working correctly. statement.
root@comptia:~# ls -l
for ip in $(cat ip-list.txt ) /etc/yum.conf
do whois $ip | grep "Company A" > ----i-------e-- /etc/yum.conf
/dev/null
21. #/bin/bash "$1" -> for -> in ->
if [ $? -ne 0 ]
/tmp/tempfile ->gzip ->
then echo "$ip"
#name: script.sh done
fi
done
find /var/log -type f -maxdepth 1
| grep "$1 > /tmp/tempfile
Which of the following explains
what is wrong with the script?
for filename in $(cat
/tmp/tempfile)
do
gzip $filename
done
22. ChainINPUT (policyACCEPT) Add iptables 27. An engineer is working on a git push
rule iptables production application deployment server.property
target prot opt source destination -A that requires changing a web
ACCEPT tcp -- anywhere anywhere tcp FORWARD - application property file called
dpt;webcache m state -- server.property that is managed by
state NEW - the Git version control system. A
Chain FORWARD (policy ACCEPT) p tcp --dport cloned copy of the remote repository
8080 -j in which the server.property file exists
target prot opt source destination ACCEPT is on the local desktop computer. The
ACCEPT tcp -- anywhere anywhere then restart engineer makes appropriate changes
dpt;webcache httpd to the files, saves it as
daemon server.property, and executes git
Chain OUTPUT (policy ACCEPT) commit -m "changed the property.
Which of the following commands did
target prot opt source destination the engineer fail to perform?
28. A four-drive Linux NAS has been RAID 10
Output of netstat -nltop | grep "8080":
improperly configured. Each drive has
a capacity of 6TB, for a total storage
tcp 0.0.0.0:8080 0.0.0.0* Listen 12801/httpd
capacity of 24TB. To reconfigure this
23. A company wants to ensure that all newly umask 0022 unit to be not pluggable for drive
created files can be modified only by their replacement and provide total
owners and that all new directory content storage of 11TB to 12TB, which of the
can be changed only by the creator of the following would be the correct RAID
directory. Which of the following commands configuration?
will help achieve this task?
29. Given that a company's policy states VNC
24. A configuration management tool running systemctl that users cannot install third-party
every minute is enforcing the service HTTPd stop httpd tools on Windows servers, which of
to be started. To perform maintenance, && systemctl the following protocols will allow a
which of the following series of commands mask httpd Linux GUI to connect to a Windows
can be used to prevent the service from server?
being started?
30. Given the output below: ln -rm
25. A datacenter administrator assigns a ticket Kill -s ./Pictures/photo.jpg
to a junior Linux administrator regarding a SIGCHLD drwxr-xr-x. 4096 user1 user1
Linux server that is presenting issues with pid Documents
excessive CPU consumption and causing drwxr-xr-x. 4096 user1 user1 Music
instability in a specific application. The lrwxrwxrwx. 1 root. root MyPhoto.jpg -
junior Linux administrator troubleshoots the >/Pictures/photo.jpg
Linux server and finds several zombie drwxr-xr-x. 4096 user1 user1 Pictures
processes running on it. -rw-r--r--. 256 user1 user1 text.txt
-rw-r--r--. 35 user1 user1 tmp.tmp
Which of the following commands would
effectively fix the issue? Which of the following commands can
be used to remove MyPhoto.jpg from
26. The development team has automated their To streamline
the current directory?
software build process so each time a the
change is submitted to the source code deployment
repository, a new software build is process for
compiled. They are requesting that the deploying
Linux operations team look into automating builds into
the deployment of the software build into test
the test environment. Which of the environments
following is the benefit to the development
team for implementing deployment
automation?
31. If you want STDOUT to be sent tee 36. A junior administrator of a physical free :
both to the terminal and to a file, server receives log messages indicating swapoff/swapfile
send the output to the _____ If you want STDOUT to the out-of-memory killer has been ; swapon -a
command. be sent both to the active. All memory slots are in use on
terminal and to a file, the motherboard, but additional disk
send the output to the space is available. Space has been
tee command. The allocated for a swap file.
xargs command takes Which of the following should the
data from STDIN to administrator use to reduce the output
build and execute of memory messages?
commands. The tr
37. A junior Linux administrator is installing ps -ef | grep
command is useful for
patches using YUM. The administrator yum
translating characters
issues the following command:
from one set to
yum list installed
another. The echo
The output of the command is as follows:
command is useful for
displaying information
Loaded plugins: fastmirror, langpacks
to standard output.
Existing lock /var/run/yum.pid: another
32. In order to comply with new /etc/ssh/sshd_config copy is running as pid 5180.
security policies, an administrator Another app is currently holding the
needs to prevent the SSH server yum lock; waiting for it to exit...
from using insecure algorithms. The other application is yum
Which of the following files should Memory 26 M RSS (r415 MB VSZ)
be edited to accomplish this? Started: Fri Jun 15 08:05:15 2018 - 2:18:48
ago
33. Joe, a user, is unable to log in to passwd -u joe
State: Traced/Stopped pid: 5180
the server and contracts the
systems administrator to look into
Given this scenario and the output, which
the issue. The administrator
of the following should the administrator
examines the /etc/passwd file and
do to address this issue?
discovers the following entry:
38. A junior Linux administrator is optimizing Issue the
joe:x:505:505::/home/joe:/bin/false a system in which an application needs command renice
to take priority 0 when running the -n 0 -p 8481
Which of the following commands process. The administrator runs the ps
should the administrator execute command and receives the following
to resolve the problem? output:
34. A junior administrator is migrating OVA
PID PPID. TTY. Time. CMD
a virtual machine from Type 1
8481 2. pts/17. 16:40:00. app
hypervisor to a Type 2 hypervisor.
9854. 0. pts/17 16:40:00 ps
To ensure portability, which of the
Given this scenario, which of the
following formats should the
following steps will address this issue?
administrator export from the
Type 1 hypervisor to ensure 39. A junior Linux administrator is trying to ping -c 10 host1
compatibility? verify connectivity to the remote host
host1 and display round-trip statistics for
35. A junior administrator needs to modprobe
ten ICMP requests.
unload an older video kernel
Which of the following commands
module.
should the administrator execute?
Which of the following commands
would BEST accomplish this task?
40. A junior Linux administrator is Modify the /etc/hosts 45. A junior systems administrator is 24 *** Monday
updating local name resolution to file, and add the creating a cron job. The cron job hello.sh
support IPv6. The administrator 0.0.0.0 localhost entry requirements are as follows:
issues the command cat /etc/hosts to the file -run the hello.sh script every hour
and receives the following output: (24 times in one day).
127.0.0.1 localhost -run it on Monday only
Given this scenario, which of the
Which of the following actions following crontab options should be
should the administrator perform configured to meet these
to accomplish this task? requirements?
41. A junior Linux administrator needs ~/.ssh/authorized_keys 46. A junior systems administrator is 1. yum install
to access production servers using upgrading a package that was <package name>
a secure SSH protocol. Which of installed on a Red Hat-based 2. rpm -qa
the following files should contain system. The administrator is tasked
the public key to gain remote with the following:
access to the server? -update & install the new package
-verify the new package version is
42. A junior Linux administrator needs chkconfig <service> on
installed.
to ensure a service will start on
system boot. Which of the
Which of the following should be
following commands should be
done to BEST accomplish these
used to accomplish this task?
tasks? (choose two)
43. A junior systems administrator Change the options to
47. The lead Linux has added a disk, 1. pvcreate /dev/sdd
created a new filesystem auto,dev,sync,rw,nosuid
/dev/sdd, to a VM that is running out 2. vgextend vg data
/dev/sda1 with mountpoint /data and run the mount -a
of disk space. Place the following /dev/sdd
and added it to the /etc/fstab for command.
steps in the correct order from first 3. lvextend -L +10GB
auto-mounting. When the systems
(!) to last (4) to add the disk to the /dev/mapper/vgdata-
administrator tries to mount the
existing LVM. data
file system, the system refuses.
4. resize2fs
Given the output below:
/dev/mapper/vgdata-
data
/dev/mapper/VolGroup00-Log-
Vol00 / xfs defaults 0 0 48. A Linux administrator built a GitLab iptables -A INPUT -p
dev/sda1 /data xfs server. Later that day, a software tcp -m multiport --
noauto,dev,sync,ro,nosuid 0 0 engineer tried to access the server dports 80, 443 -m
/dev/mapper/VolGroup00-Log- to upload the repository during the conntrack -cstate
Vol101 swap swap. defaults0 0 final step of installation. The RELATED,
/dev/sda2 /mine ext4. software engineer could not access ESTABLISHED -j
auto,suid,sync,rw,dev. 0 0 the website. Which of the following ACCEPT
firewall rules would allow access to
44. A junior systems administrator is -locale
this site?
configuring localization option -export LANG =
environment variables. The en_US.UTF-8
administrator is given a checklist
of tasks with the following
requirements:
-View current settings of the
LC_ALL environment variable
only.
-Modify the LANG environment
variable to US English Unicode.
Given this scenario, which of the
following should be performed to
meet these requirements?
(Choose two).
49. A Linux administrator has echo "1" > 52. A Linux administrator is confirming information cat /etc/resolv.conf
configured a Linux system to /prc/sys/net/ipv4/ip_forward on a system. The administrator issues a series of
be used as a router. The commands and views the following output:
administrator confirms that
two network adapters are search homebizbook.com nameserver
properly installed and 205.70.100.12 nameserver 205.70.100.13
functioning correctly. In
addition, the output of the Which of the following commands did the
iptables - administrator issue?
L command appears to
53. A Linux administrator is investigating an last
contain a complete firewall
unscheduled restart of an application server
configuration.
and wants to check for successful logins prior
Which of the following
to the restart. Which of the following commands
commands does the
would display this information?
administrator need to issue
for the router to be fully 54. A Linux administrator is setting up a testing # hostnamectl set-
functional? environment and needs to connect to a hostname "192.168.1.100
separate testing server using the production production.company.com"
50. A Linux administrator Run netcat to ensure the
server name. The administrator needs to
implemented a new HTTP port is correctly bound, and
override the hostname that the DNS is returning
server using the default configure a static route to
in order to use the test environment. Which of
configuration. None of the the web to allow access on
the following commands should be run on each
users on the network can ports 80 and 443.
of the testing systems to BEST meet this goal?
access the server. If there is
no problem on the network 55. A Linux administrator issues the following rpm -i installpackage.rpm
or with the users' command with root or sudo privileges: --nodeps
workstations, which of the
following steps will BEST rpm -i installpackage.rpm
analyze and resolve the
issue? Once the command is issued, the console
outputs the following error message: failed
51. A Linux administrator chkconfig --level 345
dependency. The administrator confirmed in a
installed a new network network on
previous step that all dependencies have
adapter and temporarily
already been installed.
disabled the network service
from starting on boot. The
Which of the following commands should the
partial output of chkconfig is
administrator issue to bypass this error
as follows:
message?
network 0:off 1:off 2:off 3:off 56. A Linux administrator is testing a new web httpd_can_network_connect
4:off 5:off 6:off application on a local laptop and consistently =1
shows the following 403 errors in the laptop's
Which of the following logs:
commands BEST describes type=AV msg=audit(126552035:37232):avc:denied
how the administrator should {read} for pid=24941 com=ngix
re-enable the network nme="/home/user1" /dev/sda1 ino=2
service? scontext=unconfined_u:system_r:httpd_t:s0
tcontext=system_u:object_r:httpd_sys_content:s0