Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

CompTIA XK0-005 - CompTIA Linux+ Exam

Page: 4 / 15
Total 470 questions

Ann, a security administrator, is performing home directory audits on a Linux server. Ann issues the su Joe command and then issues the Is command. The

output displays files that reside in Ann's home directory instead of Joe's. Which of the following represents the command Ann should have issued in order to list Joe's files?

A.

su - Joe

B.

sudo Joe

C.

visudo Joe

D.

pkexec joe

An application developer received a file with the following content:

##This is a sample Image ##

FROM ubuntu:18.04

MAINTAINER demohut@gtmail.com.hac

COPY . /app

RUN make /app

CMD python /app/app.py

RUN apt-get update

RUN apt-get install -y nginx

CMD ["echo","Image created"]

The developer must use this information to create a test bed environment and identify the image (myimage) as the first version for testing a new

application before moving it to production. Which of the following commands will accomplish this task?

A.

docker build -t myimage:1.0 .

B.

docker build -t myimage: .

C.

docker build -t myimage-1.0 .

D.

docker build -i myimage:1.0 .

A DevOps engineer is working on a local copy of a Git repository. The engineer would like to switch from the main branch to the staging branch but notices the staging branch does not exist. Which of the following Git commands should the engineer use to perform this task?

A.

git branch -m staging

B.

git commit -m staging

C.

git status -b staging

D.

git checkout -b staging

A user sends a request to access a virtual server via SSH. Which of the following commands is used to open the SSH standard port?

A.

firewalld-cmd --permanent --add-port=22/tcp

B.

iptables-save | grep dport-22/tcp

C.

iptables -A INPUT -p tcp --dport sshd -j ACCEPT

D.

firewalld-cmd --remove-service=ssh --permanent

Users in the human resources department are trying to access files in a newly created directory. Which of the following commands will allow the users access to the files?

A.

chattr

B.

chgrp

C.

chage

D.

chcon

A Linux administrator is configuring network traffic forwarding. Despite having proper iptables rules, the traffic forwarding is not working. Which of the following commands will allow Linux to pass network traffic between different interfaces?

A.

nmcli allow-forwarding eth0

B.

echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf; sysctl -p

C.

ip route forward allow --all-interfaces; systemctl restart network

D.

modprobe ip_forward

A developer wants to ensure that all files and folders created inside a shared folder named /GroupOODEV inherit the group name of the parent folder. Which of the following commands will help achieve this goal?

A.

chmod g+X / GroupOODEV/

B.

chmod g+W / GroupOODEV/

C.

chmod g+r / GroupOODEV/

D.

chmod g+s / GroupOODEV/

A systems administrator receives a report about performance issues in a Linux production system. Which of the following commands should the administrator use to help diagnose the performance issues?

A.

jobs

B.

renice

C.

top

D.

pkill

A systems administrator receives the following message after running an ip link command to verify the status of a network interface named enp0s3:

state DOWN

Which of the following commands should the administrator use to resolve this issue?

A.

ip link set enp0s3 up

B.

ip link ifb enp0s3 up

C.

ip link add enp0s3 up

D.

ip link enp0s3 up

Which of the following options represents disk mirroring?

A.

RAID 0

B.

RAID 1

C.

RAID 5

D.

RAID 6