CompTIA XK0-004 CompTIA Linux+ Certification Exam Online Training
CompTIA XK0-004 Online Training
The questions for XK0-004 were last updated at Nov 23,2024.
- Exam Code: XK0-004
- Exam Name: CompTIA Linux+ Certification Exam
- Certification Provider: CompTIA
- Latest update: Nov 23,2024
An administrator receives a warning about a file system filling up, and then identifies a large file located at /tmp/largelogfile. The administrator deletes the file, but no space is recovered on the file system.
Which of the following commands would BEST assists the administrator in identifying the problem?
- A . lsof | grep largelogfile
- B . pkill /tmp/largelogfile
- C . pgrep largelogfile
- D . ps Cef | grep largelogfile
A company wants to ensure that all newly created files can be modified only by their owners and that all new directory content can be changed only by the creator of the directory.
Which of the following commands will help achieve this task?
- A . umask 0022
- B . umask 0012
- C . chmod CR 0644 /
- D . chmod CR 0755 /
Joe, a member of the accounting group on a Linux system, is unable to write a file called “taxes” in the accounting shared directory.
The ownership and permissions on the directory and file are as follows:
accounting drwxrw-r– user = ann, group = accounting taxes -rw-r–r–, user = ann, group = accounting
Which of the following commands would allow Joe to write to the file? (Choose two.)
- A . chmod g+x accounting
- B . chmod 777 taxes
- C . chgrp taxes accounting
- D . chgrp accounting taxes
- E . chmod 774 accounting
- F . chmod u+x accounting
A technical support engineer receives a ticket from a user who is trying to create a 1KB file in the /tmp directory and is getting the following error No space left on device. The support engineer checks the /tmp directory, and it has 20GB of free space.
Which of the following BEST describes a possible cause for this error?
- A . The /tmp directory is not mounted.
- B . The filesystem is formatted with a 4MB block size.
- C . the filesystem ran out of inodes.
- D . The /tmp directory has been set with an immutable attribute.
In order to comply with new security policies, an administrator needs to prevent the SSH server from using insecure algorithms.
Which of the following files should be edited to accomplish this?
- A . /etc/ssh/sshd_config
- B . /etc/ssh/ssh_config
- C . ~/.ssh/ssh_config
- D . /etc/ssh/known_hosts
A systems administrator is unable to reach other devices on the network and the Internet. The server is configured with the IP address 192.169.1.50/24 on eth0. The server’s router is 192.168.1.1.
The administrator reviews the output of route Cn:
Which of the following commands should the administrator run to correct the issue?
- A . route del default gw 192.168.2.1 eth0; route add default gw 192.168.1.1 eth0
- B . route add Cnet 192.168.10.0 netmask 255.255.255.0 gw 192.168.2.1 eth0
- C . route add 192.168.1.1 default 192.168.1.50 eth0
- D . route host gw 192.168.1.1 eth0
Joe, a user, is unable to log in to the server and contracts the systems administrator to look into the issue.
The administrator examines the /etc/passwd file and discovers the following entry: joe:x:505:505::/home/joe:/bin/false
Which of the following commands should the administrator execute to resolve the problem?
- A . usermod Cs /bin/bash joe
- B . passwd Cu joe
- C . useradd Cs /bin/bash joe
- D . chage CE -1 joe
A systems administrator configured a new kernel module, but it stopped working after reboot.
Which of the following will allow the systems administrator to check for module problems during server startup?
- A . lsmod
- B . modprobe
- C . modinfo
- D . dmesg
A Linux administrator has installed a web application firewall in front of a web server running on HTTP port 8080 and successfully started the HTTP server. However, after opening the application URL in an Internet browser, the administrator discovered that the application does not work.
The administrator performed the following diagnostic steps:
Output of sysctl -a command:
Output of iptables -L command:
Output of netstat Cnltop | grep "8080":
Which of the following is the NEXT step the administrator should perform to permanently fix the issue at the kernel level?
- A . sysctl -w net.ipv4.ip_forward=1 then run sysctl -w /etc/sysctl.conf to enable the change
- B . Edit /etc/sysctl.conf file and add net.ipv4.ip_forward = 1 then run sysctl -p /etc/ sysctl.conf to enable the change
- C . Add iptables rule iptables -A INPUT -m state –state NEW -p tcp –dport 8080 -j then restart httpd daemon
- D . Add iptables rule iptables -A FORWARD-m state –state NEW -p tcp –dport 8080 Cj ACCEPT then restart httpd daemon
A Linux administrator is testing connectivity to a remote host on a shared terminal. The administrator wants to allow other users to access the terminal while the command is executing.
Which of the following commands should the administrator use?
- A . bg ping remotehost
- B . fg ping remotehost
- C . ping remotehost < results
- D . ping remotehost &
No comment