What are the primary differences between the Data Link Layer (Layer 2) and the Network Layer (Layer 3) in the OSI model, particularly in terms of addressing and device types used at each layer?
Please sign-in to view the solution
How can we enable IP forwarding in the Linux kernel, and why is it disabled by default?
Please sign-in to view the solution
What are the advantages of using containers (e.g., Docker), virtual machines (VMs), and bare metal servers in a DevOps environment, particularly regarding deployment, scalability, and isolation?
Please sign-in to view the solution
Discuss the key features and components of the Linux operating system. Highlight its architecture, file system, and common commands used for system administration.
Please sign-in to view the solution
Describe the process of monitoring and identifying spikes in system resource usage. Mention the tools and techniques you would use to determine which process is causing the spikes.
Please sign-in to view the solution
What are the differences between stateless and stateful architectures, and how do they impact system design?
Please sign-in to view the solution
How can one design and implement a cron job in a Linux environment to automate a script that performs database backup daily at midnight, ensuring the process aligns with DevOps best practices for automation and monitoring?
Please sign-in to view the solution
What are the methods to determine the IP address of the Baseboard Management Controller (BMC) on a server, ensuring network security and access controls are adequately considered?
Please sign-in to view the solution
Explain the purpose and security implications of using SETUID (Set User ID upon execution) in Unix/Linux systems, particularly in the context of file permissions and how it can be used to elevate privileges for executing programs.
Please sign-in to view the solution
What is the size of an Ethernet (MAC) address in terms of bits?
Please sign-in to view the solution
How does the filesystem inode structure work, and what are the differences and use cases for directory entries, symbolic links, and hard links in a Linux environment?
Please sign-in to view the solution
Considering the need for secure communication over public networks, what are the best practices for distributing and protecting private keys to ensure confidentiality and integrity?
Please sign-in to view the solution
How would you write a Linux shell script to automatically create timestamped tarball backups of user home directories, store them in a specific directory, and log each operation's success or failure?
Please sign-in to view the solution
You are tasked with detecting and resolving various issues on an Ubuntu server. This includes identifying and fixing high CPU usage, troubleshooting web server issues, installing necessary packages, setting up a cron job for automated tasks, and writing a Python script to query an API. Describe in detail how you would approach and solve each of these tasks, including the commands and scripts you would use.
Please sign-in to view the solution
Write a Bash script that uses awk to extract and display the top 5 processes consuming the most memory on a Linux system. Include comments to explain each part of your script.
Please sign-in to view the solution
Describe the sequence of events that occur when a Linux machine starts up. Highlight the roles of BIOS/UEFI, bootloader, kernel, init system, and runlevels/targets in your explanation.
Please sign-in to view the solution
If you need to find all files which are similar in a directory, which command should you use? Additionally, explain how that command works internally.
Please sign-in to view the solution
If there is a long latency for a Java application running on a server, what could be the possible causes and how would you diagnose and resolve them?
Please sign-in to view the solution
What Linux commands would you use to see open ports and gather information from the /proc directory? Explain the purpose and usage of each command.
Please sign-in to view the solution
How did you use tcpdump? Explain the basic usage and provide examples of how to capture and analyze network traffic.
Please sign-in to view the solution
Explain the basic Linux file structure. What are the main directories and their purposes?
Please sign-in to view the solution
Describe common troubleshooting scenarios in Linux and provide examples of commands you would use in these scenarios.
Please sign-in to view the solution
How can you configure a Linux system to route traffic destined for a specific subnet through a different gateway, while keeping this routing rule isolated from the system's main routing table? Provide the commands necessary to create a custom routing table and add a route to this table that directs traffic for the subnet 192.168.2.0/24 to pass through the gateway at 192.168.1.2 via the eth0 network interface.
Please sign-in to view the solution
You have a server access log file access.log that follows this format:
10.0.0.1 - - [10/Jul/2023:11:45:07 +0000] "GET /index.html HTTP/1.1" 200 2326
10.0.0.2 - - [10/Jul/2023:11:45:08 +0000] "POST /submit.php HTTP/1.1" 403 182
10.0.0.3 - - [10/Jul/2023:11:45:09 +0000] "GET /about.html HTTP/1.1" 200 478
10.0.0.9 - - [10/Jul/2023:11:45:09 +0000] "GET /login.html HTTP/1.1" 200 223
Write an awk command to:
- The number of successful (HTTP status code 200) GET requests for each unique resource (e.g., /index.html, /about.html)
- Displaying the count and the resource path.
Please sign-in to view the solution
Explain the difference between a process and a thread in a Linux operating system. How do threads differ from processes in terms of resource allocation and execution?
Write a command to list all threads of a specific process using the process ID (PID).
Please sign-in to view the solution
Describe a scenario where a deadlock could occur in a system.
Write command to detect and trace a deadlock in a Linux system.
Please sign-in to view the solution
Explain the concept of context switching in the Linux operating system. Discuss how context switching impacts system performance and how the scheduler plays a role in managing the execution of processes and threads. Additionally, describe the role of modern concurrency constructs like mutexes and semaphores in minimizing the cost of context switches.
Also describe the steps you would take to diagnose the high context switching rate on the server.
Please sign-in to view the solution
Describe how the clone(), unshare(), and cgroups (control groups) system calls or mechanisms contribute to the underlying functionality of containerization?
Please sign-in to view the solution
In Unix/Linux systems, what is the difference between static and dynamic linking? Describe a scenario where you would prefer one over the other.
Please sign-in to view the solution
Explain how a Unix/Linux operating system handles memory overcommitment.
What mechanism it uses to decide which processes to terminate when the system runs out of physical memory and swap space (OOM condition)?
Please sign-in to view the solution
Design a distributed file storage system similar to Google Drive or Dropbox, capable of storing and retrieving large amounts of data across a distributed network. Consider the following aspects:
Please sign-in to view the solution
Using Python, how would you write a function to determine if two time intervals overlap, given their start and end times?
Please sign-in to view the solution
What processes and system calls are involved when executing the 'ls' command in a command line interface on a Linux system?
Please sign-in to view the solution
How would you diagnose and address high CPU usage on a Linux server, identifying potential bottlenecks and optimizing performance?
Please sign-in to view the solution
You are tasked with designing a secure database system for Yahoo's Paranoids team, focusing on a Linux environment hosted on AWS. The system should ensure data integrity and protection against cyber threats. Additionally, propose a machine learning approach to detect and mitigate potential security breaches. Describe your approach, the technologies you would use, and the steps involved in the implementation.
Please sign-in to view the solution
Design a secure database system for a cybersecurity team, focusing on a Linux environment hosted on AWS. The system must ensure data integrity and protection against cyber threats. Additionally, propose a machine learning solution to detect and mitigate potential security breaches. Detail your approach, the technologies you would use, and the steps involved in the implementation.
Please sign-in to view the solution
Explain basic Linux commands, focusing on how to manage background tasks. Include examples to illustrate their usage.
Please sign-in to view the solution