Production Eng
Production Eng
Linux systems
Commands
Networking
- network protocols, IP addressing, subnetting
- UNIX and TCP/IP network fundamentals
- network (TCP vs. UDP, TCP control bits, etc.
- Apache, Memcached, Squid, MySQL, NFS, DHCP, NTP, SSH, DNS, and
SNMP
- DNS protocol
- type www.google.com to Linux terminal, according the Linux
internals”. Starting from PATH variables i started to explain. The
answer was covering how a process is run at the Linux shell, fork
command, process id, even strace commands that you had seen
when you executed the telnet command. I was not sure about all
the strace commands but fork was enough for him. Then network
connection explanation started. DNS resolution, TCP handshake,
SYN package sending, reason of TCP handshaking, details of it.
The last thing we were talking was where the file descriptor is
created for the TCP connection.
Scripting:
1. two CSV data files—one of which will contain statistics about
dinosaurs, and the second will contain additional data. You will then be
asked to process the data and print the names of dinosaurs from fastest
to slowest.
2. Read two CSV files, calculate based on the data in these files.
3. Write a script that connects to 100 hosts, searches for a specific process, and sends an email with a
report.
4 Read data from an API call in JSON format, organise it as requested.
5. Read an input file, parse the strings, and count the occurrences of email addresses.
• Given the formula: speed = ((STRIDE_LENGTH / LEG_LENGTH) - 1) *
SQRT(LEG_LENGTH * g) (where g = 9.8 m/s^2, the gravitational constant), write a program
to read data files, and print the names of bipedal dinosaurs from fastest to slowest.
6.
#Linux_Commands:-
1.
h *Check server uptime*: `uptime`
2. *Check disk usage*: 'df -h`
a
3. *Check memory usage*: 'free -m`
s
4. *Check CPU usage*: 'top' or 'htop`
5.
h *Check logs*: `tail -f /var/log/syslog
6. *Check network connections*: 'netstat -tinp
t7. *Check running processes*: 'ps aux'
a
8. *Kill a process*: 'kill <pid>`
9.
g *Check file permissions*: `Is -l`
10. *Change file permissions*: 'chmod <permissions> <file>`
#Docker_Commands:-
h
1.
a *List running containers*: 'docker ps`
2. *Start a container*: 'docker start <container_name>`
s
3. *Stop a container*: 'docker stop <container_name>'
h
4. *Remove a container*: 'docker rm <container_name>`
5.
t *List all containers*: 'docker ps -a
6. *Pull an image*: 'docker pull <image_name>`
a
g
7. *Run a container*: 'docker run -d <image_name>`
8. *Exec into a container*: 'docker exec -it <container_name> /bin/bash
9. *Check container logs*: 'docker logs <container_name>`
10. *Build a Docker image*: 'docker build -t <image_name>.'
#Kubernetes_Commands:-
h
1.
a *Get nodes*: 'kubectl get nodes'
2. *Get pods*: 'kubectl get pods
s
3. *Get deployments*: 'kubectl get deployments
h
4. *Get services*: 'kubectl get svc
5.
t *Create a deployment*: 'kubectl create deployment <deployment_name> --
image=<image_name>`
a
6. *Apply a configuration*: 'kubectl apply -f <config_file>
g
7. *Get pod logs*: 'kubectl logs <pod_name>'
8. *Exec into a pod*: 'kubectl exec -it <pod_name> --/bin/bash
9. *Scale a deployment*: 'kubectl scale deployment
<deployment_name> --replicas=<replica_count>`
10. *Delete a pod*: 'kubectl delete pod <pod_name>`
#Git_Commands:-
h
1.
a *Clone a repository*: 'git clone <repository_url>
2. *Check repository status*: 'git status`
s
3. *Add changes*: 'git add <file_name>`
h
4. *Commit changes*: 'git commit -m "<commit_message>""
5.
t *Push changes*: 'git push <remote_name> <branch_name>`
6. *Pull changes*: 'git pull <remote_name> <branch_name>`
a
7. *Check commit history*: 'git log
g
8. *Create a new branch*: 'git branch <branch_name>'
9. *Switch to a branch*: 'git checkout <branch_name>`
10. *Merge a branch*: 'git merge <branch_name>`
Linux commands:
🔹 File & Directory Management
📂 ls – List files and directories
📂 cd – Change directory
📂 pwd – Print working directory
📂 mkdir – Create a new directory
📂 rm -r – Remove files or directories
📂 cp – Copy files or directories
📂 mv – Move or rename files
🔹 File Content & Editing
📜 cat – View file contents
📜 nano / vim – Edit files in the terminal
📜 head – Show first 10 lines of a file
📜 tail – Show last 10 lines of a file
📜 grep – Search for a pattern in a file
📜 find – Locate files based on name or properties
🔹 User & Permission Management
👤 whoami – Show current user
👤 who – List logged-in users
👤 chmod – Change file permissions
👤 chown – Change file ownership
👤 passwd – Change user password
🔹 Process & System Monitoring
⚙️top – Display running processes
⚙️ps – View active processes
⚙️kill – Terminate a process
⚙️htop – Interactive process viewer
⚙️df -h – Check disk usage
⚙️free -m – Check RAM usage
🔹 Networking Commands
🌍 ifconfig / ip a – Show network interfaces
🌍 ping – Test network connectivity
🌍 netstat -tulnp – Show active ports
🌍 curl / wget – Fetch data from URLs
🌍 scp – Secure copy files between systems
🔹 Package Management
📦 apt (Debian/Ubuntu) – apt update && apt upgrade
📦 yum (RHEL/CentOS) – yum install <package>
📦 dnf (Fedora) – dnf install <package>
📦 snap – Install and manage snap packages
🔹 Logs & Debugging
📝 dmesg – View system logs
📝 journalctl – View systemd logs
📝 tail -f /var/log/syslog – Monitor logs in real time
🔹 Container & DevOps Commands
🐳 docker ps – List running containers
🐳 docker images – Show available Docker images
🐳 kubectl get pods – List Kubernetes pods
🐳 systemctl restart <service> – Restart a system service
#Linux_Commands:-
h
1.
a Check server uptime: “uptime”
2. Check disk usage: `df -h`
s
3. Check memory usage: `free -m`
h
4. Check CPU usage: `top` or `htop`
5.
t Check logs: `tail -f /var/log/syslog`
6. Check network connections: `netstat -tlnp`
a
7. Check running processes: `ps aux`
g
8. Kill a process: `kill <pid>`
9. Check file permissions: `ls -l`
10.Change file permissions: `chmod <permissions> <file>`
h
#Docker_Commands:-
a List running containers: `docker ps`
1.
2.
s Start a container: `docker start <container_name>`
h
t
a
g
3. Stop a container: `docker stop <container_name>`
4. Remove a container: `docker rm <container_name>`
5. List all containers: `docker ps -a`
6. Pull an image: `docker pull <image_name>`
7. Run a container: `docker run -d <image_name>`
8. Exec into a container: `docker exec -it <container_name> /bin/bash`
9. Check container logs: `docker logs <container_name>`
10.Build a Docker image: `docker build -t <image_name> .`
#Kubernetes_Commands:-
h
1.
a Get nodes: `kubectl get nodes`
2. Get pods: `kubectl get pods`
s
3. Get deployments: `kubectl get deployments`
h
4. Get services: `kubectl get svc`
5.
t Create a deployment: `kubectl create deployment <deployment_name> --
image=<image_name>`
a
6. Apply a configuration: `kubectl apply -f <config_file>`
g
7. Get pod logs: `kubectl logs <pod_name>`
8. Exec into a pod: `kubectl exec -it <pod_name> -- /bin/bash`
9. Scale a deployment: `kubectl scale deployment <deployment_name> --
replicas=<replica_count>`
10.Delete a po: `kubectl delete pod <pod_name>`
#Git_Commands:-
h
1.
a Clone a repository: `git clone <repository_url>`
2. Check repository status: `git status`
s
3. Add changes: `git add <file_name>`
h
4. Commit changes: `git commit -m "<commit_message>"`
5.
t Push changes: `git push <remote_name> <branch_name>`
6. Pull changes: `git pull <remote_name> <branch_name>`
a
7. Check commit history: `git log`
g
8. Create a new branch: `git branch <branch_name>`
9. Switch to a branch: `git checkout <branch_name>`
10.Merge a branch: `git merge <branch_name>`
#AWS_Commands:-
h
1.
a List EC2 instances: `aws ec2 describe-instances`
2. Create an EC2 instance: `aws ec2 run-instances --image-id <image_id> --instance-type
s
<instance_type>`
h
3. Start an EC2 instance
t
a
g
1. Linux Troubleshooting round
-- This has open ended question where interviewer asked specific scenario and asked which
tool I would use or how would I troubleshoot.
-- Linux kernal questions
-- past experiences
-- standard linux troubleshooting and memory to cpu to disk io and in-depth understanding of
system conepts (threads, virtual memory, mmu, signals, file systems). There are quite
debugging questions too so be very prepared.
-- operating systems theory & practice, system design concepts, Linux troubleshooting,
-- Michael Kerrisk's "The Linux Programming Interface", Julia Evans' "Wizard Zines", and play
around with a Linux distro for some starting points Systems Troubleshooting - Linux system
administration knowledge helps a lot here. Use Fernando Duran's SadServers.com for some
practice. Check out Brendan Gregg's content and know the "USE Method" and the "Linux
Performance Analysis in 60000 Milliseconds" articles by heart
-- Internet, how to build an app.
-- Linux/operating system internals. - Networking System design Programming System
internals (Linux)
-- Networking - in depth trouble shooting System internals - very hard Linux related questions
-- System include os and linux common command
-- The infra question described maintaining a website that crashes several times a day and I
was asked to troubleshoot / describe all the things that could be going wrong.
-- memory to cpu and disk io
-- what will you do if you find a request failure from a webserver
/Systems/Unix** - *1.* Signals, Interrupts, IVT? SIGINT, SIGTERM. kill sends which signal? - *2.*
Process memory layout? - *3.* Stack overflow, heap overflow? - *4.* How system call goes
from user from kernel space?
1.* [mindsweeper grid design] - *2.* [Can array is split into 2 halves] -
*1.* Design botnet. botnet can exploit 10000 low end machines to run code. All machines
need to crawl webpage and return result. No machine should crawl page again.
*1.* What's your fav protocol(ipsec)? - What its flow? - What are drawbacks/improvements in
it? - *2.* Http1.2 vs 1.3. Carrying Http over UDP? - *3.* Everything that happens on when on
browser fb.com is searched. DNS, ARP, Routing tables etc - This was intense interview,
Interviewer wanted to ask how QUIC protocol is better on TLS wrt TLS over TCP. Why TCP
congestion control is problem and how we can remove that.
/System** - *1.* Interprocess Communication mechanisms(Pipes, named pipes, SM, MQ,
sockets) - How they work internally, Adv/disadv of each, their code. - Is data copied in kernel
buffers or remains in user space only? - can more than 1 process write on pipe at a time? -
Code for every IPC mechanism, APIs and their parameters. -