The command used to resize the filesystem on a partition in Linux is _________.
- resize2fs
- mv
- chmod
- cp
The command used to resize the filesystem on a partition in Linux is resize2fs. This command is used after resizing a partition to adjust the filesystem to use the newly available space.
A user reports that their application occasionally freezes. You suspect it's due to the application waiting for some I/O operations to complete. Which state might the process be in during these freezes?
- D (Uninterruptible Sleep)
- R (Running)
- S (Sleeping)
- Z (Zombie)
During an I/O operation, a process might enter the "D" state, which stands for Uninterruptible Sleep. This state indicates that the process is waiting for a resource to become available, and it cannot be interrupted. It's often associated with I/O-related delays or problems.
The __________ command in Linux allows mounting of NFS shared directories.
- mount
- nfs
- fstab
- showmount
The mount command in Linux allows mounting of NFS (Network File System) shared directories. You can use this command to make remote file systems accessible on your local system through NFS.
To iterate over a range of numbers in a loop, one might use the seq command combined with the _________ loop.
- for
- while
- until
- numeric
To iterate over a range of numbers in a loop, one might use the seq command combined with the for loop. The seq command generates a sequence of numbers, and the "for" loop can be used to loop through these numbers, allowing you to perform actions on each number within the specified range. This is a common technique in shell scripting for tasks like counting or iterating through numerical data.
What is the primary purpose of the /home directory in Linux?
- Storing system binaries
- Storing system configuration files
- Storing temporary files
- Storing user home directories
The primary purpose of the /home directory in Linux is to store user home directories. Each user on a Linux system typically has a subdirectory within /home where their personal files and settings are stored.
During the boot process, the ________ is responsible for loading the kernel into memory.
- bootloader
- init system
- BIOS/UEFI
- kernel
During the boot process, the BIOS/UEFI (Basic Input/Output System/Unified Extensible Firmware Interface) is responsible for loading the kernel into memory. The BIOS/UEFI is the firmware that initializes the hardware and starts the boot process. It locates the bootloader, which, in turn, loads the kernel into memory to start the operating system.
You've been tasked to lockdown a specific application on an Ubuntu server. You decide to use a tool that restricts programs to a limited set of resources. Which tool would you primarily utilize?
- AppArmor
- SELinux
- UFW
- Grsecurity
To lockdown a specific application on an Ubuntu server by restricting it to a limited set of resources, you would primarily utilize "AppArmor." AppArmor is a Mandatory Access Control (MAC) framework that allows you to define and enforce application-specific security policies, confining applications to their designated resources and actions.
The default field separator for operations like splitting strings is determined by the _________ built-in variable.
- IFS
- SHELL
- PATH
- PWD
The default field separator for operations like splitting strings is determined by the IFS (Internal Field Separator) built-in variable. The IFS variable defines how the shell separates words when it parses strings, making it a crucial component for tasks like parsing CSV files or text processing in scripts.
In a shell script, if you want to refer to the last argument passed, you would use the _________ special variable.
- $!
- $@
- $?
- $_
In a shell script, you would use the $_ special variable to refer to the last argument passed. This variable holds the last argument to the last command that was executed.
You've just set up a new Linux server and need to install a web server. Which package management command would you likely use in a Debian-based system?
- apt-get
- yum
- dnf
- pacman
In a Debian-based system, such as Ubuntu, you would likely use the 'apt-get' command to install packages. The 'apt-get' command is used for package management and is specifically designed for Debian-based distributions.