CompTIA XK0-005 Practice Test - Questions Answers, Page 32
List of questions
Related questions
Which of the following commands is used to tune kernel parameters?
sysctl
ss
mkinitrd
lsof
A security team discovers that a web server has been running with elevated privileges and identifies it as a security violation. Which of the following items needs to be added to the webserver.service file to remediate the issue?
In the [Service] section of the webserver.service file, add User=comptia.
In the [Unit] section of the webserver.service file, add AllowIsolate=true.
In the [Install] section of the webserver.service file, add WantedBy=single.target.
Add After=network.target to the [Install] section of the webserver.service file.
Which of the following paths stores the configuration files in a Linux filesystem?
/proc
/home
/root
/etc
The users of a Linux system are unable to use one of the application filesystems. The following outputs have been provided:
bash
$ cd /app
$ touch file
touch: cannot touch 'file': Readonly file system
Output 2
/dev/sdcl on /app type ext4 (ro,relatime,seclabel,data=ordered)
Output 3
/dev/sdcl /app ext4 defaults 0 0
Output 4
[302.048075] Buffer I/O error on dev sdcl, logical block 0, async page read
[302.048490] EXT4-fs (sdcl): Attempt to read block from filesystem resulted in short read while trying to re-open /dev/sdcl
Which of the following actions will resolve this issue?
umount /app fsck -y /dev/sdcl mount /app
xfs_repair /dev/sdcl mount -o rw,remount /app
umount /app xfs_repair /dev/sdcl mount /app
fsck -y /dev/sdcl mount -o rw,remount /app
A systems administrator is tasked with configuring a repository on an RPM-based Linux system. Which of the following need to be reviewed and modified? (Select two).
/etc/yum.conf
/etc/apt/sources.list.d
/etc/pam.d
/etc/apt.conf
/etc/yum.repos.d
/etc/ssh/ssh_config
A systems administrator receives the following errors via email from the system log:
go
XFS (loop0): Metadata CRC error detected at xfs_agi_read_verify+0xcb/0xfe
XFS (loop0): First 128 bytes of corrupted metadata buffer
XFS (loop0): metadata I/O error in 'xfs_trans_read_buf_map' at daddr 0x2 len 1 error 74
A few minutes later, the administrator starts receiving reports that some of the images in the company's website are not loading properly. The systems administrator runs some commands and receives the following outputs:
css
Output 1
NAME FSTYPE UUID MOUNTPOINT
sda ext4 02ae47-fe457-45bc /
sdb xfs 347c7056 /var/www/html
Output 2
DocumentRoot '/var/www/html'
Output 3
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 1991-05-24 16:12:43 UTC; 30y ago
Main PID: 252 (httpd)
Which of the following would be the appropriate steps to take to solve this issue?
systemctl stop httpd umount /dev/sdb1 xfs_repair /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl start httpd
umount /dev/sdb1 xfs_repair /dev/sdb1 xfs_metadump /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl restart httpd
umount /dev/sdb1 systemctl stop httpd xfs_metadump /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl start httpd
systemctl stop httpd xfs_check -L /dev/sdb umount /var/www/html systemctl start httpd
A Linux administrator created a virtual clone of a physical server and would like to remove any existing entries related to SSH keys from outside entities on the virtual clone. Which of the following files should the administrator remove? (Select two).
~/.ssh/authorized_keys
~/.ssh/known_hosts
/etc/ssh/ssh_config
~/.ssh/config
/etc/ssh/sshd_config
/etc/ssh/ssh_host_rsa_key.pub
A systems administrator wants to list all local account names and their respective UIDs. Which of the following commands will provide output containing this information?
cut -c: -f3,1 /etc/passwd
cut -d: -s2,3 /etc/passwd
cut -d: -f1,3 /etc/passwd
cut -n: -f1,2 /etc/passwd
A Linux systems administrator is trying to execute a particular shell script on a server. The administrator reviews the following outputs:
shell
$ ./startup.sh
bash: ./startup.sh: Permission denied
$ ls -l startup.sh
-rw-rw-r-- 1 companyabc companyabc 18 October 15:35 startup.sh
Which of the following commands should the administrator use to allow the script to run?
chown root startup.sh
chmod 750 startup.sh
chmod -x startup.sh
chmod 400 startup.sh
A user is cleaning up a directory because it has more than 100,000 files that were generated from an experiment. When the user tries to remove the unneeded experiment files, the user receives an error:
arduino
cannot execute [Argument list too long]
Which of the following should the user execute to remove these files?
find . -name 'experiment*.txt' -exec rm '{}' ;
rm -rf experiment*.txt
rm --force experiment*.txt
for i in experiment*.txt; do find . -name $i -exec rmdir '{}' ; done
Question