Unlock Linux Mastery: CompTIA Linux+ XK0-005 Prep That Fits Your Life
An administrator thinks that a package was installed using a snap. Which of the following commands can the administrator use to verify this information?
Correct : A
The snap list command lists all installed snap packages on the system. It provides details such as the package name, version, and installation status. This command is useful for verifying whether a specific package was installed using the snap package manager.
Start a Discussions
An administrator thinks that a package was installed using a snap. Which of the following commands can the administrator use to verify this information?
Correct : A
Again, the correct command to list all installed snap packages is snap list. This command provides information about installed snap applications and their versions, helping the administrator verify the package installation.
Start a Discussions
A Linux administrator needs to expose port 9000 for a container to listen during runtime. The Linux administrator creates a Dockerfile with the following entries:
sql
FROM node:9-alpine
WORKDIR /usr/src/app
COPY package.json ./
RUN npm install
COPY . .
EXPOSE 9000
CMD ["npm", "start"]
Which of the following commands should the administrator use to accomplish this task? (Select two).
Correct : A, F
First, the administrator should build the container image using the command docker build -t Test-Container, which creates a Docker image with the specified configuration. To run the container and expose port 9000, the correct command is docker run -p 80:9000 Test-Container, which maps the container's port 9000 to port 80 on the host machine, making the service accessible externally on port 80.
Start a Discussions
A Linux administrator has defined a systemd script docker-repository.mount to mount a volume for use by the Docker service. The administrator wants to ensure that the Docker service does not start until the volume is mounted. Which of the following configurations needs to be added to the Docker service definition to best accomplish this task?
Correct : C
The Requires=docker-repository.mount directive in the Docker service file ensures that the Docker service depends on the docker-repository.mount unit. If the mount is not available, Docker will not start. This guarantees that the necessary volume is mounted before the Docker service attempts to use it.
Start a Discussions
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?
Correct : A
The %iowait value represents the percentage of time the CPU is waiting for I/O operations to complete. A high %iowait value suggests the system is bottlenecked by disk I/O, which could lead to slow response times. Addressing disk I/O bottlenecks would improve performance.
Start a Discussions
Total 370 questions