The ________ statement in Bash allows for decision-making and executing different blocks of code based on a condition.
- if
- for
- while
- switch
The if statement in Bash allows for decision-making. It enables you to execute different blocks of code based on whether a specified condition is true or false. You can use if, elif, and else to handle multiple conditions.
To ensure a consistent policy across machines, SELinux policies can be stored in _________ format.
- YAML
- XML
- Binary
- Text
To ensure a consistent policy across machines, SELinux policies can be stored in Text format. The SELinux policy language is human-readable and editable in text format, making it easier to understand and manage security policies.
SELinux operates under what primary modes?
- Enforcing and Permissive
- Passive and Active
- Standard and Enhanced
- Basic and Advanced
SELinux operates under two primary modes: Enforcing and Permissive. In Enforcing mode, SELinux actively enforces security policies and denies any actions that violate these policies. In Permissive mode, SELinux logs policy violations but doesn't actively deny them, making it a useful mode for policy debugging.
Which file defines the default settings when a new user account is created?
- /etc/default/user.conf
- /etc/useradd.conf
- /etc/default/useradd
- /etc/login.defs
The file that defines the default settings when a new user account is created in Linux is /etc/login.defs. This file contains various parameters and settings related to user account creation, password policies, and more. Modifying this file can affect the behavior of the useradd and adduser commands.
During the Linux boot process, which script initializes the system settings?
- init
- rc.local
- init.d
- systemd
During the Linux boot process, systemd initializes system settings. Systemd is a modern init system and service manager that has become the standard in many Linux distributions. It manages the startup and control of system services and settings, replacing the older init system.
Which file in Linux contains the hashed password information for users?
- /etc/shadow
- /etc/passwd
- /etc/group
- /etc/login
In Linux, the hashed password information for users is stored in the /etc/shadow file. This file contains encrypted password hashes and other security-related information, such as password expiration dates, for user accounts. It is essential for protecting user credentials.
Which service in Linux is responsible for resolving domain names to IP addresses?
- DNS (Domain Name System)
- DHCP (Dynamic Host Configuration Protocol)
- SNMP (Simple Network Management Protocol)
- SMTP (Simple Mail Transfer Protocol)
The service responsible for resolving domain names to IP addresses in Linux is the DNS (Domain Name System). DNS servers maintain a database of domain name-to-IP address mappings and help in translating human-readable domain names to numeric IP addresses, enabling network communication.
To compare two numbers in Bash and check if they're equal, you'd use the ________ operator within a conditional statement.
- ==
- =
- !=
- <>
To compare two numbers in Bash and check if they're equal, you'd use the == operator within a conditional statement. The == operator is used for equality comparison in Bash.
The ________ file in Linux is used to configure network interfaces and is typically found in the /etc/network/ directory.
- interfaces
- network.conf
- ifcfg
- resolv.conf
The file in Linux used to configure network interfaces and typically found in the /etc/network/ directory is the "interfaces" file. This file contains information about network interfaces and their settings, allowing you to define and manage network connections on your system.
The ________ mechanism in Linux allows processes to communicate with each other, commonly used in IPC.
- Inter-Process Communication (IPC)
- Inter-System Communication (ISC)
- Inter-Process Messaging (IPM)
- Intra-Process Communication (IPC)
The "Inter-Process Communication (IPC)" mechanism in Linux allows processes to communicate with each other. IPC is essential for processes to exchange data and synchronize their activities, and it's commonly used in various applications and services in Linux.