Which of the following is a common method to secure SSH beyond just password authentication?
- Enforcing key-based authentication
- Using a weak password
- Disabling SSH
- Keeping SSH configuration default
A common method to secure SSH beyond just password authentication is to enforce key-based authentication. This method increases security by requiring users to possess a private key in addition to their password, making it much more difficult for unauthorized users to access the system.
You are writing a script that requires parsing command-line options with both short and long formats. Which command would you likely use?
- getopts
- getopt
- parseargs
- getoptlong
You would likely use the getopt command to parse command-line options with both short and long formats. getopt is a versatile command for handling command-line arguments and options in shell scripts, allowing you to specify both short and long options.
Which virtualization solution is directly supported in the Linux kernel?
- KVM
- VirtualBox
- VMware
- Xen
KVM, or Kernel-based Virtual Machine, is directly supported in the Linux kernel. It's a full virtualization solution that leverages hardware virtualization extensions to provide excellent performance for virtual machines on Linux.
AppArmor profiles, when enforced, restrict system access based on ________ paths.
- file system
- network
- environment
- system call
AppArmor profiles, when enforced, restrict system access based on file system paths. These profiles define what files and directories a program can access, adding an extra layer of security.
Which special variable in a shell script represents the script's name?
- $0
- $1
- $script
- $name
The special variable $0 in a shell script represents the script's name. It allows you to access the name of the currently executing script. This can be useful for self-referencing within the script or for providing a script name in error messages or logs.
Which component of the Linux boot process loads the main system kernel?
- Bootloader
- Shell
- init
- BIOS/UEFI
The component of the Linux boot process that loads the main system kernel is the bootloader. The bootloader, such as GRUB, is responsible for locating the kernel image on the disk and passing control to it during the boot process.
In Linux, the _________ command is used to change a user's password.
- passwd
- usermod
- chmod
- pwd
In Linux, the passwd command is used to change a user's password. Users can execute this command to update their login credentials securely.
In Debian-based systems, the ________ command is used to search for packages.
- apt-cache search
- yum install
- dnf update
- pacman -Ss
In Debian-based systems, the "apt-cache search" command is used to search for packages. This command allows users to find packages in the distribution's repositories based on keywords or descriptions.
What is the primary purpose of a VPN in a Linux environment?
- Securing network communication
- Running web servers
- Managing system files
- Creating user accounts
The primary purpose of a VPN (Virtual Private Network) in a Linux environment is to secure network communication. VPNs create encrypted tunnels over public networks, ensuring data privacy and security, which is crucial for remote access and protecting sensitive information.
You notice that a remote server is not accessible via its hostname, but it's accessible via its IP address. Which configuration file would you inspect first?
- /etc/hosts
- /etc/hostname
- /etc/resolv.conf
- /etc/network/interfaces
If a remote server is not accessible via its hostname, checking the /etc/hosts file is a good starting point. This file contains mappings of hostnames to IP addresses, and if there's an issue with name resolution, it's often related to this file.