Study Guide Flashcards
(106 cards)
A Linux administrator must identify a user with high disk usage. The administrator runs the # du -s /home/* command and gets the following output:
43 /home/User1
2701 /home/User2
133089 /home/User3
3611 /home/User4
Base on the output, User3 has the largest amount of disk space used. To clean up the file space, the administrator needs to find out more information about the specific files that are using the most disk space.
Why of the following commands will accomplish this task?
A. df -k /home/User/files.txt
B. du -a /home/User3/
C. du -sh /home/User/
D. find . -name /home/User3 -print
C. du -sh /home/User
Ends with “User/”
A Linux server has multiple IPs. A Linux administrator needs to verify if the HTTP server port is bound to the correct IP.
Which of the following commands would BEST accomplish this task?
A. route B. host C. nslookup D. netstat E. ip
D. netstat
netstat can find listening ports
A systems administrator needs to append output of ls -lha /opt command to the contents of a test.txt file. Which of the following commands will accomplish this?
A. ls -lha /opt > text.txt
B. ls -lha /opt < test.txt
C. ls -lha /opt»_space; test.txt
D. ls -lha /opt «_space;test.txt
C. ls -lha /opt»_space; test.txt
Double-Greater-Than sign»_space;
A Linux systems administrator needs to provision multiple web servers into separate regional datacenters. The systems architect has instructed the administrator to define the server infrastructure using a specific tool that consumes a text-based file.
Which of the following is the BEST reason to do this?
A. To document the infrastructure so it can be included in the system security plan.
B. To ensure the administrator follows the planning phase of the system development life cycle.
C. To define the infrastructure so it can be provisioned consistently with minimal manual tasks.
D. To validate user requirements have been met within each regional datacenter for compliance.
B. To ensure the administrator follows the planning phase of the system development life cycle.
Pick the SDLC
A Linux systems administrator needs to set permissions on an application with the following parameters:
- The owner of the application should be able to read, write, and execute the application.
- Members of the group should be able to read and execute the application.
- Everyone else should not have access to the application.
Which of the following commands would BEST accomplish these tasks?
A. chmod 710
B. chmod 730
C. chmod 750
D. chmod 760
C. chmod 750
750.
Read - 4, Write - 2, Execute - 1
Owner / Group / Other
7 (4+2+1) 5 (4 + 1), 0
A junior Linux adminsitrator is trying to verify connectivity to the remote host host1 and display round-trip statistics for ten ICMP.
Which of the following commands should the administrator execute?
A. ping -c 10 host1
B. traceroute -c 10 host1
C. netstat host1
D. pathping -c 10 host1
A. ping -c 10 host1
ICMP ping checks remote connectivity to host for -c (count) of 10.
A junior Linux administrator is updating local name resolution to support IPv6. The administrator issues the command cat /etc/hosts and receives the following output:
127.0.0.1 localhost
Which of the following actions should the administrator perform to accomplish this task?
A. Modify the /etc/hosts file, and add the pv6 localhost entry to the file.
B. Modify the /etc/hosts file, and add the ::1 localhost entry to the file.
C. Modify the /etc/hosts file, and add the ipv4 localhost entry to the file.
D. Modify the /etc/hosts file, and add the 0.0.0.0 localhost entry to the file.
D. Modify the /etc/hosts file, and add the 0.0.0.0 localhost entry to the file.
Look for 0.0.0.0
A Linux systems administrator needs to copy the contents of a directory named “working” on the local working system to a folder /var/www/html on a server named “corporate-web”.
Which of the following commands will allow the administrator to copy all the contents to the web server?
A. scp -r working/* webuser@corporate-web:/var/www/html
B. tar working/* webuser@corporate-web:/var/www/html
C. cp -r working/* webuser@corporate-web:/var/www/html
D. mv working webuser@corporate-web:/var/www/html
A. scp -r working/* webuser@corporate-web:/var/www/html
SCP is the protocol of choice for copying files to remote servers.
A systems administrator has received reports of intermittent network connectivity to a particular website. Which of the following is the BEST command to use to characterize the location and type of failure over the course of several minutes?
A. mtr www.comptia.org
B. tracert www.comptia.org
C. ping www.comptia.org
D. netstat www.comptia.org
B. tracert www.comptia.org
Trace Routes help with logical location, ping does not.
A Linux admnistrator has configured a Linux system to be used as a router. The administrator confirms that two network adapters are properly installed and functioning correctly. In addition, the output of the iptables -L command appears to contain a complete firewall configuration.
Which of the following commands does the administrator need to issue for the router to be fully functional?
A. echo “1” > /proc/sys/net/ipv4/ip_forward
B. echo “0” > /proc/sys/net/ipv4/tcp_abort_on_overflow
C. echo “0” > /proc/sys/net/ipv4/max_connections
D. echo “1” > /proc/sys/net/ipv4/ip_default_ttl
A. echo “1” > /proc/sys/net/ipv4/ip_forward
ip_forward is the only relevant file.
A systems administration team has decided to setup their systems as immutable instances. They keep the desired state of each of their systems in version control and apply automation whenever they provision a new instance. If there is an issue with one of the servers, instead of troubleshooting the issue they terminate the instance and rebuild it using automation.
Which of the following is this an example of?
A. Inventory
B. Orchestration
C. Infrastructure-as-Code
D. Agentless Deployment
C. Infrastructure-as-Code
Self-explanatory.
A systems administrator wants to deploy several applications to the same server quickly. Each application should be abstracted from the host with its own dependencies and libraries and utilize a minimal footprint.
Which of the following would be BEST in this scenario?
A. Virtual machines
B. Type 2 hypervisor
C. Chroot jails
D. Containers
D. Containers
Containers would be preferable to Virtual Machines to reduce footprint. The other answers do not make sense.
An operator finds a user is having issues with opening certain files.
Which of the following commands would allow the security administrator to list and check the SELinux context?
A. ls -D
B. ls -a
C. ls -Z
D. ls -l
C. ls -Z
-Z flag displays SELinux labeling
A new corporate policy states that Bluetooth should be disabled on all company laptps. Which of the following commands would disable the use of Bluetooth?
A. echo “blacklist bluetooth” > /etc/modprobe.d/blacklist-bluetooth
B. echo “kill bluetooth” > /etc/modprobe.d/kill-bluetooth
C. echo “modprobe bluetooth” > /etc/modprobe.d/modprbe-bluetooth
D. echo “rmod bluetooth” > /etc/modprobe.d/rmmod-bluetooth
C. echo “modprobe bluetooth” > /etc/modprobe.d/modprbe-bluetooth
Modprobe is in the path and the echo string.
A junior Linux administrator is installing a new application with CPU architecture requirements that have the following specifications:
- x64 bit
- 3.0GHz speed
- Minimum quad core
The administrator wants to leverage existing equipment but is unsure whether the requirements of these systems are adequate. The administrator issues the following command cat/proc/cpuinfo. The output of the command is as follows.
cpu_family: x64
cpu GHz - 2.1
cpu cores: 4
Which of the following is the recommended course of action the adminstrator should take based on this output?
A. Install the application, as the system meets the application requirements.
B. Procure new equipment that matches the reccomended specifications.
C. Recompile the Linux kernel to support he installation.
D. Reconfigure lib modules to support he new application.
A. Install the application, as the system meets the application requirements.
I do not believe this is the correct answer, as the system has less than 3.0GHz speed. Therefore answer B (procure new equipment that matches the recommended specifications) is the actual answer.
A Linux systems administrator wants the ability to access systems remotely over SSH using RSA authentication. To which of the following files should the RSA token be added to allow this access?
A. authorized_keys
B. ~/.ssh/ssh_config
C. id_rsa.pub
D. known_hosts
C. id_rsa.pub
Pick the answer with RSA for the RSA question.
A Linux server needs to be accessed, but he root password is not available.
Which of the following would BEST allow an administrator to regain access and set a new known password at he same time?
A. Boot into a single-user mode and reset the password via the passwd command.
B. Boot into a single-user mode and reset the password by editing the /etc/passwd file.
C. Boot into a single-user mode and reset the password by editing the /etc/shadow file.
D. Boot into a single-user mode and reset the password via the change command.
A. Boot into a single-user mode and reset the password via the passwd command.
“passwd command”
A Linux adminstrator wants to fetch a Git repository from a remote Git server.
Which of the following is the BEST command to perform this task?
A. git checkout
B. git clone
C. git merge
D. git config
B. git clone
An administrator needs to create a shared directory in which all users are able to write and execute its content but none of the regular usres are able to delete any content.
Which of the following permissions should be applied to this shared directory?
A. rwxrwxrwt
B. rwxrwxrws
C. rwxrwxrwx
D. rwxrwxrw*
C. rwxrwxrwx
Read-Write-Execute x 3
A systems administrator has finished building a new feature for the monitoring software in a separate Git branch.
Which of the following is the BEST method for adding the new feature to the software’s master branch?
A. Merge the changes from the feature branch to the master branch.
B. Save the changes to the master branch automatically with each Git commit.
C. Clone the feature branch into the master branch.
D. Pull the changes from the feature branch into the master branch.
A. Merge the changes from the feature branch to the master branch.
Which of the following will provide a list of all flash, external, internal, and SSD drives?
A. lspci
B. lsmod
C. lsblk
D. lsusb
C. lsblk
Because pci, mod, and usb don’t make sense. Go blk, don’t go back.
Which of the following configuration management tools is considered agentless?
A. Oupuppet
B. Salt
C. Ansible
D. Chef
C. Ansible
CCNA overlap! Ansible.
An administrator reviews the following configuration file provided by a DevOps engineer:
Tasks:
- name: Install php-fpm from repo
…
A. YAML
B. AJAX
C. JSON
D. SOAP
C. JSON
CCNA overlap! JSON.
Which of the following is a difference between YAML and JSON?
A. Users can comment in YAML but not in JSON.
B. JSON uses only curly brackets, while YAML only uses square brackets.
C. JSON is used in web development, while YAML is used solely in back-end systems.
D. YAML has been deprecated for JSON.
A. Users can comment in YAML but not in JSON.
CCNP overlap! JSON’s strict structure doesn’t allow for comments.