← Back to list

Why Every Developer Should Master Linux: Real Scenarios You Can’t Ignore

Linux is everywhere — from powering over 90% of the world’s supercomputers to being the foundation of Android devices, Linux is a…

Yashwant Sanjay Saste · 2025-05-06 19:17 · 8 claps · 5.5 min read
#linux #linux-for-everyone #software #operating-systems #linuxworld
Open on Medium ↗
Wiki topics: 🔓 · Open Source

Why Every Developer Should Master Linux: Real Scenarios You Can’t Ignore

Linux is everywhere — from powering over 90% of the world’s supercomputers to being the foundation of Android devices, Linux is a powerhouse in both development and production environments. But beyond its widespread use, Linux offers developers unmatched flexibility, efficiency, and control. In fact, according to a study, Linux is preferred by developers for its open-source nature, vast community support, and developer-friendly tools that streamline everything from coding to deployment.

As a student developer intern, I’ve found Linux to be indispensable in my day-to-day work. Whether I’m building a modular REST API or integrating different technologies in my projects, Linux’s stability and tools like bash scripting, package managers, and system monitoring utilities make it easier to debug, optimize, and deploy applications. The ability to directly interact with the system, automate tasks, and troubleshoot more effectively has made Linux my OS of choice.

In this blog, I’ll walk you through some real-world scenarios where understanding Linux can drastically improve your workflow. From investigating production crashes to debugging performance bottlenecks, Linux is more than just a tool — it’s an essential part of every developer’s toolkit.

Scenario 1: Your App Crashed in Production — What Now?

Imagine you’ve just received an alert that your app crashed in production. Panic? Maybe. But with Linux in your corner, you’re about to troubleshoot like a pro.

First, let’s grab the system logs using journalctl. This command will show you a wealth of information, including what happened right before the crash. You can run:

journalctl -xe

Look for error messages or warnings that can guide you to the root cause.

Next, check kernel-level messages with dmesg. This tool shows you low-level system information, which is especially helpful if your app crashed due to a system resource issue:

dmesg

You might spot kernel panic messages or out-of-memory errors here.

Finally, ever wonder why your app is hitting resource limits? The culprit might be ulimit. This command governs how much memory, CPU time, or open files your app can use. Check it by running:

ulimit -a

It’s key to making sure your app doesn’t hit critical limits like file descriptors.

Imagine seeing something like this in your journalctl logs:

Apr 24 10:32:01 myapp systemd[1]: myapp.service: Main process exited, code=killed, status=9/KILL

This indicates your app was killed due to an out-of-memory condition. By correlating this with dmesg, you might see:

Out of memory: Kill process 1234 (myapp) score 500 or sacrifice child

This tells you the app exceeded its memory allocation, and Linux killed it to prevent the system from crashing.

Key Commands:

  • journalctl -xe: View recent system logs, especially helpful for crashes.
  • dmesg: Check kernel messages for any system-related issues.
  • ulimit -a: View and adjust system resource limits to avoid crashes in the future.

Scenario 2: High CPU/RAM Usage — Is It Your Code or the System?

Your app is running slower than usual, and users are complaining. But how do you figure out whether it’s your app’s inefficiency or a system resource issue?

Start by using top or htop to monitor the system's resource usage in real time. These tools will show you which processes are consuming CPU and memory.

If your app is consuming too much memory, use ps aux to spot any runaway processes. Additionally, iotop helps monitor I/O usage, which can often be a hidden cause of slow performance.

You see this in top:

PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
1234 user      20   0  500000 100000  20000 S   80.0 10.0   1:00.00 myapp

This shows that myapp is using 80% of the CPU and 10% of system memory, which is likely the cause of the slowdown.

Key Commands:

  • top, htop: Monitor CPU and memory usage.
  • ps aux: Check for processes consuming excessive resources.
  • iotop: Monitor disk I/O to identify potential slowdowns.

Scenario 3: Network Issues — Why Isn’t the API Call Working?

Imagine you’re troubleshooting a failed API call, and you’re stuck. The error message says:

ping: unknown host api.example.com

Here’s what that means:

  • ping: A diagnostic tool used to test network connectivity between your computer and a remote server.
  • unknown host: This error tells you that the system couldn’t find the domain name in DNS (Domain Name System), meaning it couldn’t resolve api.example.com to an IP address.
  • api.example.com: The target domain you’re trying to reach.

To troubleshoot, start by using ping to check basic connectivity. If it returns unknown host, you may have a DNS issue, or the domain may not exist. Run traceroute to see where the connection is being blocked, and check your system’s DNS settings.

Key Commands:

  • ping: Test connectivity to a target.
  • traceroute: Trace the network path to identify where it’s failing.
  • ss, netstat: Check for open network connections and listening ports.

Scenario 4: Disk Full — How to Avoid Your App Running Into Storage Issues

You’re getting alerts that your app isn’t functioning properly, and after a quick check, you realize the disk is full. What do you do?

Start by using df to check the available disk space:

df -h

This will show you how much space is left on your partitions. If a partition is full, use du to find which directories are taking up the most space:

du -sh /path/to/directory/*

If you’re dealing with log files taking up unnecessary space, consider using logrotate to automatically rotate logs and prevent them from growing indefinitely.

Real Example:

You run df -h and notice:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        50G   50G     0 100% /

This indicates that your root partition is full, potentially causing your app to fail.

Key Commands:

  • df -h: Check available disk space.
  • du -sh /path/to/directory/*: Find large directories or files.
  • logrotate: Manage and rotate log files automatically.

Scenario 5: Permission Denied — Fixing File Access Issues

You’re trying to run a script or modify a file, but you encounter a “Permission Denied” error. This happens when the user doesn’t have the appropriate permissions for the file or directory.

Start by checking the file’s permissions with ls -l:

ls -l /path/to/file

The permissions are displayed as -rw-r--r--, where:

  • User: rw- (read, write)
  • Group: r-- (read only)
  • Other: r-- (read only)

If you need to adjust permissions, use chmod. For example:

chmod 700 /path/to/script

This command ensures that the owner has full access (read, write, execute), while others have no access.

Understanding Users, Groups, and Others in Linux:

  • User: The owner of the file, usually the one who created it. They have the most control over the file.
  • Group: A collection of users. Members of a group can have specific access to files based on their group membership.
  • Other: Refers to everyone else who isn’t the owner or in the group. Their permissions are more restricted.

For changing ownership, use chown:

sudo chown user:user /path/to/file

Additionally, check group memberships with:

groups user

Key Commands:

  • ls -l: View file permissions.
  • chmod 700: Set specific file permissions.
  • chown user:user: Change file ownership.
  • groups: Check user’s group membership.

Scenario 6: Service Won’t Start — What’s Preventing It from Running?

You’re trying to start a service, but it refuses to launch. The first step is to check the service status with systemctl:

systemctl status your-service

This will give you a detailed error message. If the service fails due to missing dependencies, check the logs with journalctl:

journalctl -u your-service

If permissions or configuration issues are suspected, verify the service’s configuration files and ensure the required files exist.

You see:

Failed to start your-service.service: Unit not found.

This suggests the service may not be installed correctly.

Key Commands:

  • systemctl status your-service: Check the status of a service.
  • journalctl -u your-service: View logs for a specific service.

Conclusion

Linux has proven to be incredibly relevant in every scenario we’ve discussed, offering powerful and efficient tools that make troubleshooting and system management easier. From examining logs with journalctl to monitoring system performance with top, Linux provides a robust environment for developers to tackle issues head-on. As a student developer intern, I find Linux’s open-source nature, flexibility, and performance-oriented features invaluable. The deep control it offers over the system makes me a more efficient and knowledgeable developer, which is why I would always choose Linux over any other operating system.


메타데이터
post_id
b03bf4a1e263
slug
why-every-developer-should-master-linux-real-scenarios-you-cant-ignore-b03bf4a1e263
url
https://medium.com/@yashwantsaste/why-every-developer-should-master-linux-real-scenarios-you-cant-ignore-b03bf4a1e263
canonical_url
https://medium.com/@yashwantsaste/why-every-developer-should-master-linux-real-scenarios-you-cant-ignore-b03bf4a1e263
author_url
https://medium.com/@yashwantsaste
status
ok
fetched_at
2026-06-25 12:15:08