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

CompTIA XK0-005 - CompTIA Linux+ Exam

Page: 1 / 15
Total 470 questions

A systems administrator is customizing a new Linux server. Which of the following settings for umask would ensure that new files have the default permissions of -rw-r--r--?

A.

0017

B.

0027

C.

0038

D.

0640

A user is unable to log on to a Linux workstation. The systems administrator executes the following command:

cat /etc/shadow | grep user1

The command results in the following output:

user1 :! $6$QERgAsdvojadv4asdvaarC/9dj34GdafGVaregmkdsfa:18875:0:99999:7 :::

Which of the following should the systems administrator execute to fix the issue?

A.

chown -R userl:user1 /home/user1

B.

sed -i '/ ::: / :: /g' /etc/shadow

C.

chgrp user1:user1 /home/user1

D.

passwd -u user1

A new database is installed on a server. To comply with the database vendor requirement, the huge page function should be set permanently. Which of the following commands will set this parameter?

A.

sysctl -a "vm.nr_hugepage=100"

B.

echo "vm.nr_hiigepage=100" >> /etc/sysconfig/hugepage.conf

C.

echo "nvm.nr_hugepage=100" >> /etc/modprobe.conf

D.

echo "vm.nr_hugepage=100" >> /etc/sysctl.conf

A systems technician is configuring an application server to accept packets from a trusted source with the IP address 192.168.10.22. Which of the following commands will allow communication between the two servers?

A.

iptables -L -s 192.168.10.22 -j ACCEPT

B.

iptables -D INPUT -s 192.168.10.22 -j ACCEPT

C.

iptables -A INPUT -s 192.168.10.22 -j ACCEPT

D.

iptables -A OUTPUT -S 192.168.10.22 -j ACCEPT

After connecting to a remote host via SSH, an administrator attempts to run an application but receives the following error:

arduino

Error: cannot open display:

Which of the following should the administrator do to resolve this error?

A.

Disconnect from the SSH session and reconnect using the ssh -X command

B.

Add Options X11 to the /home/admin/.ssh/authorized_keys file

C.

Open port 6000 on the workstation and restart the firewalld service

D.

Enable X11 forwarding in /etc/ssh/ssh_config and restart the server

NO: 66:

An administrator needs to stop a foreground process in between its execution in a terminal. Which of the following should the administrator use?

A.

Ctrl+D

B.

Ctrl+F

C.

Ctrl+Z

D.

Ctrl+C

When trying to connect from the bastion host to the remote server, a Linux user always forgets to add some required options in the SSH command line. Which of the following is the best way to permanently solve the user's issue?

A.

Write a connection script and put it in the user's home directory.

B.

Instruct the user to add the required options to the ~/.ssh/config file

C.

Add the required options to /etc/ssh/sshconfig

D.

Establish an alias for the SSH command with all the required options.

A systems administrator is configuring a Linux system so the network traffic from the internal network 172.17.0.0/16 going out through the eth0 interface would appear as if it was sent directly from this interface. Which of the following commands will accomplish this task?

A.

iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE

B.

firewalld -A OUTPUT -s 172.17.0.0/16 -o eth0 -j DIRECT

C.

nmcli masq-traffic eth0 -s 172.17.0.0/16 -j MASQUERADE

D.

ifconfig -- nat eth0 -s 172.17.0.0/16 -j DIRECT

Users are unable to create new files on the company's FTP server, and an administrator is troubleshooting the issue. The administrator runs the following commands:

Which of the following is the cause of the issue based on the output above?

A.

The users do not have the correct permissions to create files on the FTP server.

B.

The ftpusers filesystem does not have enough space.

C.

The inodes is at full capacity and would affect file creation for users.

D.

ftpusers is mounted as read only.

Users are reporting that a Linux server is responding slowly. A systems administrator troubleshooting the server issue sees the following iostat output, with %iowait at 50.38. Which of the following is most likely the issue?

A.

The CPU is mostly waiting for I/O operations.

B.

/ filesystem does not have enough storage allocated.

C.

/var filesystem is almost full.

D.

The CPU capacity is inadequate.