When working with Docker, the Dockerfile is used to define and configure the container's _________.
- Behavior
- Networking
- Environment
- Parameters
When working with Docker, the Dockerfile is used to define and configure the container's environment. This includes specifying the base image, installing software, setting environment variables, and other container-specific configurations.
While debugging a long script, you realize that a specific section of the script is causing an error. Which command can you temporarily add to halt the script's execution and inspect variables at that point?
- break
- pause
- halt
- debug
You can temporarily add the break command to halt the script's execution at a specific point during debugging. This allows you to inspect variables, control flow, and identify the source of the error. Once the debugging is complete, you can remove the break statement to resume normal script execution.
You're given a Dockerfile and need to create a Docker container from it. Which command would you use?
- docker compose
- docker build
- docker create
- docker run
To create a Docker container from a Dockerfile, you would use the "docker build" command. This command reads the instructions in the Dockerfile and generates a Docker image, which can then be used to create and run containers.
The ________ command in Linux provides a detailed view of the networking subsystem, including interfaces, IP addresses, and routing tables.
- ipconfig
- netstat
- ifconfig
- ip
The "ip" command in Linux provides a detailed view of the networking subsystem, including information about network interfaces, IP addresses, routing tables, and more. It is a versatile tool for configuring and managing network settings on a Linux system, making it an essential utility for network administrators and troubleshooters.
The __________ phase of the Linux boot process is where the system checks and mounts file systems.
- initrd
- GRUB
- LILO
- init
The initrd phase of the Linux boot process is where the system checks and mounts file systems. The initial RAM disk (initrd) is used during the boot process to provide an initial file system that's used as a temporary root file system before the actual root file system is mounted. It contains necessary drivers and tools to get the system to the point where it can transition to the real root file system.
Imagine you are setting up user permissions for a shared directory. You want the files created by users to inherit the group ownership of the directory. Which special permission would you set on the directory?
- SetGID
- SetUID
- Sticky bit
- Chmod
To ensure that files created within a directory inherit the group ownership of the directory, you would set the SetGID (Set Group ID) permission on the directory. This special permission allows new files to inherit the group ownership of the parent directory, which is often used for shared directories.
You are setting up a high-performance database server and require a file system that supports large files and high data integrity. Which file system would be most suitable?
- Ext4
- XFS
- Btrfs
- ZFS
ZFS (Zettabyte File System) would be most suitable for a high-performance database server. It supports large files, data integrity through features like checksums, and provides advanced data management capabilities, making it ideal for critical data storage needs.
The _________ daemon in Linux is responsible for assigning IP addresses to devices on a local network.
- DHCP
- DNS
- SSH
- HTTP
The DHCP (Dynamic Host Configuration Protocol) daemon in Linux is responsible for assigning IP addresses to devices on a local network. It automates the process of configuring network settings for devices, ensuring they receive the necessary IP address, subnet mask, gateway, and other parameters.
In Linux, the ________ command is used to create symbolic links between files.
- connect
- link
- ln
- symlink
In Linux, the "ln" command is used to create symbolic links between files. A symbolic link is a reference to another file or directory, allowing you to access the linked content from a different location in the file system.
You're troubleshooting a software installation issue on a CentOS machine. You suspect a required package might be missing. Which command helps you check if a specific package is installed?
- rpm -q
- dpkg -l
- yum info
- apt-cache policy
On CentOS, you can use the 'rpm -q' command to check if a specific package is installed. This command queries the RPM database to determine if the package is installed on the system.