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.
AppArmor policies are commonly defined using which type of files?
- Profiles
- Blueprints
- Rules
- Directories
AppArmor policies are commonly defined using profiles. These profiles specify the access controls for individual applications or processes, allowing you to confine their behavior and enhance system security.
The _________ command is used to display the disk usage of files and directories.
- df
- du
- space
- usage
The "du" (disk usage) command is used to display the disk usage of files and directories in Linux. It provides information about the space consumed by each file or directory, helping you manage disk space effectively.
Which command-line tool is used to view real-time system processes in Linux?
- top
- ls
- cat
- ps
The correct answer is "top." The top command is a real-time system monitoring tool in Linux that provides information about system processes, CPU usage, memory usage, and more. It allows users to monitor and manage running processes interactively.
You've been given a task to find all occurrences of the word "error" in a directory containing numerous log files. Which command would you primarily use for this search?
- grep
- find
- sed
- awk
To find all occurrences of the word "error" in a directory with log files, you would primarily use the grep command. grep is a powerful tool for searching text and regular expressions in files and can be used to quickly locate specific content, like error messages, within files.
Which command is used to send ICMP echo requests to test network connectivity?
- ping
- ifconfig
- traceroute
- netstat
The correct command to send ICMP echo requests to test network connectivity is 'ping.' When you run 'ping' followed by an IP address or hostname, it sends ICMP echo requests to that address and waits for responses, allowing you to determine if the network connection is working.
Which symbol is used in Bash scripting to execute a command?
- $
- %
- #
- @
In Bash scripting, the '$' symbol is used to execute a command. When you prefix a command with '$', it's interpreted as a variable and executed. For example, $ ls would execute the 'ls' command.