What is the primary protocol used by NFS for sharing files?
- NFS
- SMB
- HTTP
- FTP
The primary protocol used by NFS (Network File System) for sharing files is NFS itself. NFS is a network protocol specifically designed for sharing files and directories among networked computers. It is commonly used in Unix and Linux environments.
Which of the following is a valid way to declare a variable in Bash?
- myVar=42
- $myVar = 42
- var myVar = 42
- set myVar 42
A valid way to declare a variable in Bash is by using the format 'myVar=42'. This assigns the value 42 to the variable 'myVar'. The '$' symbol is used to reference the variable.
What is the purpose of the $? variable in a shell script?
- It represents the process ID of the script.
- It stores the script's exit status.
- It contains the script's standard input.
- It holds the current working directory of the script.
The purpose of the $? variable in a shell script is to store the script's exit status. A value of 0 typically indicates success, while non-zero values indicate different types of errors or failures. This is essential for error checking and script control flow.
To see the history of commands executed in the terminal, you would use the ________ command.
- history
- list
- log
- trace
To see the history of commands executed in the terminal, you would use the "history" command. This command displays a list of previously executed commands, making it easier to re-run or recall commands that were used in the past.
Which phase of the Linux boot process is responsible for hardware detection and initial setup?
- Init
- BIOS/UEFI
- GRUB
- Initrd
The Initrd (Initial RAM Disk) phase of the Linux boot process is responsible for hardware detection and initial setup. It loads essential modules and drivers needed to mount the root file system and continue the boot process.
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.
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.
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.
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.