Which Linux distribution focuses primarily on security and is often used for penetration testing?

  • CentOS
  • Fedora
  • Kali Linux
  • Ubuntu
Kali Linux is a Linux distribution that focuses primarily on security and is widely used for penetration testing and ethical hacking. It comes pre-installed with a variety of security tools and is maintained by Offensive Security.

A colleague informs you that they're unable to access a service on a remote server. You suspect it might be a firewall issue. How would you list the current firewall rules to diagnose the issue?

  • iptables -L
  • firewall-cmd --list-all
  • ufw status
  • netstat -an
To list the current firewall rules on a Linux system using iptables, you can use the command iptables -L. This command will display the current firewall rules, allowing you to diagnose potential issues and ensure that the necessary ports are open for the service your colleague is trying to access.

When you want to continue to the next iteration of a loop without executing the subsequent commands in the current iteration, you use the __________ command.

  • continue
  • break
  • exit
  • return
When you want to continue to the next iteration of a loop without executing the subsequent commands in the current iteration, you use the **continue** command. It allows you to skip the current iteration and proceed to the next iteration of the loop.

Which column in the top command output represents the percentage of CPU usage for a process?

  • %CPU
  • %MEM
  • PID
  • COMMAND
In the top command output, the %CPU column represents the percentage of CPU usage for each process. This column shows the proportion of CPU resources that a process is currently utilizing.

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.

How do you denote the start of a block of code in a Bash if statement?

  • then
  • start
  • begin
  • do
In a Bash if statement, you denote the start of a block of code with the keyword then. This is where the code to be executed if the condition is true begins. It's important to follow then with the code that should be executed when the condition is met.

In the context of iptables, what is the purpose of the INPUT chain?

  • Processing incoming packets destined for the local system
  • Forwarding packets between network interfaces
  • Handling outgoing packets from the local system
  • Redirecting traffic to a specific port
In the context of iptables, the INPUT chain is responsible for processing incoming packets destined for the local system. This is where rules for packets directed at the firewall-hosted services and applications are defined, allowing or blocking them based on the rules configured in the chain.

After a recent system update, your Linux server fails to boot properly. It seems to hang after the bootloader phase. Where would you begin troubleshooting to identify the issue?

  • Initiate a rescue mode
  • Check the system logs in /var/log
  • Run a hardware diagnostic tool
  • Reinstall the operating system
When a Linux server fails to boot after an update, you should begin troubleshooting by checking the system logs in /var/log. Specifically, you can look at logs such as /var/log/syslog and /var/log/boot.log to identify any error messages or issues that occurred during the boot process.

What is the first program run by the Linux kernel when it starts?

  • init
  • shell
  • bootloader
  • BIOS/UEFI
The first program run by the Linux kernel when it starts is typically the init program (or its modern replacement, such as systemd). Init is responsible for initializing the system, starting services, and setting up the user environment.

If you need to view the route taken by packets to reach a network host, which command would you use?

  • traceroute
  • ifconfig
  • netstat
  • ping
To view the route taken by packets to reach a network host, you would use the traceroute command. Traceroute provides a detailed path analysis of how packets traverse the network, including the IP addresses of each hop and response times. It's a valuable tool for diagnosing network issues.