How can you generate a new pair of public and private keys for SSH authentication?

  • ssh-keygen
  • ssh-copy-id
  • ssh-add
  • ssh-agent
To generate a new pair of public and private keys for SSH authentication, you can use the ssh-keygen command. This command allows you to create key pairs, specify key types, and set options like key strength. After generating the keys, you can use them for secure SSH authentication.

Which command in Bash is used for multi-way branching?

  • case
  • if
  • for
  • while
In Bash scripting, the case command is used for multi-way branching. It is often used when you need to evaluate a variable or expression and take different actions based on its value. It's a powerful tool for creating conditional logic in scripts.

The ________ command in Linux displays information about the group membership of a user.

  • groups
  • users
  • id
  • whoami
The "groups" command in Linux displays information about the group membership of a user. It lists all the groups a user is a member of. This can be helpful for checking a user's group associations.

For performance tuning, the ________ command provides a real-time view of the system's current network connections.

  • netstat
  • ifconfig
  • ssh
  • ps
For performance tuning, the "netstat" command provides a real-time view of the system's current network connections. Netstat displays information about network interfaces, routing tables, masquerade connections, and more. It's a valuable tool for diagnosing network issues and monitoring network activity.

Which directory in Linux contains system configuration files?

  • /etc
  • /home
  • /opt
  • /var
The /etc directory in Linux contains system configuration files. These files store configuration settings for various system components and applications.

Which command in a shell script is used to break out of a loop prematurely?

  • break
  • continue
  • exit
  • return
The break command in a shell script is used to break out of a loop prematurely. When encountered, it immediately exits the loop and continues with the next statement after the loop. This is handy for situations where you want to exit a loop based on a specific condition.

A colleague is trying to access a directory shared via NFS from a Linux machine but is facing permission issues. Which file on the server would you check to verify the permissions and access for the shared directory?

  • /etc/exports
  • /etc/fstab
  • /etc/nfsd.conf
  • /etc/permissions
To verify permissions and access for a directory shared via NFS, you would check the /etc/exports file on the NFS server. This file specifies the directories that are shared and the permissions granted to clients.

In the context of user authentication, what is a "salt" used for?

  • Adding randomness to a password before hashing
  • Encrypting user passwords
  • Verifying the user's identity
  • Generating secure tokens
In user authentication, a "salt" is used to add randomness to a password before hashing. This helps protect against common attacks like rainbow table attacks and ensures that even the same password will have different hash values due to the unique salt.

In Docker, a _________ is a lightweight, stand-alone, executable software package that includes everything needed to run a piece of software.

  • Container
  • Image
  • Virtual Machine
  • Repository
In Docker, an "image" is a lightweight, stand-alone, executable software package that includes everything needed to run a piece of software. Docker containers are created from these images, allowing you to run applications in an isolated environment.

The Linux tool __________ allows administrators to view and set system and kernel parameters at runtime.

  • sysctl
  • top
  • ls
  • nano
The Linux tool sysctl allows administrators to view and set system and kernel parameters at runtime. It's a powerful utility for fine-tuning and configuring various aspects of the Linux kernel to optimize performance and behavior.