<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Debabrata Pradhan</title>
    <description>The latest articles on DEV Community by Debabrata Pradhan (@deba4ever).</description>
    <link>https://dev.to/deba4ever</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4250208%2Fcf2e888b-ef4f-4453-a75d-524426a9438c.png</url>
      <title>DEV Community: Debabrata Pradhan</title>
      <link>https://dev.to/deba4ever</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deba4ever"/>
    <language>en</language>
    <item>
      <title>Refresher for Linux user.</title>
      <dc:creator>Debabrata Pradhan</dc:creator>
      <pubDate>Tue, 17 Nov 2026 16:10:38 +0000</pubDate>
      <link>https://dev.to/deba4ever/the-most-refresher-moment-for-linux-env-5fah</link>
      <guid>https://dev.to/deba4ever/the-most-refresher-moment-for-linux-env-5fah</guid>
      <description>&lt;p&gt;🐧 &lt;strong&gt;Revisiting the Basics: Linux Commands &amp;amp; Networking Concepts&lt;/strong&gt; 🌐&lt;/p&gt;

&lt;p&gt;Today, I spent some time revising Linux commands and networking concepts that we use almost every day in our IT operations.&lt;/p&gt;

&lt;p&gt;While working in issue troubleshooting, we come across situations where we need to check server health, investigate application issues, monitor logs, verify connectivity and troubleshoot a particular service.&lt;/p&gt;

&lt;p&gt;I thought of putting together some of the commands and concepts I have revised today. Having everything in one place will help me refresh my memory whenever needed. Hopefully, it will be useful for others working in similar roles as well.&lt;/p&gt;

&lt;p&gt;Here are some of the important things I went through. 👇&lt;/p&gt;

&lt;p&gt;📂 &lt;strong&gt;1. A Few Important Directories in Linux/Unix&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/home&lt;/code&gt; → Where user files and personal projects are stored.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc&lt;/code&gt; → Contains system configuration files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/var&lt;/code&gt; → Stores logs, caches, databases, and other frequently changing data.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/usr&lt;/code&gt; → Contains installed applications and libraries.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/tmp&lt;/code&gt; → Used for temporary files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/proc&lt;/code&gt; → Provides information about running processes and the Linux kernel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📍 &lt;strong&gt;2. Basic Directory Navigation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These are some of the commands we use regularly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.&lt;/code&gt; → Current directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;..&lt;/code&gt; → Parent directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;~&lt;/code&gt; → Home directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pwd&lt;/code&gt; → Check the current location.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls&lt;/code&gt; → List files and directories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt; → Move from one directory to another.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📁 &lt;strong&gt;3. Directory and File Management&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;During daily support activities, we frequently work with files, directories, and application logs.&lt;/p&gt;

&lt;p&gt;Some useful commands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mkdir -p&lt;/code&gt; → Create directories, including parent directories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;touch&lt;/code&gt; → Create an empty file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cp&lt;/code&gt; → Copy files or directories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mv&lt;/code&gt; → Move or rename files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rm -rf&lt;/code&gt; → Remove files or directories recursively and forcefully (always use carefully).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rmdir&lt;/code&gt; → Remove empty directories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cat&lt;/code&gt; → Display file contents.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;less&lt;/code&gt; → Read large files page by page.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;more&lt;/code&gt; → Browse file contents page by page.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;head&lt;/code&gt; → Display the first 10 lines by default.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tail&lt;/code&gt; → Display the last 10 lines by default.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tail -f&lt;/code&gt; → Keep monitoring a log file as new entries are added.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;grep&lt;/code&gt; → Search for specific words or patterns inside files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;find&lt;/code&gt; → Search for files and directories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wc -l&lt;/code&gt; → Count the number of lines.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;df -h&lt;/code&gt; → Check available disk space.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;du -sh&lt;/code&gt; → Check the size of a directory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🗜️ &lt;strong&gt;4. File Compression and Archiving&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes, we need to compress application logs or transfer large files between servers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;tar&lt;/code&gt; → Create and extract archives.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gzip&lt;/code&gt; → Compress individual files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gunzip&lt;/code&gt; → Decompress compressed files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;zip&lt;/code&gt; → Create ZIP archives.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;unzip&lt;/code&gt; → Extract ZIP files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⚙️ &lt;strong&gt;5. Service Management Using systemctl&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whenever an application or service is not responding, checking its status is one of the first things we generally do.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;systemctl status nginx&lt;/code&gt; → Check service status.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl start nginx&lt;/code&gt; → Start a service.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl stop nginx&lt;/code&gt; → Stop a service.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl restart nginx&lt;/code&gt; → Restart a service.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl enable nginx&lt;/code&gt; → Enable automatic startup during system boot.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl disable nginx&lt;/code&gt; → Disable automatic startup.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl reload nginx&lt;/code&gt; → Reload the service configuration without a full restart.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🌐 &lt;strong&gt;6. Network and Port Commands&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Networking commands are particularly useful when investigating connectivity issues between applications and servers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ip addr&lt;/code&gt; → Check network interfaces and IP addresses.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ping -c 1 hostname&lt;/code&gt; → Check basic network reachability.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ss -tulpn&lt;/code&gt; → Check listening TCP/UDP ports.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;curl&lt;/code&gt; → Test URLs, HTTP responses, and APIs.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nslookup&lt;/code&gt; → Verify DNS resolution.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nc -zv hostname port&lt;/code&gt; → Check connectivity to a specific port.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ip route&lt;/code&gt; → Check routing information.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;dig hostname&lt;/code&gt; → Perform DNS queries.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;traceroute hostname&lt;/code&gt; → Trace the network path to a destination.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;netstat -tulpn&lt;/code&gt; → Check network connections and listening ports.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📦 &lt;strong&gt;7. Package Management in Linux (APT)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;APT (Advanced Package Tool) is commonly used in Debian-based Linux distributions such as Ubuntu.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sudo apt update&lt;/code&gt; → Refresh the package index.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sudo apt upgrade&lt;/code&gt; → Upgrade installed software.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sudo apt install nginx&lt;/code&gt; → Install an application.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sudo apt remove nginx&lt;/code&gt; → Remove an application.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sudo apt autoremove&lt;/code&gt; → Remove unused dependencies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🐚 &lt;strong&gt;8. Bash Scripting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the useful things about Linux is that we can automate many repetitive activities using simple Bash scripts.&lt;/p&gt;

&lt;p&gt;A few basic concepts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;#!/bin/bash&lt;/code&gt; → Specifies the interpreter for the script.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;chmod +x script.sh&lt;/code&gt; → Makes a script executable.&lt;/li&gt;
&lt;li&gt;Variables → Store values.&lt;/li&gt;
&lt;li&gt;Functions → Reuse blocks of code.&lt;/li&gt;
&lt;li&gt;Conditions → Execute commands based on specific conditions.&lt;/li&gt;
&lt;li&gt;Loops → Automate repetitive tasks.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vi&lt;/code&gt; / &lt;code&gt;nano&lt;/code&gt; → Editors used to create and modify scripts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, we can write simple scripts to check application status, monitor logs, validate incoming files, and generate daily reports.&lt;/p&gt;

&lt;p&gt;🔐 &lt;strong&gt;9. Remote Server Connectivity – SSH&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In support operations, connecting to remote servers and transferring files is a common activity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some commonly used ports:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FTP → 20, 21.&lt;/li&gt;
&lt;li&gt;SSH / SFTP / SCP → 22.&lt;/li&gt;
&lt;li&gt;Telnet → 23.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Useful commands:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ssh user@host&lt;/code&gt; → Connect to a remote server.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ssh-keygen&lt;/code&gt; → Generate public and private SSH keys.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ssh-copy-id user@host&lt;/code&gt; → Copy the public key to a remote server.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;scp&lt;/code&gt; → Securely transfer files between machines.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rsync&lt;/code&gt; → Synchronize local and remote directory contents.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 &lt;strong&gt;10. Pipes, Redirection and Command Chaining&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another interesting thing about Linux is how we can combine multiple commands to get the required output.&lt;/p&gt;

&lt;p&gt;Instead of executing everything separately, the output of one command can be passed as input to another command.&lt;/p&gt;

&lt;p&gt;A few examples I use or find useful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ps aux | grep nginx&lt;/code&gt; → Find processes related to Nginx.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tail -f app.log | grep -i 'error'&lt;/code&gt; → Monitor error messages in real time.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls &amp;gt; files.txt&lt;/code&gt; → Save command output to a file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;echo "Done" &amp;gt;&amp;gt; deploy.log&lt;/code&gt; → Append information to an existing file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git pull &amp;amp;&amp;amp; npm install &amp;amp;&amp;amp; npm run build&lt;/code&gt; → Execute commands one after another only when the previous command succeeds.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;command1 || command2&lt;/code&gt; → Execute the second command if the first one fails.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🚨 &lt;strong&gt;11. Network Troubleshooting – What Should We Check?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whenever a customer reports that an application is slow or unreachable, we should not immediately conclude that the server is down.&lt;/p&gt;

&lt;p&gt;The issue could be related to DNS, network connectivity, firewall rules, application services, or backend dependencies.&lt;/p&gt;

&lt;p&gt;These are some of the checks that help narrow down the issue:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔍 &lt;code&gt;ping&lt;/code&gt; → Check basic network connectivity.&lt;/li&gt;
&lt;li&gt;🌐 &lt;code&gt;dig / nslookup&lt;/code&gt; → Verify whether DNS resolution is working.&lt;/li&gt;
&lt;li&gt;🔗 &lt;code&gt;curl&lt;/code&gt; → Check HTTP responses and API connectivity.&lt;/li&gt;
&lt;li&gt;🔌 &lt;code&gt;ss -tulpn&lt;/code&gt; → Verify which services are listening on which ports.&lt;/li&gt;
&lt;li&gt;📡 &lt;code&gt;nc -zv hostname port&lt;/code&gt; → Check whether a specific port is reachable.&lt;/li&gt;
&lt;li&gt;🛣️ &lt;code&gt;traceroute&lt;/code&gt; → Identify the network hops between source and destination.&lt;/li&gt;
&lt;li&gt;🔄 &lt;code&gt;ip route&lt;/code&gt; → Verify routing information.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A useful curl command to check HTTP response codes and response time:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl -s -o /dev/null -w "Status: %{http_code} | Time: %{time_total}s\n" https://hostname&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This gives us the HTTP response code along with the total response time.&lt;/p&gt;

&lt;p&gt;🔌 &lt;strong&gt;12. Commonly Used Ports&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A port helps identify the specific service or application endpoint running on a server.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;22 → SSH.&lt;/li&gt;
&lt;li&gt;25 → SMTP.&lt;/li&gt;
&lt;li&gt;53 → DNS.&lt;/li&gt;
&lt;li&gt;80 → HTTP.&lt;/li&gt;
&lt;li&gt;443 → HTTPS.&lt;/li&gt;
&lt;li&gt;1521 → Oracle Database.&lt;/li&gt;
&lt;li&gt;1433 → Microsoft SQL Server.&lt;/li&gt;
&lt;li&gt;5432 → PostgreSQL.&lt;/li&gt;
&lt;li&gt;3306 → MySQL.&lt;/li&gt;
&lt;li&gt;27017 → MongoDB.&lt;/li&gt;
&lt;li&gt;3389 → RDP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🌍 &lt;strong&gt;13. HTTP and HTTPS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whenever we access a website or call an API, HTTP/HTTPS helps establish communication between the client and server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common HTTP Methods:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GET → Retrieve data.&lt;/li&gt;
&lt;li&gt;POST → Create or submit data.&lt;/li&gt;
&lt;li&gt;PUT → Update or replace a resource.&lt;/li&gt;
&lt;li&gt;DELETE → Delete a resource.&lt;/li&gt;
&lt;li&gt;PATCH → Partially update a resource.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;HTTP Status Codes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1xx → Informational responses.&lt;/li&gt;
&lt;li&gt;2xx → Successful responses.&lt;/li&gt;
&lt;li&gt;3xx → Redirection.&lt;/li&gt;
&lt;li&gt;4xx → Client-side errors.&lt;/li&gt;
&lt;li&gt;5xx → Server-side errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;HTTPS uses TLS encryption to secure communication and helps maintain data confidentiality and integrity during transmission.&lt;/p&gt;

&lt;p&gt;🛡️ &lt;strong&gt;14. Firewalls&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A firewall plays an important role in securing servers and applications by controlling incoming and outgoing network traffic.&lt;/p&gt;

&lt;p&gt;Some basic concepts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📥 Inbound Traffic → Requests coming into the server.&lt;/li&gt;
&lt;li&gt;📤 Outbound Traffic → Requests going out from the server.&lt;/li&gt;
&lt;li&gt;✅ Allow Rules → Permit specific traffic.&lt;/li&gt;
&lt;li&gt;🚫 Deny Rules → Block specific traffic.&lt;/li&gt;
&lt;li&gt;🔐 Least Privilege → Allow only the access that is actually required.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⚖️ &lt;strong&gt;15. Load Balancers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A load balancer distributes incoming application requests across multiple backend servers instead of sending all traffic to a single server.&lt;/p&gt;

&lt;p&gt;Some important benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⚖️ Distributes incoming traffic.&lt;/li&gt;
&lt;li&gt;❤️ Performs backend server health checks.&lt;/li&gt;
&lt;li&gt;🔄 Helps manage failover when a server becomes unhealthy.&lt;/li&gt;
&lt;li&gt;🚀 Improves application availability.&lt;/li&gt;
&lt;li&gt;📈 Supports application scalability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These concepts are widely used in cloud platforms, Kubernetes, and modern production environments.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;A Small Learning Takeaway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While revising all these commands, one thing I realized is that we don't always need to learn something new to improve our troubleshooting skills.&lt;/p&gt;

&lt;p&gt;Sometimes, going back to the basics and understanding how to use them effectively can make a big difference during production incidents.&lt;/p&gt;

&lt;p&gt;📚 &lt;strong&gt;Keep learning, keep practicing the fundamentals!&lt;/strong&gt; 🚀&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
  </channel>
</rss>
