Docsity

Linux cheat sheet 20, Cheat Sheet of Linear Programming

Toggle sidebar
bg1
Linux for Technical Support Engineer (L2)
How an L2 Engineer Uses Linux Daily:
1. Log Analysis and Monitoring
An L2 engineer regularly checks system logs to identify application or service errors using
commands like `tail -f /var/log/syslog` or `grep ERROR /var/log/messages`. This helps detect
recurring issues quickly.
2. Service Management
Using `systemctl start/stop/status servicename` to manage and monitor essential services (like
Apache, MySQL, etc.). For example: restarting a failed Nginx service when downtime is reported.
3. Disk Space Management
Using `df -h` and `du -sh` to check which directories are consuming excessive space. Engineers
might clear `/var/tmp` or archived logs when storage alerts trigger.
4. User and Permission Management
Managing users via `useradd`, `passwd`, and `chown/chmod`. For instance, creating a new support
user for access control during troubleshooting.
5. Network Troubleshooting
Checking connectivity using `ping`, `netstat -tulnp`, and `ss -lntp`. Engineers also use `traceroute`
and `nslookup` to verify DNS and routing issues.
6. Process and Resource Management
Using `top`, `htop`, and `ps aux` to identify high CPU/memory-consuming processes. L2 engineers
may kill unresponsive processes using `kill -9 `.
7. Package and Patch Management
Keeping systems updated using `apt-get update && apt-get upgrade` or `yum update`. This
ensures stability and closes security vulnerabilities.
8. Automation with Shell Scripting
Creating small scripts to automate repetitive tasks โ€” e.g., monitoring CPU usage and sending
email alerts if thresholds exceed limits.
One-Day Linux Learning Plan:
Hour 1: Understand Linux structure (Files, Directories, Permissions).
Hour 2: Basic commands โ€” ls, cd, cp, mv, rm, cat, touch, mkdir.
Hour 3: System monitoring โ€” top, ps, df, du, free, uptime.
Hour 4: Service management โ€” systemctl, journalctl, crontab.
Hour 5: Networking โ€” ping, curl, netstat, traceroute, nslookup.
Hour 6: File permissions and ownership โ€” chmod, chown, groups.
Hour 7: Shell scripting basics โ€” loops, conditions, automation tasks.
Hour 8: Practice troubleshooting and log analysis cases.
pf2

Partial preview of the text

Download Linux cheat sheet 20 and more Cheat Sheet Linear Programming in PDF only on Docsity!

Linux for Technical Support Engineer (L2)

How an L2 Engineer Uses Linux Daily:

1. Log Analysis and Monitoring

An L2 engineer regularly checks system logs to identify application or service errors using commands like tail -f /var/log/syslog or grep ERROR /var/log/messages. This helps detect recurring issues quickly.

2. Service Management

Using systemctl start/stop/status servicename to manage and monitor essential services (like Apache, MySQL, etc.). For example: restarting a failed Nginx service when downtime is reported.

3. Disk Space Management

Using df -h and du -sh to check which directories are consuming excessive space. Engineers might clear /var/tmp or archived logs when storage alerts trigger.

4. User and Permission Management

Managing users via useradd, passwd, and chown/chmod. For instance, creating a new support user for access control during troubleshooting.

5. Network Troubleshooting

Checking connectivity using ping, netstat -tulnp, and ss -lntp. Engineers also use traceroute and nslookup to verify DNS and routing issues.

6. Process and Resource Management

Using top, htop, and ps aux to identify high CPU/memory-consuming processes. L2 engineers may kill unresponsive processes using kill -9.

7. Package and Patch Management

Keeping systems updated using apt-get update && apt-get upgrade or yum update. This ensures stability and closes security vulnerabilities.

8. Automation with Shell Scripting

Creating small scripts to automate repetitive tasks โ€” e.g., monitoring CPU usage and sending email alerts if thresholds exceed limits.

One-Day Linux Learning Plan:

Hour 1: Understand Linux structure (Files, Directories, Permissions). Hour 2: Basic commands โ€” ls, cd, cp, mv, rm, cat, touch, mkdir. Hour 3: System monitoring โ€” top, ps, df, du, free, uptime. Hour 4: Service management โ€” systemctl, journalctl, crontab. Hour 5: Networking โ€” ping, curl, netstat, traceroute, nslookup. Hour 6: File permissions and ownership โ€” chmod, chown, groups. Hour 7: Shell scripting basics โ€” loops, conditions, automation tasks. Hour 8: Practice troubleshooting and log analysis cases.

Mock Interview Questions and Answers:

1. How do you check disk usage in Linux?

Use df -h to view filesystem usage and du -sh /path to check folder size.

2. What command lists all running processes?

ps aux or top shows all running processes with details.

3. How do you find which service is using a port?

Use netstat -tulnp | grep or ss -lntp.

4. How to schedule a task in Linux?

Using crontab -e to add cron jobs, e.g., 0 2 * * * /path/script.sh for daily execution.

5. How do you check last system reboot?

who -b or uptime commands show last reboot time.

6. Whatโ€™s the difference between soft link and hard link?

Soft links are pointers to files, while hard links are duplicate inodes of the same data block.

7. How to check memory usage?

Use free -h or top to monitor memory usage.

8. How to view system logs?

Use journalctl, or cat /var/log/syslog for system events.