<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vaisakh J on Medium]]></title>
        <description><![CDATA[Stories by Vaisakh J on Medium]]></description>
        <link>https://medium.com/@jaynvaisak?source=rss-1f76e42c0b67------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LdNBCDRC1U-PjqWKE2UyGQ.jpeg</url>
            <title>Stories by Vaisakh J on Medium</title>
            <link>https://medium.com/@jaynvaisak?source=rss-1f76e42c0b67------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 20:26:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jaynvaisak/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building a Dockerized To-Do App with CI/CD, Security Scanning, and Monitoring]]></title>
            <link>https://medium.com/@jaynvaisak/introduction-965414ebabe5?source=rss-1f76e42c0b67------2</link>
            <guid isPermaLink="false">https://medium.com/p/965414ebabe5</guid>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Vaisakh J]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 21:58:26 GMT</pubDate>
            <atom:updated>2026-06-23T10:13:43.949Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kjt0L5nh-5_VCDbV_X4IUA.png" /></figure><h3>Introduction</h3><p>This document explains a production-style To-Do application built using Flask, MySQL, Nginx, Docker Compose, GitHub Actions, Docker Hub, Prometheus, and Grafana.</p><p>The project demonstrates how a simple application can be containerized, automated, secured, published, monitored, and documented using common DevOps practices.</p><p>The implementation includes:</p><ul><li>Application development</li><li>Docker containerization</li><li>Multi-container deployment</li><li>Database persistence</li><li>Reverse proxy setup</li><li>CI/CD automation</li><li>Docker image publishing</li><li>Security scanning</li><li>Application monitoring</li><li>Project documentation</li></ul><h3>Project Overview</h3><p>The application is a simple To-Do management app where users can:</p><ul><li>Add tasks</li><li>View tasks</li><li>Mark tasks as completed or pending</li><li>Delete tasks</li><li>Store task data permanently in MySQL</li></ul><p>The application runs behind Nginx as a reverse proxy. The backend is built using Python Flask, and MySQL is used as the database.</p><p>The full stack runs using Docker Compose.</p><h3>Tech Stack Used</h3><p>The project uses the following tools and technologies:</p><ul><li>Python Flask for backend application development</li><li>MySQL for database storage</li><li>Nginx as a reverse proxy</li><li>Docker for containerization</li><li>Docker Compose for multi-container orchestration</li><li>GitHub Actions for CI/CD automation</li><li>Docker Hub for image publishing</li><li>Pytest for unit testing</li><li>Flake8 for code quality checks</li><li>pip-audit for Python dependency scanning</li><li>Trivy for Docker image vulnerability scanning</li><li>Prometheus for metrics collection</li><li>Grafana for monitoring dashboards</li></ul><h3>Architecture</h3><p>The project architecture has three main parts:</p><ol><li>Runtime application flow</li><li>CI/CD pipeline</li><li>Monitoring and observability flow</li></ol><p>The runtime architecture is shown below:</p><pre>                         ┌──────────────────────┐<br>                         │     User Browser     │<br>                         │   localhost:8081     │<br>                         └───────────┬──────────┘<br>                                     │<br>                                     ▼<br>                         ┌──────────────────────┐<br>                         │        Nginx         │<br>                         │    Reverse Proxy     │<br>                         │   Host 8081 → 80     │<br>                         └───────────┬──────────┘<br>                                     │<br>                                     ▼<br>                         ┌──────────────────────┐<br>                         │      Flask App       │<br>                         │ Python + Gunicorn    │<br>                         │      app:5000        │<br>                         └───────────┬──────────┘<br>                                     │<br>                                     ▼<br>                         ┌──────────────────────┐<br>                         │    MySQL Database    │<br>                         │      mysql:3306      │<br>                         └───────────┬──────────┘<br>                                     │<br>                                     ▼<br>                         ┌──────────────────────┐<br>                         │    Docker Volume     │<br>                         │      mysql_data      │<br>                         │ Persistent DB Data   │<br>                         └──────────────────────┘</pre><p>The user accesses the application through Nginx. Nginx forwards requests to the Flask application. The Flask app stores and retrieves data from MySQL. MySQL stores its data inside a Docker volume, which provides database persistence.</p><h3>Application Flow</h3><p>The user accesses the application through:</p><pre>localhost:8081</pre><p>The request flow is:</p><pre>User Request<br>    │<br>    ▼<br>http://localhost:8081<br>    │<br>    ▼<br>Nginx Container<br>    │<br>    ▼<br>Forwards request to app:5000<br>    │<br>    ▼<br>Flask Application<br>    │<br>    ▼<br>Returns response to Nginx<br>    │<br>    ▼<br>Nginx returns page to browser</pre><p>Nginx receives the request and forwards it to the Flask application running inside the Docker network.</p><p>The Flask app communicates with the MySQL database container. MySQL stores task data inside a Docker volume, so the data remains available even if containers are restarted or recreated.</p><h3>Docker Compose Setup</h3><p>Docker Compose is used to run all services together.</p><p>The main services are:</p><ul><li>Flask app container</li><li>MySQL database container</li><li>Nginx reverse proxy container</li><li>Prometheus container</li><li>Grafana container</li></ul><p>The Docker Compose service structure is:</p><pre>docker-compose.yml<br>      │<br>      ├── mysql<br>      │     ├── MySQL Database<br>      │     └── mysql_data volume<br>      │<br>      ├── app<br>      │     └── Flask + Gunicorn<br>      │<br>      ├── nginx<br>      │     └── Reverse Proxy<br>      │<br>      ├── prometheus<br>      │     └── Metrics Collection<br>      │<br>      └── grafana<br>            └── Monitoring Dashboard</pre><p>A custom Docker network allows containers to communicate with each other using service names.</p><p>Examples:</p><pre>app:5000<br>mysql:3306<br>prometheus:9090</pre><p>To start the complete stack:</p><pre>docker-compose up --build -d</pre><p>To check running containers:</p><pre>docker-compose ps</pre><h3>Nginx Reverse Proxy</h3><p>Nginx is used as the entry point for the application.</p><p>The user does not directly access the Flask container. Instead, the request first reaches Nginx, and Nginx forwards it to the Flask app.</p><p>The request flow is:</p><pre>Browser<br>  │<br>  ▼<br>localhost:8081<br>  │<br>  ▼<br>Nginx Reverse Proxy<br>  │<br>  ▼<br>Flask App: app:5000<br>  │<br>  ▼<br>Response returned to Browser</pre><p>Nginx can be used in real deployments for:</p><ul><li>Reverse proxy routing</li><li>Load balancing</li><li>Static file serving</li><li>SSL termination</li><li>Request forwarding</li></ul><p>In this project, Nginx forwards traffic to the Flask app running on port 5000.</p><h3>MySQL with Persistent Volume</h3><p>MySQL runs inside a separate container.</p><p>MySQL data is stored in a Docker volume. This keeps database data separate from the container lifecycle.</p><p>The database persistence flow is:</p><pre>Flask App<br>   │<br>   ▼<br>MySQL Container<br>   │<br>   ▼<br>/var/lib/mysql<br>   │<br>   ▼<br>Docker Volume: mysql_data<br>   │<br>   ▼<br>Data remains even after container restart</pre><p>Without Docker volumes, database data can be lost when a database container is removed.</p><h3>Dockerfile and Non-Root User</h3><p>Docker is used to containerize the Flask application.</p><p>The Dockerfile includes production-focused practices such as:</p><ul><li>Installing required dependencies</li><li>Running the application using Gunicorn</li><li>Using a non-root user</li><li>Keeping the image optimized</li><li>Adding health check support</li></ul><p>The containerization flow is:</p><pre>Application Code<br>      │<br>      ▼<br>Dockerfile<br>      │<br>      ▼<br>Docker Image Build<br>      │<br>      ▼<br>Flask App Container<br>      │<br>      ▼<br>Gunicorn runs the Flask application</pre><p>Running containers as a non-root user is a basic security practice. Application containers should avoid running as root unless required.</p><h3>Health Check Endpoint</h3><p>A health check endpoint is added to verify whether the application is running properly.</p><p>Endpoint:</p><pre>/health</pre><p>Example command:</p><pre>curl http://localhost:8081/health</pre><p>Health check flow:</p><pre>User / Tool<br>    │<br>    ▼<br>/health endpoint<br>    │<br>    ▼<br>Flask App<br>    │<br>    ▼<br>Returns application health status</pre><p>A health check endpoint allows monitoring tools, CI/CD pipelines, and container platforms to verify whether the application is alive and responding.</p><h3>CI/CD with GitHub Actions</h3><p>GitHub Actions is used to automate the CI/CD pipeline.</p><p>The pipeline performs:</p><ul><li>Code checkout</li><li>Python dependency installation</li><li>Code quality check using Flake8</li><li>Unit testing using Pytest</li><li>Dependency scanning using pip-audit</li><li>Docker image build</li><li>Docker image scanning using Trivy</li><li>Docker Hub login</li><li>Docker image push</li></ul><p>The CI/CD workflow is:</p><pre>Developer<br>   │<br>   ▼<br>GitHub Repository<br>   │<br>   ▼<br>GitHub Actions CI/CD<br>   │<br>   ├── Flake8 Code Quality Check<br>   ├── Pytest Unit Tests<br>   ├── pip-audit Dependency Scan<br>   ├── Trivy Docker Image Scan<br>   │<br>   ▼<br>Docker Image Build<br>   │<br>   ▼<br>Docker Hub Registry<br>   │<br>   ▼<br>Image Available for Deployment</pre><p>GitHub Actions automates the process of testing, scanning, building, and publishing the Docker image whenever changes are pushed to the repository.</p><h3>Security Scanning</h3><p>Security scanning is included using:</p><pre>pip-audit</pre><p>for Python dependency scanning.</p><p>And:</p><pre>Trivy</pre><p>for Docker image vulnerability scanning.</p><p>The security scanning flow is:</p><pre>Source Code<br>   │<br>   ├── Flake8<br>   │     └── Checks code quality<br>   │<br>   ├── Pytest<br>   │     └── Runs unit tests<br>   │<br>   ├── pip-audit<br>   │     └── Scans Python dependencies<br>   │<br>   └── Trivy<br>         └── Scans Docker image vulnerabilities</pre><p>These checks help identify code quality issues, test failures, dependency risks, and image vulnerabilities before publishing or deployment.</p><h3>Docker Hub Image Publishing</h3><p>After the Docker image is built and scanned, it is pushed to Docker Hub.</p><p>Docker Hub acts as the image registry.</p><p>The image publishing flow is:</p><pre>Docker Image Build<br>       │<br>       ▼<br>Trivy Image Scan<br>       │<br>       ▼<br>Docker Hub Login<br>       │<br>       ▼<br>Push Image to Docker Hub<br>       │<br>       ▼<br>Image available as:<br>latest tag + version tag</pre><p>The image can be pulled and used later on another machine or server.</p><p>The image is tagged using:</p><pre>latest</pre><p>and version tags.</p><h3>Monitoring with Prometheus and Grafana</h3><p>Monitoring is implemented using Prometheus and Grafana.</p><p>The Flask application exposes metrics through:</p><pre>/metrics</pre><p>Prometheus scrapes metrics from:</p><pre>app:5000/metrics</pre><p>Grafana connects to Prometheus and visualizes the metrics.</p><p>The monitoring flow is:</p><pre>Flask Application<br>      │<br>      ▼<br>/metrics Endpoint<br>      │<br>      ▼<br>Prometheus<br>Scrapes app:5000/metrics<br>      │<br>      ▼<br>Grafana<br>Visualizes Prometheus Data<br>      │<br>      ▼<br>Dashboard Panels<br>- App Status<br>- Request Count<br>- Request Rate<br>- Requests by Endpoint</pre><p>The Grafana dashboard includes:</p><ul><li>App status</li><li>Request count</li><li>Request rate</li></ul><p>Prometheus queries used:</p><pre>up{job=&quot;todo-app&quot;}</pre><pre>sum by (endpoint, method) (todo_app_requests_total)</pre><pre>sum(rate(todo_app_requests_total[1m]))</pre><h3>Complete Project Flow</h3><p>The complete DevOps workflow of this project is:</p><pre>Developer writes code<br>        │<br>        ▼<br>Push to GitHub<br>        │<br>        ▼<br>GitHub Actions Pipeline<br>        │<br>        ├── Code quality check<br>        ├── Unit tests<br>        ├── Dependency scan<br>        ├── Docker image scan<br>        │<br>        ▼<br>Docker image pushed to Docker Hub<br>        │<br>        ▼<br>Application runs with Docker Compose<br>        │<br>        ├── Nginx reverse proxy<br>        ├── Flask application<br>        ├── MySQL database<br>        ├── Prometheus monitoring<br>        └── Grafana dashboard</pre><p>This workflow connects development, containerization, automation, security, image publishing, runtime execution, and monitoring.</p><h3>Problems Faced and Fixes</h3><h3>Problem 1: Some containers were not running after rebuild</h3><p>Container status was checked using:</p><pre>docker-compose ps</pre><p>Required services were restarted using Docker Compose.</p><h3>Problem 2: Prometheus target verification</h3><p>Prometheus was configured to scrape metrics from:</p><pre>app:5000/metrics</pre><p>The target status was verified from the Prometheus targets page.</p><h3>Problem 3: Docker Compose service communication</h3><p>Docker Compose services communicate using service names such as:</p><pre>app<br>mysql<br>prometheus</pre><p>The service names are resolved inside the Docker Compose network.</p><h3>Key Learnings</h3><p>This project covers the following DevOps concepts:</p><ul><li>Flask application containerization</li><li>Flask and MySQL communication using Docker Compose</li><li>Nginx reverse proxy configuration</li><li>Docker volume-based database persistence</li><li>Docker network-based service communication</li><li>GitHub Actions CI/CD automation</li><li>Code quality checks and unit testing</li><li>Dependency and image vulnerability scanning</li><li>Docker image publishing to Docker Hub</li><li>Prometheus metrics collection</li><li>Grafana dashboard visualization</li><li>Professional project documentation</li></ul><h3>Why This Project Is Useful for DevOps Practice</h3><p>This project connects multiple DevOps concepts into one practical workflow.</p><p>Instead of treating Docker, CI/CD, monitoring, and security as separate topics, the project combines them around one working application.</p><p>The final project includes:</p><pre>Application<br>    +<br>Database<br>    +<br>Reverse Proxy<br>    +<br>CI/CD<br>    +<br>Security Scanning<br>    +<br>Monitoring<br>    +<br>Documentation</pre><h3>Conclusion</h3><p>This project demonstrates how DevOps practices can be applied around a simple application.</p><p>A Flask To-Do app was containerized and connected with MySQL, Nginx, GitHub Actions, Docker Hub, security scanning tools, Prometheus, and Grafana.</p><p>The final result is a complete DevOps workflow covering application runtime, automation, image publishing, security scanning, monitoring, and documentation.</p><p>GitHub Repository: <a href="https://github.com/jayvaisakh/todo-app">https://github.com/jayvaisakh/todo-app</a></p><p>Docker Hub Repository: <a href="https://hub.docker.com/r/jayvaisakh/todo-app">https://hub.docker.com/r/jayvaisakh/todo-app</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=965414ebabe5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuring an SMTP Mail Server on Ubuntu Using Exim and Gmail Smarthost Relay]]></title>
            <link>https://medium.com/@jaynvaisak/configuring-an-smtp-mail-server-on-ubuntu-using-exim-and-gmail-smarthost-relay-e9e640131283?source=rss-1f76e42c0b67------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9e640131283</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devops-practice]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Vaisakh J]]></dc:creator>
            <pubDate>Thu, 28 May 2026 07:54:48 GMT</pubDate>
            <atom:updated>2026-05-28T07:58:05.021Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fc-78GR0cCEW-LjUQRr_Cg.png" /></figure><p>Email delivery is one of the most fundamental services in Linux server administration. In this project, I configured a mail server on Ubuntu using Exim and integrated it with Gmail SMTP relay (smarthost) for secure outbound email delivery.</p><p>The primary objectives of this project were to:</p><ul><li>Understand Linux mail server configuration</li><li>Configure SMTP relay using Gmail</li><li>Troubleshoot SMTP delivery issues</li><li>Enable secure TLS-based email delivery</li><li>Successfully send emails from the Linux terminal</li></ul><p>This project also provided hands-on experience with Exim logs, SMTP debugging, network troubleshooting, and mail queue management.</p><h3>The Initial Problem</h3><p>At first, Exim was configured for direct internet mail delivery. This meant the server attempted to send emails directly to external mail servers over SMTP port 25.</p><p>However, in modern environments, direct SMTP delivery often fails because:</p><ul><li>ISPs frequently block outbound port 25</li><li>Cloud providers restrict SMTP traffic</li><li>Virtual machine networks limit direct mail delivery</li><li>Some recipient servers reject mail from unknown hosts</li></ul><p>As a result:</p><ul><li>Emails were deferred</li><li>SMTP connections failed</li><li>Mail queues started growing</li><li>External delivery was unsuccessful</li></ul><p>The Exim logs showed errors such as:</p><pre>connection refused<br>retry time not reached<br>status=deferred</pre><p>At this point, it became clear that direct SMTP delivery was not practical in the current environment.</p><h3>The Solution: Using Gmail as a Smarthost</h3><p>To solve the issue, Exim was reconfigured to use Gmail SMTP relay instead of attempting direct mail delivery.</p><p>A smarthost is an external SMTP server that handles outgoing email delivery on behalf of your mail server.</p><p>In this setup:</p><ul><li>Exim forwards all outgoing mail to Gmail</li><li>Gmail handles final email delivery</li><li>SMTP authentication is required</li><li>TLS encryption secures the communication</li><li>Port 587 is used instead of blocked port 25</li></ul><p>This approach bypasses SMTP restrictions and provides reliable outbound email delivery.</p><h3>Understanding the Gmail Smarthost Configuration</h3><p>The Gmail SMTP relay configured in Exim was:</p><pre>dc_smarthost=&#39;smtp.gmail.com::587&#39;</pre><h3>Explanation</h3><ul><li>smtp.gmail.com → Gmail SMTP server</li><li>587 → Secure SMTP submission port</li><li>dc_smarthost → SMTP relay server used by Exim</li></ul><p>After this change, all outgoing emails are securely forwarded through Gmail SMTP relay.</p><h3>Final Mail Flow</h3><pre>Local Mail Command<br>        ↓<br>Exim Mail Server<br>        ↓<br>Gmail SMTP Relay (Port 587)<br>        ↓<br>Internet<br>        ↓<br>Recipient Mailbox</pre><h3>Step 1 — Update Package Repository</h3><p>Before installing packages, update the Ubuntu package index:</p><pre>sudo apt update</pre><p>This ensures the latest package information is available.</p><h3>Step 2 — Install Exim and Mail Utilities</h3><p>Install Exim mail server and mail utilities:</p><pre>sudo apt install exim4 mailutils -y</pre><p>This installs:</p><ul><li>Exim4 mail server</li><li>Mail utilities package</li><li>mail command for testing email delivery</li></ul><h3>Step 3 — Configure Exim</h3><p>Run the Exim configuration wizard:</p><pre>sudo dpkg-reconfigure exim4-config</pre><h3>Selected Configuration Options</h3><p>OptionSelected ValueMail configuration typeMail sent by smarthostSystem mail nameDefaultIP addresses to listen on127.0.0.1Split configurationYes</p><p>This changes Exim from direct internet delivery mode to authenticated SMTP relay mode.</p><h3>Step 4 — Configure Gmail SMTP Smarthost</h3><p>Open the Exim configuration file:</p><pre>sudo nano /etc/exim4/update-exim4.conf.conf</pre><p>Find and update:</p><pre>dc_smarthost=&#39;smtp.gmail.com::587&#39;</pre><p>This tells Exim to use Gmail SMTP relay for all outgoing emails.</p><h3>Step 5 — Setting Up a Gmail App Password</h3><p>Before Exim can authenticate with Gmail SMTP relay, a Gmail App Password must be generated.</p><p>Google blocks normal account passwords for many SMTP applications for security reasons. Instead, Gmail requires:</p><ul><li>Two-Factor Authentication (2FA)</li><li>App Password authentication</li></ul><p>An App Password is a special 16-character password used specifically for applications like Exim, Thunderbird, Outlook, and SMTP clients.</p><h3>Enable Two-Factor Authentication</h3><p>Open your Google Account security settings:</p><ul><li>Go to <strong>Google Account → Security</strong></li><li>Find <strong>2-Step Verification</strong></li><li>Enable two-factor authentication</li></ul><p>This step is mandatory before App Passwords become available.</p><h3>Open App Password Settings</h3><p>After enabling 2FA:</p><ul><li>Go to <strong>Google Account → Security</strong></li><li>Search for <strong>App Passwords</strong></li><li>Open the App Passwords page</li></ul><p>Google may ask you to sign in again.</p><h3>Generate the App Password</h3><p>Inside the App Passwords page:</p><ul><li>Select <strong>Mail</strong> as the application</li><li>Select <strong>Other (Custom name)</strong></li><li>Enter a custom name such as:</li></ul><pre>Exim SMTP Server</pre><p>Click:</p><pre>Generate</pre><p>Google will generate a 16-character App Password similar to:</p><pre>abcd efgh ijkl mnop</pre><h3>Important Notes</h3><ul><li>Remove spaces from the generated password before using it</li><li>Do not use your normal Gmail password</li><li>Keep the App Password private</li><li>App Passwords can be revoked anytime from Google Account security settings</li></ul><h3>Step 6 — Configure SMTP Authentication</h3><p>Open the Exim authentication file:</p><pre>sudo nano /etc/exim4/passwd.client</pre><p>Add:</p><pre>smtp.gmail.com:yourgmail@gmail.com:your_app_password</pre><p>Example:</p><pre>smtp.gmail.com:example@gmail.com:abcdefghijklmnop</pre><p>This allows Exim to authenticate securely with Gmail SMTP relay using the generated App Password.</p><h3>Step 7 — Apply Configuration Changes</h3><p>Rebuild the Exim configuration:</p><pre>sudo update-exim4.conf</pre><p>Restart Exim:</p><pre>sudo systemctl restart exim4</pre><h3>Step 8 — Verify Exim Service Status</h3><p>Check whether Exim is running:</p><pre>systemctl status exim4</pre><p>Expected output:</p><pre>active (running)</pre><p>This confirms that the mail server started successfully.</p><h3>Step 9 — Test Local Mail Delivery</h3><p>Send a local test email:</p><pre>echo &quot;Local mail test message&quot; | mail -s &quot;Local Test&quot; username</pre><p>Example:</p><pre>echo &quot;Local mail test message&quot; | mail -s &quot;Local Test&quot; vboxuser</pre><p>This verifies:</p><ul><li>Local mailbox delivery</li><li>Internal Exim functionality</li><li>Mail handling on the system</li></ul><h3>Step 10 — Check Local Mailbox</h3><p>View local mailbox contents:</p><pre>cat /var/mail/username</pre><p>Example:</p><pre>cat /var/mail/vboxuser</pre><h3>Step 11 — Test External Email Delivery</h3><p>Send an external email:</p><pre>echo &quot;External SMTP test using Gmail relay&quot; | mail -s &quot;SMTP Test&quot; yourmail@example.com</pre><p>This verifies:</p><ul><li>Gmail SMTP relay</li><li>SMTP authentication</li><li>TLS-secured delivery</li><li>External email functionality</li></ul><h3>Step 12 — Verify SMTP Connectivity</h3><p>Check connectivity to Gmail SMTP server:</p><pre>nc -vz smtp.gmail.com 587</pre><p>Expected output:</p><pre>succeeded</pre><p>This confirms successful network access to Gmail SMTP relay.</p><h3>Step 13 — Monitor Exim Logs</h3><p>Monitor Exim logs in real time:</p><pre>sudo tail -f /var/log/exim4/mainlog</pre><p>Successful delivery logs look similar to:</p><pre>SMTP connection to smtp.gmail.com:587<br>TLS session established<br>Authentication succeeded<br>=&gt; status=sent</pre><p>These logs confirm:</p><ul><li>SMTP relay connection established</li><li>TLS encryption enabled</li><li>Gmail authentication successful</li><li>Email delivered successfully</li></ul><h3>Step 14 — Check Mail Queue</h3><p>View queued or deferred emails:</p><pre>sudo exim -bp</pre><p>This is useful for troubleshooting delayed email delivery.</p><h3>Useful Troubleshooting Commands</h3><h3>Restart Exim</h3><pre>sudo systemctl restart exim4</pre><h3>Verify Smarthost Configuration</h3><pre>grep dc_smarthost /etc/exim4/update-exim4.conf.conf</pre><h3>Force Queue Retry</h3><pre>sudo exim -qff</pre><h3>Remove Queued Mail</h3><pre>sudo exim -Mrm &lt;message-id&gt;</pre><h3>Verify TLS Connectivity</h3><pre>openssl s_client -starttls smtp -connect smtp.gmail.com:587</pre><h3>Common Troubleshooting Issues</h3><pre>| Issue                 | Cause                    | Solution                           |<br>|-----------------------|--------------------------|------------------------------------|<br>| Connection refused    | Port 25 blocked          | Use Gmail relay on port 587        |<br>| Authentication failed | Incorrect App Password   | Generate a new App Password        |<br>| Mail stuck in queue   | SMTP unreachable         | Verify network connectivity        |<br>| TLS errors            | Missing certificates     | Update CA certificates             |</pre><h3>Security Considerations</h3><p>This setup included several important security practices:</p><ul><li>Gmail App Passwords were used instead of the primary account password</li><li>TLS encryption secured SMTP communication</li><li>Exim listened only on localhost (127.0.0.1)</li><li>SMTP authentication prevented unauthorized relay usage</li></ul><h3>Important Limitation</h3><p>Although Gmail SMTP relay works well for learning and small-scale environments, it is not ideal for high-volume production email systems because:</p><ul><li>Gmail enforces sending limits</li><li>Bulk email may trigger spam protection</li><li>Relay quotas apply</li></ul><p>For production environments, dedicated SMTP providers are generally recommended.</p><h3>Key Learnings</h3><p>This project provided practical experience with:</p><ul><li>Linux mail server administration</li><li>Exim configuration</li><li>SMTP relay concepts</li><li>TLS-secured email delivery</li><li>SMTP authentication</li><li>Network troubleshooting</li><li>Mail queue management</li><li>Log-based debugging</li></ul><p>It also improved my understanding of the difference between SMTP ports 25 and 587 and why modern systems prefer authenticated relay-based delivery.</p><h3>Conclusion</h3><p>This project demonstrated how to configure a secure Linux-based mail server using Exim and Gmail SMTP relay on Ubuntu.</p><p>The original issue caused by blocked SMTP port 25 was successfully resolved by using Gmail as an authenticated smarthost over port 587 with TLS encryption.</p><p>Through this project, I gained hands-on experience in Linux system administration, SMTP troubleshooting, secure mail relay configuration, and Exim log analysis.</p><p>Overall, this was an excellent practical introduction to Linux mail infrastructure and email delivery workflows.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9e640131283" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding IP Addresses & Subnetting]]></title>
            <link>https://medium.com/@jaynvaisak/understanding-ip-addresses-subnetting-56638b14eb91?source=rss-1f76e42c0b67------2</link>
            <guid isPermaLink="false">https://medium.com/p/56638b14eb91</guid>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Vaisakh J]]></dc:creator>
            <pubDate>Wed, 13 May 2026 08:10:36 GMT</pubDate>
            <atom:updated>2026-05-13T08:11:22.063Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1PnBVIvBzW6cQGAKQkfwdw.png" /></figure><p>IP addresses are used to identify devices on a network.</p><p>Every computer, phone, router, and server connected to a network uses an IP address to send and receive data.</p><p>Understanding IP addressing is an important part of networking because it explains how devices communicate with each other across local networks and the internet.</p><p>This article covers:</p><ul><li>IP addresses</li><li>IPv4</li><li>Subnet masks</li><li>CIDR notation</li><li>Subnetting</li><li>Public vs private IP addresses</li></ul><h3>What Is an IP Address?</h3><p>An IP address is a unique number assigned to a device on a network.</p><p>It helps devices identify and communicate with each other.</p><p>Just like a home address helps deliver mail to the correct house, an IP address helps data reach the correct device.</p><h3>IPv4: The Most Common Type of IP Address</h3><p>The most widely used version today is called <strong>IPv4</strong>.</p><p>An IPv4 address is made up of <strong>32 bits</strong>, usually written as four numbers separated by dots.</p><p>Example:</p><pre>192.168.1.10</pre><p>Each section is called an <strong>octet</strong> because it contains 8 bits.</p><p>In binary, the same address looks like this:</p><pre>11000000.10101000.00000001.00001010</pre><p>Fortunately, humans rarely need to work directly with the binary version.</p><h3>Network Portion vs Host Portion</h3><p>Every IP address contains two parts:</p><ul><li><strong>Network portion</strong> → Identifies the network</li><li><strong>Host portion</strong> → Identifies the device inside the network</li></ul><p>Example:</p><pre>192.168.1.10/24</pre><p>In this example:</p><ul><li>Network: 192.168.1</li><li>Host: 10</li></ul><p>The /24 tells us that the first 24 bits belong to the network.</p><p>The remaining bits are used for hosts.</p><p>This allows multiple devices to exist on the same network while still having unique addresses.</p><h3>What Is a Subnet Mask?</h3><p>A subnet mask determines which part of an IP address belongs to the network and which part belongs to the host.</p><p>Example:</p><pre>IP Address:   192.168.1.10<br>Subnet Mask:  255.255.255.0</pre><p>This mask means:</p><pre>11111111.11111111.11111111.00000000</pre><p>The 1s represent network bits.<br>The 0s represent host bits.</p><p>This particular mask is also written as:</p><pre>/24</pre><p>which is called CIDR notation.</p><h3>CIDR Notation</h3><p>CIDR stands for:</p><p><strong>Classless Inter-Domain Routing</strong></p><p>CIDR notation is a shorter way of writing subnet masks.</p><p>Instead of writing:</p><pre>255.255.255.0</pre><p>we can write:</p><pre>/24</pre><p>The number after the slash represents how many bits belong to the network.</p><p>Examples:</p><ul><li>/24 → 255.255.255.0 → 256 IPs → 254 usable hosts</li><li>/25 → 255.255.255.128 → 128 IPs → 126 usable hosts</li><li>/26 → 255.255.255.192 → 64 IPs → 62 usable hosts</li><li>/27 → 255.255.255.224 → 32 IPs → 30 usable hosts</li><li>/28 → 255.255.255.240 → 16 IPs → 14 usable hosts</li></ul><h3>Understanding Subnetting</h3><p>Subnetting means dividing a larger network into smaller networks.</p><p>Why do this?</p><p>Because smaller networks are easier to manage and organize.</p><p>For example, a school or office may want separate networks for:</p><ul><li>students</li><li>staff</li><li>guest Wi‑Fi</li><li>servers</li></ul><p>Subnetting helps keep those groups separated and organized.</p><h3>A Simple Subnetting Example</h3><p>Suppose we start with:</p><pre>192.168.1.0/24</pre><p>A /24 gives us:</p><pre>256 total addresses<br>254 usable hosts</pre><p>Now imagine we want <strong>4 smaller subnets</strong>.</p><p>We borrow 2 bits:</p><pre>/24 → /26</pre><p>Each /26 subnet contains:</p><pre>64 addresses<br>62 usable hosts</pre><p>The subnets become:</p><ul><li>192.168.1.0/26 → .0 – .63</li><li>192.168.1.64/26 → .64 – .127</li><li>192.168.1.128/26 → .128 – .191</li><li>192.168.1.192/26 → .192 – .255</li></ul><h3>How to Calculate Subnets</h3><p>Subnet calculation becomes easier when broken into steps.</p><h3>Step 1: Identify the CIDR</h3><p>Example:</p><pre>192.168.1.70/26</pre><p>The /26 tells us:</p><ul><li>26 bits are used for the network</li><li>remaining bits are used for hosts</li></ul><p>Subnet mask:</p><pre>255.255.255.192</pre><h3>Step 2: Find the Block Size</h3><p>Formula:</p><pre>256 − subnet mask octet</pre><p>Example:</p><pre>256 − 192 = 64</pre><p>So the subnet increases by 64.</p><p>Possible subnet ranges:</p><ul><li>0 – 63</li><li>64 – 127</li><li>128 – 191</li><li>192 – 255</li></ul><h3>Step 3: Find the Correct Subnet</h3><p>The IP address is:</p><pre>192.168.1.70</pre><p>Since 70 falls between 64 and 127:</p><ul><li>Network ID: 192.168.1.64</li><li>Broadcast Address: 192.168.1.127</li><li>First Usable IP: 192.168.1.65</li><li>Last Usable IP: 192.168.1.126</li></ul><h3>Step 4: Calculate Host Count</h3><p>Formula:</p><pre>2^(32 − prefix)</pre><p>Example:</p><pre>32 − 26 = 6<br>2^6 = 64 addresses</pre><p>Two addresses are reserved:</p><ul><li>network address</li><li>broadcast address</li></ul><p>So:</p><pre>64 − 2 = 62 usable hosts---</pre><pre># Quick Subnet Reference</pre><pre>- `/24` → 256 IPs → 254 usable hosts<br>- `/25` → 128 IPs → 126 usable hosts<br>- `/26` → 64 IPs → 62 usable hosts<br>- `/27` → 32 IPs → 30 usable hosts<br>- `/28` → 16 IPs → 14 usable hosts<br>- `/29` → 8 IPs → 6 usable hosts<br>- `/30` → 4 IPs → 2 usable hosts</pre><pre># The Fastest Way to Calculate Subnets</pre><pre>One of the easiest subnetting tricks is<br>Block size = 256 − subnet mask octet</pre><p>Example:</p><pre>/26 = 255.255.255.192</pre><p>So:</p><pre>256 − 192 = 64</pre><p>That means subnets increase by 64:</p><pre>0, 64, 128, 192</pre><p>This shortcut solves most beginner subnetting questions.</p><h3>Network Address, Broadcast Address, and Usable Hosts</h3><p>Every subnet contains:</p><ul><li><strong>Network address</strong> → Identifies the subnet</li><li><strong>Broadcast address</strong> → Sends traffic to all devices</li><li><strong>Usable hosts</strong> → Devices inside the subnet</li></ul><h3>Public vs Private IP Addresses</h3><p>IP addresses are divided into two main types:</p><ul><li><strong>Public IP</strong> → Used on the internet</li><li><strong>Private IP</strong> → Used inside local networks</li></ul><h3>Private IP Addresses</h3><p>Private IP addresses are used inside:</p><ul><li>homes</li><li>schools</li><li>offices</li><li>internal company networks</li></ul><p>These addresses cannot be accessed directly from the public internet.</p><p>Main private IP ranges:</p><ul><li>10.0.0.0 – 10.255.255.255 → 10.0.0.0/8</li><li>172.16.0.0 – 172.31.255.255 → 172.16.0.0/12</li><li>192.168.0.0 – 192.168.255.255 → 192.168.0.0/16</li></ul><h3>Public IP Addresses</h3><p>Public IP addresses are used on the internet.</p><p>Websites, cloud servers, and internet-facing services use public IPs so devices around the world can reach them.</p><p>Internet service providers (ISPs) assign public IP addresses to users and organizations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56638b14eb91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[System Health Check Report with Bash Scripting]]></title>
            <link>https://medium.com/@jaynvaisak/system-health-check-report-with-bash-scripting-4d28eee34441?source=rss-1f76e42c0b67------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d28eee34441</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[bash-script]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Vaisakh J]]></dc:creator>
            <pubDate>Tue, 12 May 2026 07:30:36 GMT</pubDate>
            <atom:updated>2026-05-12T07:30:36.347Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gIX3Mlli6kKwPdfRd3CSUQ.png" /></figure><p>When learning Linux and Bash scripting, one of the best ways to improve is by building small automation projects.</p><p>Instead of manually checking system uptime, CPU load, memory usage, and disk space every day, I wanted to automate the process using a simple Bash script.</p><p>This project helped me understand how Bash scripting works in real-world system administration tasks. It also gave me hands-on experience with Linux commands, automation, report generation, and Cron jobs.</p><p>In this article, I’ll share how I created a daily system health check report using Bash scripting and automated it to run every day.</p><h3>What Is a Bash Script?</h3><p>A Bash script is a file that contains Linux commands.</p><p>Instead of typing commands manually one by one in the terminal, the commands can be stored inside a script file and executed together.</p><p>Bash scripting helps:</p><ul><li>Automate repetitive tasks</li><li>Save time</li><li>Reduce manual work</li><li>Manage Linux systems efficiently</li></ul><p>It is widely used in:</p><ul><li>Linux Administration</li><li>DevOps</li><li>Cloud Computing</li><li>Server Monitoring</li></ul><h3>System Health Check Script</h3><p>The following Bash script generates a simple system health report.</p><pre>#!/bin/bash</pre><pre># File name for the report<br>REPORT=&quot;/tmp/health_report_$(date +%F).txt&quot;</pre><pre>{<br>  echo &quot;===== SYSTEM HEALTH REPORT =====&quot;</pre><pre>  echo &quot;Date: $(date)&quot;<br>  echo &quot;Hostname: $(hostname)&quot;<br>  echo &quot;Uptime: $(uptime -p)&quot;</pre><pre>  echo &quot;&quot;<br>  echo &quot;----- CPU Load -----&quot;<br>  uptime | awk -F&#39;load average:&#39; &#39;{print $2}&#39;</pre><pre>  echo &quot;&quot;<br>  echo &quot;----- Memory Usage -----&quot;<br>  free -h</pre><pre>  echo &quot;&quot;<br>  echo &quot;----- Disk Usage -----&quot;<br>  df -h | grep -v tmpfs</pre><pre>} &gt; $REPORT</pre><pre># Display the report<br>cat $REPORT</pre><h3>Understanding the Script</h3><h3>1. Shebang Line</h3><pre>#!/bin/bash</pre><p>This line tells Linux to run the script using the Bash shell.</p><h3>2. Creating a Report File</h3><pre>REPORT=&quot;/tmp/health_report_$(date +%F).txt&quot;</pre><p>A variable named REPORT is created to store the report file name.</p><p>The $(date +%F) command automatically adds the current date to the filename.</p><p>Example:</p><pre>health_report_2026-05-09.txt</pre><h3>Displaying System Information</h3><h3>Current Date</h3><pre>echo &quot;Date: $(date)&quot;</pre><p>Displays the current date and time.</p><h3>Hostname</h3><pre>echo &quot;Hostname: $(hostname)&quot;</pre><p>Displays the system or server name.</p><h3>System Uptime</h3><pre>echo &quot;Uptime: $(uptime -p)&quot;</pre><p>Shows how long the system has been running.</p><p>Example:</p><pre>up 12 days, 4 hours</pre><h3>Checking CPU Load</h3><pre>uptime | awk -F&#39;load average:&#39; &#39;{print $2}&#39;</pre><p>This command displays the CPU load average.</p><p>The awk command extracts only the load values from the output.</p><p>Example:</p><pre>0.45, 0.52, 0.48</pre><h3>Checking Memory Usage</h3><pre>free -h</pre><p>Displays:</p><ul><li>Total memory</li><li>Used memory</li><li>Free memory</li></ul><p>The -h option means human-readable format.</p><h3>Checking Disk Usage</h3><pre>df -h | grep -v tmpfs</pre><p>Displays disk usage information.</p><p>The grep -v tmpfs command removes temporary filesystem entries from the output.</p><p>Example:</p><pre>/dev/sda1  50G  28G  20G  59% /</pre><h3>Saving Output to a File</h3><pre>} &gt; $REPORT</pre><p>This redirects all output into the report file.</p><h3>Displaying the Final Report</h3><pre>cat $REPORT</pre><p>Displays the generated report on the terminal.</p><h3>Sample Output</h3><pre>===== SYSTEM HEALTH REPORT =====<br>Date: Sat May 9 08:30:00 IST 2026<br>Hostname: web-server-01<br>Uptime: up 12 days, 4 hours</pre><pre>----- CPU Load -----<br>0.45, 0.52, 0.48</pre><pre>----- Memory Usage -----<br>Mem: 7.7Gi  3.2Gi  2.1Gi</pre><pre>----- Disk Usage -----<br>/dev/sda1  50G  28G  20G  59% /</pre><h3>Automating the Script with Cron</h3><p>After creating the Bash script, the next step is automation.</p><p>In Linux, scheduled automation is commonly done using Cron.</p><p>Open the cron editor:</p><pre>crontab -e</pre><p>Add the following line:</p><pre>0 8 * * * /path/to/system_health.sh</pre><p>This runs the script automatically every day at 8:00 AM.</p><h3>Possible Enhancements</h3><p>Once the basic script works, more features can be added.</p><h3>Email Notifications</h3><p>Send reports automatically through email:</p><pre>mail -s &quot;Daily Health Report&quot; admin@example.com &lt; $REPORT</pre><h3>Service Status Checks</h3><p>Check important services:</p><pre>systemctl status nginx<br>systemctl status mysql</pre><h3>Network Monitoring</h3><p>Display network details:</p><pre>ip addr<br>netstat -tulnp</pre><h3>Threshold Alerts</h3><p>Add warnings when:</p><ul><li>CPU usage becomes too high</li><li>Disk usage exceeds 80%</li><li>Memory becomes critically low</li></ul><p>Through this project, I learned how Bash scripting can automate daily Linux tasks and generate system health reports automatically. I also gained hands-on experience with Linux commands, variables, output redirection, and Cron job scheduling.</p><p>Working on this script helped me better understand how automation is used in real-world Linux and DevOps environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d28eee34441" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the Linux Filesystem Hierarchy]]></title>
            <link>https://medium.com/@jaynvaisak/understanding-the-linux-filesystem-hierarchy-9adb57f8354e?source=rss-1f76e42c0b67------2</link>
            <guid isPermaLink="false">https://medium.com/p/9adb57f8354e</guid>
            <category><![CDATA[linux-fundamentals]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Vaisakh J]]></dc:creator>
            <pubDate>Sun, 03 May 2026 22:26:36 GMT</pubDate>
            <atom:updated>2026-05-12T17:50:13.732Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GW5fE0W6qkuZ8VO-OvEEpg.png" /></figure><p>In Linux, all files and directories are organized under a single root directory represented by /.</p><p>This structure follows the <strong>Filesystem Hierarchy Standard (FHS)</strong>, which defines how directories are organized and what their purposes are.</p><p>Unlike operating systems such as Windows, Linux does not use separate drive letters like C: or D:. Instead, it uses a unified directory tree.</p><h3>The Root Directory (/)</h3><p>Everything in Linux starts from the root directory:</p><p>This is the top-level directory.</p><p>All files and folders exist under it. Even external storage devices are mounted somewhere within this structure.</p><h3>Root (/) Hierarchy Overview</h3><pre>Root Directory (/)<br>│<br>├── bin<br>├── boot<br>├── dev<br>├── etc<br>├── home<br>├── lib<br>├── opt<br>├── proc<br>├── root<br>├── sbin<br>├── sys<br>├── tmp<br>├── usr<br>├── var<br>├── media<br>└── mnt</pre><p>This structure shows how all directories branch from /.</p><h3><strong>Linux Filesystem Structure</strong></h3><h3>Core Directories — Symbolic Links (Less Significant)</h3><h4>/bin – Essential User Commands</h4><p>Contains essential commands used by all users:</p><ul><li>ls – list files</li><li>cp – copy files</li><li>mv – move files</li><li>cat – view file contents</li></ul><h4>/sbin – System Commands</h4><p>Used for system administration:</p><ul><li>reboot – restart the system</li><li>fsck – check the filesystem</li><li>useradd – create users</li></ul><h4>/lib and /lib64 – Libraries</h4><p>Contain essential libraries required for system programs to run.</p><p>On modern Linux systems, /bin and /sbin are often symbolic links to directories inside /usr.</p><h3>Important System Directories</h3><h4>/boot – Boot Files</h4><p>Contains files required to start the system, including:</p><ul><li>Kernel</li><li>Bootloader</li></ul><h4>/var – Variable Data</h4><p>Stores frequently changing data:</p><ul><li>/var/log – system logs</li><li>/var/cache – cached data</li><li>/var/mail – mail storage</li></ul><p>This directory is often used for monitoring and debugging.</p><h4>/usr – Programs and Libraries</h4><p>Contains most applications and shared resources:</p><ul><li>/usr/bin – user commands</li><li>/usr/lib – libraries</li><li>/usr/share – shared data</li></ul><p>It does not contain user personal files.</p><h4>/etc – Configuration Files</h4><p>Stores system-wide configuration files:</p><ul><li>/etc/passwd – user accounts</li><li>/etc/hosts – hostname mappings</li><li>/etc/fstab – filesystem mount settings</li></ul><p>This directory defines how the system behaves.</p><h3>User &amp; Application-Specific Directories</h3><h4>/home – User Directories</h4><p>Each user has a personal directory under /home:</p><ul><li>/home/vaisakh</li></ul><p>This directory is used for personal files, downloads, and user-specific settings.</p><h4>/opt – Optional Software</h4><p>Used for third-party or manually installed applications:</p><ul><li>/opt/google/</li><li>/opt/zoom/</li></ul><p>Each application is usually installed in its own subdirectory.</p><h4>/srv – Service Data</h4><p>Contains data used by system services such as web servers, FTP servers, and other network services.</p><h4>/root – Root User Home</h4><p>This is the home directory for the system administrator (root user):</p><ul><li>/root</li></ul><p>It contains configuration files and administrative data specific to the root user.</p><h3>Temporary &amp; Volatile Directories</h3><h4>/tmp – Temporary Files</h4><p>Used for temporary data.</p><p>Files stored here may be deleted automatically after reboot or after a set period.</p><h4>/run – Runtime Data</h4><p>Stores runtime information for processes since system boot, such as process IDs and sockets.</p><h4>/proc – Process Information</h4><p>A virtual filesystem that provides system and process information, such as:</p><ul><li>/proc/cpuinfo</li><li>/proc/meminfo</li></ul><h4>/sys – System Interface</h4><p>Provides an interface to the Linux kernel and hardware devices.It allows interaction with system components at runtime.</p><h4>/dev – Device Files</h4><p>Represents hardware devices as files:</p><ul><li>/dev/sda – storage device</li><li>/dev/null – discards output</li></ul><h3>Mount Points</h3><h4>/mnt – Manual Mounts</h4><p>Used for temporarily mounting filesystems manually.</p><h4>/media – Auto-mounted Devices</h4><p>Used for removable media such as USB drives, external disks, and CDs.</p><h4>/data – Custom Mount Point</h4><p>Often used on servers to store application data, databases, or large datasets.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9adb57f8354e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Linux Architecture]]></title>
            <link>https://medium.com/@jaynvaisak/understanding-linux-architecture-93c2042dc094?source=rss-1f76e42c0b67------2</link>
            <guid isPermaLink="false">https://medium.com/p/93c2042dc094</guid>
            <category><![CDATA[linux-architecture]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Vaisakh J]]></dc:creator>
            <pubDate>Sun, 03 May 2026 17:59:49 GMT</pubDate>
            <atom:updated>2026-05-12T17:39:44.256Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*HORnlk-YGPegv5t_a7qb3w.png" /></figure><p>Linux powers everything from personal laptops to massive cloud infrastructures. What makes it so effective is its <strong>clean, layered architecture</strong> — a design that keeps the system stable, efficient, and flexible.This guide walks through that architecture in a structured and visual way.</p><h3>The Big Picture</h3><p>Linux is built as a <strong>layered system</strong>, where each layer has a defined role and communicates with the layer below it.</p><pre>+---------------------------+<br>|   User Applications       |<br>+---------------------------+<br>|   System Utilities        |<br>+---------------------------+<br>|   System Libraries        |<br>+---------------------------+<br>|   Kernel                  |<br>+---------------------------+<br>|   Hardware                |<br>+---------------------------+</pre><h3>1. Hardware</h3><p>The foundation of the system includes:</p><ul><li>CPU (processing unit)</li><li>RAM (memory)</li><li>Storage (HDD/SSD)</li><li>Input/output devices</li></ul><p>These components perform actual operations, but they rely entirely on the kernel for control.</p><h3>2. Kernel</h3><p>The <strong>kernel</strong> is the core of Linux. It directly interacts with hardware and manages all system operations.</p><ul><li><strong>Processes</strong> → runs and schedules programs</li><li><strong>Memory</strong> → allocates and manages RAM</li><li><strong>Devices</strong> → communicates via drivers</li><li><strong>File Systems</strong> → handles files and permissions</li><li><strong>System Calls</strong> → connects apps to hardware</li></ul><p>Linux uses a <strong>monolithic yet modular kernel</strong>, combining performance with flexibility.</p><h3>3. System Libraries</h3><p>System libraries provide a <strong>standard interface</strong> for applications to interact with the kernel.</p><p>Instead of writing low-level system calls, programs use libraries such as:</p><ul><li>glibc (GNU C Library)</li></ul><h3>4. System Utilities</h3><p>Utilities are essential tools used to manage and operate the system. They help perform everyday tasks like file management, process control, and system monitoring.</p><h4>Common Examples:</h4><ul><li>ls → list files</li><li>cp → copy files</li><li>mv → move files</li><li>uname → system info</li><li>rm → delete files</li></ul><p>They act as a bridge between users and system functionality.</p><h3>5. User Applications</h3><p>This layer includes all user-facing software:</p><ul><li>Browsers</li><li>Editors</li><li>Servers</li><li>Desktop environments</li></ul><p>Applications operate in <strong>user space</strong> and cannot directly access hardware. All requests must go through the kernel.</p><h3>User Space vs Kernel Space</h3><p>Linux enforces a strict separation between:</p><p>LayerDescriptionKernel SpaceFull access to hardware and system resourcesUser SpaceRestricted environment for applications</p><p>This design ensures:</p><ul><li>Stability (failures are isolated)</li><li>Security (controlled access)</li></ul><h3>Execution Flow (Example)</h3><p>Command:</p><pre>cat file.txt</pre><h3>Internal Flow:</h3><ol><li>User enters command</li><li>Shell invokes the utility (cat)</li><li>Library function is used</li><li>System call is sent to kernel</li><li>Kernel processes request</li><li>Hardware retrieves data</li><li>Output is returned to the terminal</li></ol><h3>End-to-End Flow Visualization</h3><pre>User → Application → Library → System Call → Kernel → Driver → Hardware<br>                                      ↑<br>                                   Response</pre><h3>Key Strengths of Linux Architecture</h3><ul><li><strong>Modular Design</strong> → Easy to extend and maintain</li><li><strong>Stability</strong> → Failures are contained</li><li><strong>Security</strong> → Controlled hardware access</li><li><strong>Portability</strong> → Runs across multiple architectures</li></ul><p>Linux architecture stands out because of its <strong>clarity and efficiency</strong>. Each layer has a specific responsibility, and together they create a system that is both powerful and reliable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93c2042dc094" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>