Rakesh Jain Profile picture
Oct 4 28 tweets 5 min read Twitter logo Read on Twitter
Linux Interview Guide!

A thread with 20+ interview questions for mid-to-advanced level Linux administrators🐧👇 Image
1/20 Q: What is the purpose of the 'ulimit' command in Linux?

A: 'ulimit' is used to set or display user-level resource limits. It can control processes' resource consumption, like memory or file descriptors. #LinuxAdmin #InterviewQuestions
2/20 Q: Explain the difference between 'hard' and 'soft' limits in ulimit.

A: Hard limits are the maximum values a user can set, while soft limits can be set and changed by the user within the hard limit boundaries. #Linux #SysAdmin
3/20 Q: Explain the purpose of the 'chroot' command in Linux.

A: 'chroot' changes the apparent root directory for a process. It's often used for creating isolated environments or for system recovery purposes. #LinuxAdmin #Security
4/20 Q: How can you check which process is using a specific port in Linux?

A: The 'netstat' or 'ss' command can display a list of network connections, including the processes associated with specific ports. #LinuxNetworking #SysAdmin
5/20 Q: What is SELinux, and how does it enhance Linux security?

A: SELinux (Security-Enhanced Linux) is a security framework that enforces mandatory access controls, adding an extra layer of security by limiting access to resources. #Security #Linux
6/20 Q: Explain the purpose of 'strace' and 'ltrace' commands in Linux.

A: 'strace' traces system calls made by a process, while 'ltrace' traces library calls. They are helpful for debugging and profiling. #Debugging #LinuxTools
7/20 Q: How do you find and kill a process by its name in Linux?

A: You can use 'pgrep' to find the process ID (PID) by name and 'kill' or 'killall' to terminate it. Be cautious when killing processes. #LinuxCommands #SysAdmin
8/20 Q: What is 'systemd' in Linux, and how does it differ from 'init'?

A: 'systemd' is a modern init system and service manager, replacing traditional 'init'. It provides better control and management of services and dependencies. #Systemd #Linux
9/20 Q: What is 'swappiness' in Linux, and how can you adjust it?

A: 'Swappiness' is a kernel parameter that controls the tendency to use swap space. You can adjust it with 'sysctl' or by modifying '/etc/sysctl.conf'. Lower values reduce swapping. #LinuxMemory #SysAdmin
10/20 Q: Explain the concept of 'OOM Killer' in Linux.

A: The Out-of-Memory (OOM) Killer is a kernel feature that terminates processes when the system runs out of memory to prevent a complete system freeze. It prioritizes processes based on criteria. #LinuxOOM #SysAdmin
11/20 Q: What is a 'cgroup' in Linux, & how does it help in process mgmt?

A: Control groups (cgroups) are a kernel feature that manages & limits system resource usage for processes. They help allocate CPU, memory, & other resources to groups of processes. #LinuxCgroups
12/20 Q: What is a 'kernel panic' in Linux, and how do you troubleshoot it?

A: A kernel panic is a critical error that causes the kernel to halt. To troubleshoot, review the panic message, check system logs, and analyze hardware or driver issues. #KernelPanic #Troubleshooting
13/20 Q: Explain the 'dmesg' command in Linux and its role in kernel troubleshooting.

A: 'dmesg' displays kernel messages, including boot-time diagnostics and hardware-related information. It's helpful for identifying hardware issues and driver problems. #LinuxKernel #SysAdmin
14/20 Q: How can u update the Linux kernel, and what precautions should u take?

A: Kernel updates can be done using package managers like 'yum' or 'apt'. Before updating, ensure backups, & understand potential compatibility issues with existing drivers & modules. #KernelUpdate
15/20 Q: Explain 'strace' & 'gdb' in the context of kernel troubleshooting.

A: 'strace' traces system calls, while 'gdb' is a debugger for user-space processes. In kernel troubleshooting, tools like 'ftrace' & 'kgdb' are used for kernel-level debugging. #KernelDebugging
16/20 Q: Search for all occurrences of the word "error" in a set of log files located in the /var/log directory & its subdirs.

A: You can use the following grep cmd:
grep -r "error" /var/log. This will recursively search for "error" in all files within /var/log and its subdirs.
17/20 Q: U hv a CSV file named data.csv with columns: Name, Age, & City. Print only the names of people who r older than 30 yrs?

A: U can use this awk cmd:
awk -F, '$2 > 30 {print $1}' data.csv
It sets the field separator as a comma & prints the names of people with an age > 30
18/20 Q: Explain how to use 'find' to locate & delete files older than a certain date.

A: To find & delete files older than a specific date, use 'find' with '-mtime' & '-exec' options.
For eg: 'find /path/to/search -type f -mtime +7 -exec rm {} ;'

#LinuxTips #FileManagement
19/20 Q: What is 'kdump' in Linux, and how does it aid in kernel debugging?

A: 'kdump' is a mechanism that captures kernel crash dumps when a system experiences a kernel panic. It helps in post-mortem analysis to diagnose and fix kernel issues. #Kdump #KernelDebugging
20/20 Q: What are Linux namespaces?

A: Linux namespaces provide resource/processes isolation, making them appear isolated. dey r crucial for containers like Docker.

In Docker, namespaces include PID for process isolation, nw for nw separation, & mount for filesystem isolation.
Bonus Time 😍💰🔥 Image
1/5 Q: Explain the 'journalctl' command in Linux, & how can it be used to view system logs effectively?

A: 'journalctl' queries & displays systemd journal logs, providing detailed system info & log filtering capabilities. Useful for troubleshooting & monitoring. #LinuxLogs
2/5 Q: How can u schedule recurring tasks in Linux using 'cron'? Share an eg of a cron job that runs every day at midnight.

A: 'cron' is a powerful job scheduler. To run a task daily at midnight, add this line to the crontab:
0 0 * * * /path/to/cmd.

It runs at 00:00 every day.
3/5 Q: Explain the 'nohup' cmd. How can it be used to run processes dat persist even after logging out of a remote session?

A: It stands for 'no hang up' & is used to run processes in the background, immune to hang-ups (session termination).

Use it like this: 'nohup command &'
4/5 Q: What is the role of the 'initrd' (initial ramdisk) in the boot process? Why is it essential, & how is it created?

A: 'initrd' is a temp file system used during the early boot process to load essential drivers & modules. It's created with tools like 'mkinitrd' or 'dracut.'
5/5 Q: What is 'kexec', & how does it differ from a traditional reboot? When to use 'kexec' for booting?

A: 'kexec' allows for a faster, kernel-only reboot w/o going through the entire BIOS & bootloader process. It's useful for debugging or when u need a quick kernel switch.
Repost the thread if you find it useful. Thanks!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Rakesh Jain

Rakesh Jain Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @devops_tech

Oct 6
Kubernetes Interview Guide!

A thread with 20+ mid-level to advanced Kubernetes interview questions with concise answers 🚢⚓️ 👇 Image
1/ 🚀 Q: What is Kubernetes and why is it essential for container orchestration?

A: Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications, ensuring high availability and reliability.
2/ 🛠️ Q: Name the key components of a Kubernetes cluster.

A: A Kubernetes cluster consists of the Master (API Server, Controller Manager, Scheduler, etcd) and Nodes (where containers run).

#Kubernetes #Interview
Read 32 tweets
Oct 5
Docker Interview Guide!

A thread with 20+ mid-level to advanced Docker interview questions and answers 🐳 👇
1/ What is a Docker Compose, and why is it useful? 🚢

A. Docker Compose is a tool for defining and running multi-container Docker applications. It's useful for managing complex applications with multiple services, enabling easy orchestration. #Docker #Interview
2/ What is Docker Swarm, & how does it differ from Kubernetes? 🐝

A. Docker Swarm is Docker's native orchestration tool for managing clusters of Docker hosts. Kubernetes is a more robust orchestration system that can manage containers from different providers. #Docker #Interview
Read 31 tweets
Oct 3
20 Linux administration tips and tricks to help you excel in a DevOps career!

A journey from Linux Admin to DevOps Engineer 🛣️ Image
1/20: 🐧 Master the Command Line:

Get comfortable with the Linux command line - it's your Swiss Army knife for DevOps tasks. Learn basic commands like ls, cd, cp, mv, cat, echo and more.
2/20: 📁 File Permissions:

Understand file permissions (chmod), ownership (chown), and groups. Managing access control is crucial in a DevOps role.
Read 30 tweets
Oct 2
🐳 Docker Architecture Simplified 🏗️

Breaking down Docker's architecture! A Thread 👇 PS: https://www.oreilly.com/api/v2/epubs/9781788992329/files/assets/7310b2e5-4a3d-4ee4-ad85-ee534de55540.png
🐳 Docker Architecture🏗️

At its core, Docker is like magic for packaging and running apps. But how does it work?

Let's dive into its architecture step by step!
🏭 1. Docker Engine 🚀

Docker Engine is the heart of Docker. It has two major components:

Docker Daemon: Runs in the background, managing containers.
Docker CLI: A command-line tool to interact with Docker.

Example: To run a web server, you use docker run -d -p 80:80 nginx.
Read 18 tweets
Sep 30
Git Rebase vs Git Merge!

A debate which can be puzzling for many. Let's explore it with practical examples.

A Thread 👇 Image
1/ 📌 Git Merge vs. Git Rebase 🔄

Let's dive into these two essential Git operations with practical examples. 💡 #Git #VersionControl
2/ Scenario 1 - Git Merge 🔄

Imagine you're working on a team project with a shared feature branch. You've just finished your feature. 🛠️ Now, let's use Git Merge.
Read 30 tweets
Sep 29
Load Balancer vs Reverse Proxy vs API Gateway

A Thread 🧵👇 PS: https://www.devopsschool.com/blog/wp-content/uploads/2023/09/image-576.png
1/ 💡 Let's dive into the world of networking and infrastructure components: Load Balancer, Reverse Proxy, and API Gateway.

They play distinct roles in managing web traffic. 🌐
2/ 🔄 Reverse Proxy:
A reverse proxy is like a middleman between clients and servers. It handles requests on behalf of servers, often providing benefits like security, load balancing, and caching.
Example: Nginx, Apache.
Read 31 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(