<?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: Alkesh Baghel</title>
    <description>The latest articles on DEV Community by Alkesh Baghel (@alkesh009).</description>
    <link>https://dev.to/alkesh009</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3082725%2F715ff4f9-084d-4640-9453-02f6e6d014bc.png</url>
      <title>DEV Community: Alkesh Baghel</title>
      <link>https://dev.to/alkesh009</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alkesh009"/>
    <language>en</language>
    <item>
      <title>Concept Of Ingress In Kubernetes : Basics</title>
      <dc:creator>Alkesh Baghel</dc:creator>
      <pubDate>Fri, 02 May 2025 07:06:57 +0000</pubDate>
      <link>https://dev.to/alkesh009/concept-of-ingress-in-kubernetes-basics-14hl</link>
      <guid>https://dev.to/alkesh009/concept-of-ingress-in-kubernetes-basics-14hl</guid>
      <description>&lt;h2&gt;
  
  
  🌀 What is Ingress in Kubernetes?
&lt;/h2&gt;

&lt;p&gt;Hey! So today, let’s talk about &lt;strong&gt;Ingress&lt;/strong&gt; in Kubernetes. If you’re working with Kubernetes and wondering &lt;strong&gt;how the outside world can access your apps inside the cluster&lt;/strong&gt;, Ingress is your answer.&lt;/p&gt;




&lt;h3&gt;
  
  
  💡 In Simple Words...
&lt;/h3&gt;

&lt;p&gt;Ingress is like the &lt;strong&gt;front door&lt;/strong&gt; to your Kubernetes cluster for web traffic (HTTP and HTTPS). It knows &lt;strong&gt;where to send incoming requests&lt;/strong&gt; based on rules you define. Think of it like a &lt;strong&gt;traffic controller&lt;/strong&gt; at a mall entrance, telling visitors which shop to go to.&lt;/p&gt;




&lt;h3&gt;
  
  
  🛠️ A Real YAML Example of Ingress
&lt;/h3&gt;

&lt;p&gt;Let’s break down a real Ingress configuration that uses the NGINX Ingress Controller:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;networking.k8s.io/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Ingress&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;minimal-ingress&lt;/span&gt;
  &lt;span class="na"&gt;annotations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;nginx.ingress.kubernetes.io/rewrite-target&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;ingressClassName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx-example&lt;/span&gt;
  &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;http&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/testpath&lt;/span&gt;
        &lt;span class="na"&gt;pathType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Prefix&lt;/span&gt;
        &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;test&lt;/span&gt;
            &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;number&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🔍 What’s Happening Here?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Annotations&lt;/strong&gt;: Rewrite any request to &lt;code&gt;/testpath&lt;/code&gt; to &lt;code&gt;/&lt;/code&gt; before sending to the backend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ingressClassName&lt;/strong&gt;: Tells Kubernetes which Ingress Controller to use (in this case, &lt;code&gt;nginx-example&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;rules&lt;/strong&gt;: Says, "If someone hits &lt;code&gt;/testpath&lt;/code&gt;, forward the request to the &lt;code&gt;test&lt;/code&gt; service on port &lt;code&gt;80&lt;/code&gt;."&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🧭 What is &lt;code&gt;pathType&lt;/code&gt; and Why It Matters?
&lt;/h3&gt;

&lt;p&gt;Each path in an Ingress rule &lt;strong&gt;must have a &lt;code&gt;pathType&lt;/code&gt;&lt;/strong&gt;. It tells Kubernetes &lt;strong&gt;how to match the request path&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  🧩 Supported &lt;code&gt;pathType&lt;/code&gt; values:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Prefix&lt;/code&gt;&lt;/strong&gt; – Matches if the request path &lt;em&gt;starts with&lt;/em&gt; the given path.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Exact&lt;/code&gt;&lt;/strong&gt; – Matches &lt;em&gt;only if&lt;/em&gt; the request path is exactly the same.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;ImplementationSpecific&lt;/code&gt;&lt;/strong&gt; – Behavior depends on the Ingress Controller you're using.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  ➕ Multiple Matches – Who Wins?
&lt;/h3&gt;

&lt;p&gt;If more than one rule matches a request, Kubernetes uses the following logic:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Longest matching path wins&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;If paths are the same length, &lt;strong&gt;&lt;code&gt;Exact&lt;/code&gt; wins over &lt;code&gt;Prefix&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🔄 Types of Ingress
&lt;/h2&gt;

&lt;p&gt;There are three common types of Ingress setups:&lt;/p&gt;




&lt;h3&gt;
  
  
  1. &lt;strong&gt;Path-Based Routing (Rule-Based Routing)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This is the most common type. You route requests based on the URL path.&lt;/p&gt;

&lt;p&gt;➡️ Already covered in the &lt;code&gt;minimal-ingress&lt;/code&gt; YAML.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. &lt;strong&gt;Default Backend Ingress&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This type doesn't define any specific rules. It acts as a &lt;strong&gt;catch-all&lt;/strong&gt;. If no rule matches, it sends traffic to a default service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;networking.k8s.io/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Ingress&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;test-ingress&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;defaultBackend&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;test&lt;/span&gt;
      &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;number&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Think of it like: "If a request doesn’t match any rule, just send it to the &lt;code&gt;test&lt;/code&gt; service."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  3. &lt;strong&gt;Host-Based Routing (Name-Based Routing)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This lets you route traffic based on the &lt;strong&gt;domain name&lt;/strong&gt; used in the request. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;foo.example.com&lt;/code&gt; → goes to one service&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;bar.example.com&lt;/code&gt; → goes to another service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;networking.k8s.io/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Ingress&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;host-based-ingress&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;ingressClassName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&lt;/span&gt;
  &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;foo.example.com&lt;/span&gt;
    &lt;span class="na"&gt;http&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/&lt;/span&gt;
        &lt;span class="na"&gt;pathType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Prefix&lt;/span&gt;
        &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;foo-service&lt;/span&gt;
            &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;number&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bar.example.com&lt;/span&gt;
    &lt;span class="na"&gt;http&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/&lt;/span&gt;
        &lt;span class="na"&gt;pathType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Prefix&lt;/span&gt;
        &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bar-service&lt;/span&gt;
            &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;number&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🧠 &lt;strong&gt;Use case&lt;/strong&gt;: You have multiple websites or apps with different domain names hosted on the same Kubernetes cluster. This Ingress allows each one to route correctly.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧪 Deploy and View the Ingress
&lt;/h3&gt;

&lt;p&gt;Apply the Ingress YAML using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; your-ingress.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To view the Ingress resource:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get ingress
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME                CLASS    HOSTS                   ADDRESS          PORTS   AGE
host-based-ingress  nginx    foo.example.com,...     a1b2.elb...com   80      2m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; It may take a minute or two for AWS to assign an IP address or DNS to your Ingress. Until then, the address may show as &lt;code&gt;&amp;lt;pending&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  📦 Final Thoughts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Ingress is your &lt;strong&gt;smart HTTP/HTTPS gateway&lt;/strong&gt; into the cluster.&lt;/li&gt;
&lt;li&gt;You can configure routing:

&lt;ul&gt;
&lt;li&gt;Based on &lt;strong&gt;path&lt;/strong&gt; (e.g., &lt;code&gt;/test&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Based on &lt;strong&gt;host&lt;/strong&gt; (e.g., &lt;code&gt;foo.example.com&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Or fallback to a &lt;strong&gt;default backend&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Always define a &lt;code&gt;pathType&lt;/code&gt;.&lt;/li&gt;

&lt;li&gt;Use &lt;code&gt;kubectl get ingress&lt;/code&gt; to check its status.&lt;/li&gt;

&lt;li&gt;Give it a moment to get an IP—it's normal to see &lt;code&gt;&amp;lt;pending&amp;gt;&lt;/code&gt; at first.&lt;/li&gt;

&lt;/ul&gt;

</description>
      <category>kubernetes</category>
      <category>basic</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🐧 Linux Basics – Part 6: Understanding File Permissions</title>
      <dc:creator>Alkesh Baghel</dc:creator>
      <pubDate>Fri, 25 Apr 2025 04:55:54 +0000</pubDate>
      <link>https://dev.to/alkesh009/linux-basics-part-6-understanding-file-permissions-bgg</link>
      <guid>https://dev.to/alkesh009/linux-basics-part-6-understanding-file-permissions-bgg</guid>
      <description>&lt;p&gt;Let’s roll right into &lt;strong&gt;Part 6&lt;/strong&gt;! This one is all about &lt;strong&gt;file permissions&lt;/strong&gt;—a topic that might &lt;em&gt;look&lt;/em&gt; confusing at first, but don’t worry, we’ll break it down super simply. 😎&lt;/p&gt;




&lt;p&gt;Hey friends! 👋&lt;br&gt;&lt;br&gt;
Welcome back to our Linux series. By now, you've mastered file navigation, management, and even editing files in the terminal. 💻✨&lt;/p&gt;

&lt;p&gt;Today, we’re tackling something you &lt;em&gt;must&lt;/em&gt; know as a Linux user: &lt;strong&gt;file permissions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you’ve ever seen something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-rw-r--r-- 1 tejaswini tejaswini  120 Apr 25 10:35 hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;…and thought, “Uh, what is all &lt;em&gt;that&lt;/em&gt; supposed to mean?”—you’re in the right place. Let’s decode it. 🕵️‍♀️&lt;/p&gt;




&lt;h2&gt;
  
  
  🔐 What Are File Permissions?
&lt;/h2&gt;

&lt;p&gt;File permissions determine &lt;strong&gt;who can read, write, or execute&lt;/strong&gt; a file or folder.&lt;/p&gt;

&lt;p&gt;There are 3 types of permissions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;r&lt;/strong&gt; – read&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;w&lt;/strong&gt; – write&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;x&lt;/strong&gt; – execute&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And these apply to 3 groups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User&lt;/strong&gt; – the owner of the file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Group&lt;/strong&gt; – users in the same group as the owner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Others&lt;/strong&gt; – everyone else&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So &lt;code&gt;rw-r--r--&lt;/code&gt; breaks down like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ rw- ]  [ r-- ]  [ r-- ]
   ↑        ↑        ↑
 User     Group     Others
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;User can read + write&lt;/li&gt;
&lt;li&gt;Group can read only&lt;/li&gt;
&lt;li&gt;Others can read only&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;👀 Check Permissions – &lt;code&gt;ls -l&lt;/code&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;ls -l&lt;/code&gt; to see file details, including permissions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Output:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-rw-r--r-- 1 tejaswini tejaswini  120 Apr 25 10:35 hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s how to read it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-&lt;/code&gt;: it’s a file (&lt;code&gt;d&lt;/code&gt; would mean a directory)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rw-&lt;/code&gt;: owner can read/write&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;r--&lt;/code&gt;: group can only read&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;r--&lt;/code&gt;: others can only read&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;✏️ Change Permissions – &lt;code&gt;chmod&lt;/code&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;chmod&lt;/code&gt; (change mode) to modify permissions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Examples:
&lt;/h3&gt;

&lt;p&gt;Give everyone execute permission:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remove write access for group and others:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;go-w file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set permissions exactly (e.g. 755):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;755 myscript.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Quick number breakdown:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;7&lt;/code&gt; = read (4) + write (2) + execute (1)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;6&lt;/code&gt; = read + write&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;5&lt;/code&gt; = read + execute&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;4&lt;/code&gt; = read only&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;0&lt;/code&gt; = no permission&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So &lt;code&gt;chmod 755&lt;/code&gt; means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User:    rwx  (7)
Group:   r-x  (5)
Others:  r-x  (5)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  👑 &lt;strong&gt;Change Owner – &lt;code&gt;chown&lt;/code&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Sometimes, you’ll need to change who owns a file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo chown &lt;/span&gt;newuser:newgroup file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives ownership to &lt;code&gt;newuser&lt;/code&gt; and assigns it to &lt;code&gt;newgroup&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧪 &lt;strong&gt;Try It Yourself&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Create a file called &lt;code&gt;test.sh&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Give it execute permissions.&lt;/li&gt;
&lt;li&gt;Check the permission before and after.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;test.sh
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; test.sh
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x test.sh
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; test.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll see that &lt;code&gt;-rw-r--r--&lt;/code&gt; becomes &lt;code&gt;-rwxr-xr-x&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧭 &lt;strong&gt;Quick Reference Table&lt;/strong&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;View file permissions&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ls -l&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Add permission&lt;/td&gt;
&lt;td&gt;&lt;code&gt;chmod +x file&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Remove permission&lt;/td&gt;
&lt;td&gt;&lt;code&gt;chmod g-w file&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Set numeric permissions&lt;/td&gt;
&lt;td&gt;&lt;code&gt;chmod 755 file&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Change file owner&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sudo chown user:group file&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  ⚠️ &lt;strong&gt;Be Cautious&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Changing permissions can affect security. Be especially careful with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;chmod 777&lt;/code&gt; – gives &lt;strong&gt;everyone&lt;/strong&gt; full access (use only when absolutely needed)&lt;/li&gt;
&lt;li&gt;Scripts with &lt;code&gt;chmod +x&lt;/code&gt; – only do this for trusted files&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔚** Wrapping Up**
&lt;/h2&gt;

&lt;p&gt;Congrats! 🎉 You just unlocked a powerful part of Linux. File permissions might look intimidating at first, but once you understand the logic behind them, they’re super manageable—and crucial for keeping your system safe and organized.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Part 7&lt;/strong&gt;, we’ll explore &lt;strong&gt;Linux processes&lt;/strong&gt;—how to view running programs, stop them, and monitor system activity using commands like &lt;code&gt;ps&lt;/code&gt;, &lt;code&gt;top&lt;/code&gt;, and &lt;code&gt;kill&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Stay curious, keep playing with commands, and you’ll be a terminal wizard in no time. 🧙‍♀️&lt;/p&gt;




</description>
      <category>beginners</category>
      <category>linux</category>
      <category>tutorial</category>
      <category>learning</category>
    </item>
    <item>
      <title>🐧 Linux Basics – Part 5: Viewing and Editing Files from the Terminal</title>
      <dc:creator>Alkesh Baghel</dc:creator>
      <pubDate>Fri, 25 Apr 2025 04:50:22 +0000</pubDate>
      <link>https://dev.to/alkesh009/linux-basics-part-5-viewing-and-editing-files-from-the-terminal-1g0k</link>
      <guid>https://dev.to/alkesh009/linux-basics-part-5-viewing-and-editing-files-from-the-terminal-1g0k</guid>
      <description>&lt;p&gt;Hey there! 👋&lt;br&gt;&lt;br&gt;
Welcome back to our Linux series! So far, you’ve learned how to move around the filesystem, manage files and folders, and probably started feeling like a terminal pro. 🔥&lt;/p&gt;

&lt;p&gt;Now it’s time to learn how to &lt;strong&gt;view and edit file content directly from the command line.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This is &lt;em&gt;super handy&lt;/em&gt; when you’re working on servers, writing scripts, or just don’t want to open a full-blown text editor.&lt;/p&gt;

&lt;p&gt;Let’s break it down with the most commonly used commands. 👇&lt;/p&gt;


&lt;h2&gt;
  
  
  👁️ &lt;strong&gt;View File Content – &lt;code&gt;cat&lt;/code&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;cat&lt;/code&gt; command is the quickest way to display the contents of a file.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It will print everything inside &lt;code&gt;hello.txt&lt;/code&gt; right there in your terminal.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 Tip: Best for small files. It can get messy if the file is too long.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  🧵 &lt;strong&gt;View One Page at a Time – &lt;code&gt;less&lt;/code&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;For bigger files, use &lt;code&gt;less&lt;/code&gt;. It lets you scroll and search too!&lt;/p&gt;
&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;less bigfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Use the arrow keys to scroll, &lt;code&gt;q&lt;/code&gt; to quit.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🧠 Fun fact: You can search inside &lt;code&gt;less&lt;/code&gt; by typing &lt;code&gt;/word&lt;/code&gt; and hitting Enter.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  🔍 &lt;strong&gt;See the Beginning – &lt;code&gt;head&lt;/code&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Want to quickly peek at the first few lines?&lt;/p&gt;
&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;head &lt;/span&gt;hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;By default, it shows the first 10 lines. Want more?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 20 hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔚 &lt;strong&gt;See the End – &lt;code&gt;tail&lt;/code&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;As the name suggests, &lt;code&gt;tail&lt;/code&gt; shows the &lt;em&gt;end&lt;/em&gt; of a file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;tail &lt;/span&gt;hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also shows 10 lines by default. Want to see the last 5?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 5 hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bonus: You can even &lt;strong&gt;watch a file in real time&lt;/strong&gt; (great for logs):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; server.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ✍️ &lt;strong&gt;Editing Files – &lt;code&gt;nano&lt;/code&gt; (Beginner-Friendly Editor)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Ready to make some changes? &lt;code&gt;nano&lt;/code&gt; is a simple text editor that works right in the terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano notes.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll be taken into an interactive editor. Use arrow keys to move around, make your edits, and when you’re done:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Press &lt;code&gt;Ctrl + O&lt;/code&gt; to save&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;Enter&lt;/code&gt; to confirm filename&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;Ctrl + X&lt;/code&gt; to exit&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧠 Compared to Windows: Think of it like a very minimal Notepad, but in the terminal.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🧪** Mini Challenge**
&lt;/h2&gt;

&lt;p&gt;Try this mini project to get hands-on:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a file named &lt;code&gt;quote.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add your favorite quote using &lt;code&gt;nano&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;View it using &lt;code&gt;cat&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Check the first line using &lt;code&gt;head -n 1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Check the last line using &lt;code&gt;tail -n 1&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;quote.txt
nano quote.txt
&lt;span class="nb"&gt;cat &lt;/span&gt;quote.txt
&lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 1 quote.txt
&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 1 quote.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Easy and useful!&lt;/p&gt;




&lt;h2&gt;
  
  
  🧭 &lt;strong&gt;Quick Reference&lt;/strong&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;View full file&lt;/td&gt;
&lt;td&gt;&lt;code&gt;cat filename&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;View paged content&lt;/td&gt;
&lt;td&gt;&lt;code&gt;less filename&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;View top lines&lt;/td&gt;
&lt;td&gt;&lt;code&gt;head filename&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;View bottom lines&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tail filename&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Watch file in real-time&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tail -f filename&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edit a file&lt;/td&gt;
&lt;td&gt;&lt;code&gt;nano filename&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🔚 &lt;strong&gt;Wrapping Up&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;And that’s a wrap for Part 5! 🥳&lt;br&gt;&lt;br&gt;
Being able to &lt;em&gt;quickly view and edit files&lt;/em&gt; from the terminal is a superpower, especially when working on remote systems or debugging scripts.&lt;/p&gt;

&lt;p&gt;Next up in &lt;strong&gt;Part 6&lt;/strong&gt;, we’ll dive into &lt;strong&gt;file permissions&lt;/strong&gt;—what &lt;code&gt;drwxr-xr-x&lt;/code&gt; means, how to use &lt;code&gt;chmod&lt;/code&gt;, &lt;code&gt;chown&lt;/code&gt;, and how to control who can do what with your files.&lt;/p&gt;

&lt;p&gt;Stay curious, keep experimenting, and feel free to drop questions if anything feels confusing. You're doing great! 💪&lt;/p&gt;




</description>
      <category>learning</category>
      <category>website</category>
      <category>beginners</category>
      <category>linux</category>
    </item>
    <item>
      <title>🐧 Linux Basics – Part 4: Creating, Moving, and Deleting Files and Folders</title>
      <dc:creator>Alkesh Baghel</dc:creator>
      <pubDate>Fri, 25 Apr 2025 04:44:09 +0000</pubDate>
      <link>https://dev.to/alkesh009/linux-basics-part-4-creating-moving-and-deleting-files-and-folders-5hip</link>
      <guid>https://dev.to/alkesh009/linux-basics-part-4-creating-moving-and-deleting-files-and-folders-5hip</guid>
      <description>&lt;p&gt;Awesome! Here's &lt;strong&gt;Part 4&lt;/strong&gt; of your Linux series, written in the same natural, engaging, beginner-friendly tone:&lt;/p&gt;




&lt;h1&gt;
  
  
  🐧 &lt;em&gt;Linux Basics – Part 4: Creating, Moving, and Deleting Files and Folders&lt;/em&gt;
&lt;/h1&gt;

&lt;p&gt;Hey hey! 👋&lt;br&gt;&lt;br&gt;
Welcome back to our Linux command line series. If you've been following along, you’re already comfy moving around the filesystem like a champ. Now it’s time to level up with something every user needs to know: &lt;strong&gt;how to manage files and folders&lt;/strong&gt; using simple commands.&lt;/p&gt;

&lt;p&gt;In this part, we’ll cover how to &lt;strong&gt;create&lt;/strong&gt;, &lt;strong&gt;rename&lt;/strong&gt;, &lt;strong&gt;move&lt;/strong&gt;, &lt;strong&gt;copy&lt;/strong&gt;, and &lt;strong&gt;delete&lt;/strong&gt; files and directories—all from the terminal. Yep, no mouse-clicking needed! 😄&lt;/p&gt;

&lt;p&gt;Let’s get straight to it!&lt;/p&gt;


&lt;h2&gt;
  
  
  📝 Creating Files – &lt;code&gt;touch&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Want to create an empty file? Easy. Use &lt;code&gt;touch&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This instantly creates an empty file called &lt;code&gt;hello.txt&lt;/code&gt; in your current directory.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;em&gt;Windows comparison:&lt;/em&gt; Like right-click → New → Text Document.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  📁 Creating Directories – &lt;code&gt;mkdir&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Want to make a new folder? Use &lt;code&gt;mkdir&lt;/code&gt; (short for &lt;em&gt;make directory&lt;/em&gt;).&lt;/p&gt;
&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;myfolder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Want to create a folder &lt;em&gt;and&lt;/em&gt; a subfolder in one go?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; projects/python
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-p&lt;/code&gt; flag tells Linux to create parent folders if they don't exist.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✂️ Moving and Renaming – &lt;code&gt;mv&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;mv&lt;/code&gt; command works for &lt;strong&gt;both&lt;/strong&gt; moving and renaming files and directories.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rename a file:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;hello.txt greetings.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Move a file into a folder:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;greetings.txt myfolder/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🧠 Pro tip: You can move multiple files at once:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;file1.txt file2.txt myfolder/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📄 Copying Files – &lt;code&gt;cp&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Want to duplicate a file? Use &lt;code&gt;cp&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp &lt;/span&gt;hello.txt backup.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To copy a file into a folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp &lt;/span&gt;hello.txt myfolder/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To copy an entire folder and its contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; myfolder newfolder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-r&lt;/code&gt; stands for &lt;em&gt;recursive&lt;/em&gt;, which is required when copying directories.&lt;/p&gt;




&lt;h2&gt;
  
  
  🗑️ Deleting Files and Folders – &lt;code&gt;rm&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;rm&lt;/code&gt; (&lt;em&gt;remove&lt;/em&gt;) to delete stuff. Be careful—there’s no “Recycle Bin” here!&lt;/p&gt;

&lt;h3&gt;
  
  
  Delete a file:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm &lt;/span&gt;hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Delete a folder and all its contents:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; myfolder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;em&gt;Use this command carefully—especially with &lt;code&gt;-r&lt;/code&gt;!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🧪** Try This!**
&lt;/h2&gt;

&lt;p&gt;Here's a mini practice session:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a folder named &lt;code&gt;testlab&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Inside &lt;code&gt;testlab&lt;/code&gt;, create two files: &lt;code&gt;one.txt&lt;/code&gt; and &lt;code&gt;two.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Rename &lt;code&gt;one.txt&lt;/code&gt; to &lt;code&gt;first.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Copy &lt;code&gt;first.txt&lt;/code&gt; into a folder called &lt;code&gt;backup&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Delete &lt;code&gt;two.txt&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Commands you'd use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;testlab
&lt;span class="nb"&gt;cd &lt;/span&gt;testlab
&lt;span class="nb"&gt;touch &lt;/span&gt;one.txt two.txt
&lt;span class="nb"&gt;mv &lt;/span&gt;one.txt first.txt
&lt;span class="nb"&gt;mkdir &lt;/span&gt;backup
&lt;span class="nb"&gt;cp &lt;/span&gt;first.txt backup/
&lt;span class="nb"&gt;rm &lt;/span&gt;two.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Boom 💥—you just did file management like a Linux ninja.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧭 &lt;strong&gt;Quick Reference Table&lt;/strong&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Create file&lt;/td&gt;
&lt;td&gt;&lt;code&gt;touch filename.txt&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Create folder&lt;/td&gt;
&lt;td&gt;&lt;code&gt;mkdir foldername&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rename file/folder&lt;/td&gt;
&lt;td&gt;&lt;code&gt;mv oldname newname&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Move file/folder&lt;/td&gt;
&lt;td&gt;&lt;code&gt;mv item destination/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Copy file&lt;/td&gt;
&lt;td&gt;&lt;code&gt;cp file destination/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Copy folder&lt;/td&gt;
&lt;td&gt;&lt;code&gt;cp -r folder newfolder&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delete file&lt;/td&gt;
&lt;td&gt;&lt;code&gt;rm filename.txt&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delete folder&lt;/td&gt;
&lt;td&gt;&lt;code&gt;rm -r foldername&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🔚 &lt;strong&gt;Wrapping Up&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;That’s a wrap on file and folder management in Linux! 🎉&lt;br&gt;&lt;br&gt;
These are essential commands you’ll use &lt;em&gt;all the time&lt;/em&gt;. Practice them a bit and you’ll find yourself zipping through file tasks without ever needing a GUI.&lt;/p&gt;

&lt;p&gt;Next up in Part 5, we’ll take a look at &lt;strong&gt;viewing and editing file content&lt;/strong&gt;—using commands like &lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;less&lt;/code&gt;, &lt;code&gt;head&lt;/code&gt;, &lt;code&gt;tail&lt;/code&gt;, and even simple editors like &lt;code&gt;nano&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Stay tuned, and keep exploring! 🚀&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>🐧 Linux Basics – Part 3: Navigating the Filesystem Like a Pro</title>
      <dc:creator>Alkesh Baghel</dc:creator>
      <pubDate>Fri, 25 Apr 2025 04:40:16 +0000</pubDate>
      <link>https://dev.to/alkesh009/linux-basics-part-3-navigating-the-filesystem-like-a-pro-5d2p</link>
      <guid>https://dev.to/alkesh009/linux-basics-part-3-navigating-the-filesystem-like-a-pro-5d2p</guid>
      <description>&lt;p&gt;Hey folks! 👋&lt;br&gt;&lt;br&gt;
Welcome back to our Linux command line series. If you've been following along, you've already dipped your toes into the terminal and started getting comfortable with basic commands. In this third part, we're stepping into one of the core skills every Linux user needs—&lt;strong&gt;navigating the filesystem&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Understanding how to move around your directories, find files, and list contents is key to becoming comfortable in the Linux environment. So, let's jump right into it—with simple examples and some Windows comparisons to keep things relatable. 😄&lt;/p&gt;


&lt;h2&gt;
  
  
  🔍 &lt;strong&gt;Where am I? (&lt;code&gt;pwd&lt;/code&gt;)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The first thing you’ll often want to know in a terminal session is: &lt;em&gt;Where exactly am I right now?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That’s where &lt;code&gt;pwd&lt;/code&gt; comes in. It stands for &lt;strong&gt;Print Working Directory&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Output:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/home/user/Documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This tells you that you're currently inside the &lt;code&gt;Documents&lt;/code&gt; folder, which is under your home directory. Think of it like looking at the address bar in Windows Explorer.&lt;/p&gt;


&lt;h2&gt;
  
  
  📁 &lt;strong&gt;Seeing What's Around (&lt;code&gt;ls&lt;/code&gt;)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;ls&lt;/code&gt; command is your go-to for listing the contents of any directory.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Output:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;project1  notes.txt  screenshots  music.mp3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This shows everything inside your current directory. It's like opening a folder in Windows and seeing all the files and subfolders.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Useful Flags:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ls -l&lt;/code&gt;: Shows detailed information (like file size, permissions, and timestamps).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls -a&lt;/code&gt;: Lists hidden files too (those that start with a &lt;code&gt;.&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls -lh&lt;/code&gt;: Combines it all with human-readable file sizes.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  🚶‍♀️ &lt;strong&gt;Moving Around (&lt;code&gt;cd&lt;/code&gt;)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now let’s say you want to go from your current folder into a subfolder called &lt;code&gt;project1&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;project1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To go back one step:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To go to your home directory (from anywhere):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To go to the root directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Windows comparison:&lt;/strong&gt; This is like double-clicking folders in Windows File Explorer or clicking the "Back" button.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🧭 &lt;strong&gt;A Quick Recap of Navigation&lt;/strong&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Linux Command&lt;/th&gt;
&lt;th&gt;Windows Equivalent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Show current folder&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pwd&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Address bar in File Explorer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;List files in folder&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Opening a folder&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Move into a folder&lt;/td&gt;
&lt;td&gt;&lt;code&gt;cd foldername&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Double-clicking a folder&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go back one folder&lt;/td&gt;
&lt;td&gt;&lt;code&gt;cd ..&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Clicking the back arrow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go to home directory&lt;/td&gt;
&lt;td&gt;&lt;code&gt;cd ~&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;C:\Users\YourName&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  💡 &lt;strong&gt;Bonus Tip: Tab Completion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When typing long folder or file names, you can hit the &lt;strong&gt;Tab&lt;/strong&gt; key and Linux will try to auto-complete it for you. It saves time and avoids typos!&lt;/p&gt;




&lt;h2&gt;
  
  
  🧪** Practice Time**
&lt;/h2&gt;

&lt;p&gt;Try these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your terminal.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;pwd&lt;/code&gt; to see where you are.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;ls&lt;/code&gt; to see what’s in your current folder.&lt;/li&gt;
&lt;li&gt;Move into a folder using &lt;code&gt;cd&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Come back using &lt;code&gt;cd ..&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Exploring this way builds muscle memory and helps you become fluent with the Linux terminal.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔚 &lt;strong&gt;Wrapping Up&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;That’s it for this part! Now you know how to navigate like a pro. In the next post, we’ll dive into &lt;strong&gt;file and directory management&lt;/strong&gt;—creating, moving, copying, and deleting files from the command line. 🛠️&lt;/p&gt;

&lt;p&gt;If you’re enjoying this series, don’t forget to bookmark it or share it with someone who's just getting started with Linux. And feel free to drop your questions or suggestions for future topics—we’re building this series together! 😊&lt;/p&gt;




</description>
      <category>linux</category>
      <category>beginners</category>
      <category>basic</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🐧 Linux Basics Part 2: File Operations, Viewing Content &amp; Permissions</title>
      <dc:creator>Alkesh Baghel</dc:creator>
      <pubDate>Thu, 24 Apr 2025 11:58:13 +0000</pubDate>
      <link>https://dev.to/alkesh009/linux-basics-part-2-file-operations-viewing-content-permissions-4gha</link>
      <guid>https://dev.to/alkesh009/linux-basics-part-2-file-operations-viewing-content-permissions-4gha</guid>
      <description>&lt;p&gt;Welcome back to our Linux beginner series! In this part, we’ll explore how to work with files, read their contents, and understand Linux file permissions. Let’s dive right in!&lt;/p&gt;




&lt;h3&gt;
  
  
  📁 1. File Operations
&lt;/h3&gt;

&lt;h4&gt;
  
  
  ➕ Create a File: &lt;code&gt;touch&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Creates an empty file named &lt;code&gt;file.txt&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  📝 Edit a File (Using &lt;code&gt;nano&lt;/code&gt;)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Opens a simple text editor in the terminal.&lt;/li&gt;
&lt;li&gt;Save with &lt;code&gt;CTRL + O&lt;/code&gt;, then press &lt;code&gt;Enter&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Exit with &lt;code&gt;CTRL + X&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🗑️ Delete a File: &lt;code&gt;rm&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm &lt;/span&gt;file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Deletes the specified file.&lt;/li&gt;
&lt;li&gt;⚠️ Be careful! There's no recycle bin.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  📝 Copy a File: &lt;code&gt;cp&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp &lt;/span&gt;file1.txt file2.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Copies &lt;code&gt;file1.txt&lt;/code&gt; to &lt;code&gt;file2.txt&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🔁 Move or Rename a File: &lt;code&gt;mv&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;oldname.txt newname.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Renames &lt;code&gt;oldname.txt&lt;/code&gt; to &lt;code&gt;newname.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can also move it to another folder.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  📖 2. Viewing File Content
&lt;/h3&gt;

&lt;h4&gt;
  
  
  📄 &lt;code&gt;cat&lt;/code&gt; – Show file content
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Displays the whole file in the terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🔍 &lt;code&gt;less&lt;/code&gt; – View large files
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;less bigfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Allows scrolling through the file.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;q&lt;/code&gt; to quit.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🧠 &lt;code&gt;head&lt;/code&gt; and &lt;code&gt;tail&lt;/code&gt; – View start/end of a file
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;head &lt;/span&gt;file.txt
&lt;span class="nb"&gt;tail &lt;/span&gt;file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;head&lt;/code&gt; shows the first 10 lines, &lt;code&gt;tail&lt;/code&gt; shows the last 10.&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;-n&lt;/code&gt; to specify number of lines:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 20 file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🔐 3. File Permissions
&lt;/h3&gt;

&lt;p&gt;Every file and folder has &lt;strong&gt;permissions&lt;/strong&gt; that control &lt;strong&gt;who can read, write, or execute&lt;/strong&gt; them.&lt;/p&gt;

&lt;h4&gt;
  
  
  ➤ See Permissions: &lt;code&gt;ls -l&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll see something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 user group  123 Apr 24 08:00 file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s break it down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-rw-r--r--&lt;/code&gt; = permissions

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;r&lt;/code&gt; = read&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;w&lt;/code&gt; = write&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;x&lt;/code&gt; = execute&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;First set is for &lt;strong&gt;owner&lt;/strong&gt;, second for &lt;strong&gt;group&lt;/strong&gt;, third for &lt;strong&gt;others&lt;/strong&gt;.&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  🛠️ Change Permissions: &lt;code&gt;chmod&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Makes &lt;code&gt;script.sh&lt;/code&gt; executable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  👤 Change Ownership: &lt;code&gt;chown&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo chown &lt;/span&gt;tejaswini file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Changes the file’s owner to &lt;code&gt;tejaswini&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🔁 Comparison with Windows
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Linux Command&lt;/th&gt;
&lt;th&gt;Windows Equivalent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;View file&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;less&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Notepad, &lt;code&gt;type&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Create file&lt;/td&gt;
&lt;td&gt;&lt;code&gt;touch&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Right-click → New → Text file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Change perm&lt;/td&gt;
&lt;td&gt;&lt;code&gt;chmod&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;File properties → Security&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  🎯 Practice Tips:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Try making a text file, adding some text with &lt;code&gt;nano&lt;/code&gt;, and viewing it with &lt;code&gt;cat&lt;/code&gt; and &lt;code&gt;less&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Experiment with changing permissions and making a script executable.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Next up in &lt;strong&gt;Part 3&lt;/strong&gt;, we’ll explore &lt;strong&gt;process management&lt;/strong&gt;, &lt;strong&gt;network commands&lt;/strong&gt;, and a bit of &lt;strong&gt;package management&lt;/strong&gt;! Stay tuned.&lt;/p&gt;




</description>
      <category>beginners</category>
      <category>productivity</category>
      <category>aws</category>
      <category>learning</category>
    </item>
    <item>
      <title>🔥 Beginner’s Guide to Linux: Why Linux &amp; Basic Commands You Should Know (Part 1)</title>
      <dc:creator>Alkesh Baghel</dc:creator>
      <pubDate>Thu, 24 Apr 2025 07:38:45 +0000</pubDate>
      <link>https://dev.to/alkesh009/beginners-guide-to-linux-why-linux-basic-commands-you-should-know-part-1-d6h</link>
      <guid>https://dev.to/alkesh009/beginners-guide-to-linux-why-linux-basic-commands-you-should-know-part-1-d6h</guid>
      <description>&lt;p&gt;if you’ve ever wondered why developers, system admins, and tech enthusiasts rave about Linux, you’re not alone. In this series, we’ll explore Linux from the ground up—starting with why it’s used, its benefits, and some basic but powerful commands every beginner should know.&lt;/p&gt;

&lt;p&gt;🐧 &lt;strong&gt;What is Linux?&lt;/strong&gt;&lt;br&gt;
Linux is an open-source operating system—that means it’s free to use, modify, and distribute. It powers everything from smartphones (Android is Linux-based) to supercomputers, servers, and even space missions!&lt;/p&gt;

&lt;p&gt;📜** A Quick History**&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Linux was created in 1991 by Linus Torvalds as a hobby project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;He wanted to build a free alternative to the UNIX operating system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The community loved it, contributed to it, and now Linux is everywhere!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;💻 Why Linux Over Windows?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Free and Open Source – No license fees or restrictions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Customizable – You can tweak every part of the OS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stable and Secure – Fewer viruses and system crashes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lightweight – Runs even on older hardware.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Developer-Friendly – Most programming and DevOps tools run natively on &lt;br&gt;
Linux.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Command Line Power – More control through terminal commands.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Windows is great for personal use and UI-focused tasks, but when it comes to servers, automation, or development work—Linux shines.&lt;/p&gt;

&lt;p&gt;🧱 &lt;strong&gt;Linux Distributions&lt;/strong&gt;&lt;br&gt;
There’s no single “Linux OS”—there are many distributions (or distros) based on Linux:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ubuntu – Great for beginners, very user-friendly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Debian – Stable and reliable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CentOS / Rocky Linux – Often used on servers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Arch Linux – Customizable, for advanced users.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Kali Linux – Used for penetration testing and cybersecurity.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Choose one based on your needs. For beginners, Ubuntu is a great starting point.&lt;/p&gt;

&lt;p&gt;🛠️ &lt;strong&gt;Basic Linux Commands You’ll Use Often&lt;/strong&gt;&lt;br&gt;
Here are a few essential Linux commands that beginners should know:&lt;br&gt;
Command | Description&lt;br&gt;
pwd | Prints the current working directory (your location in the file system)&lt;br&gt;
ls | Lists files and directories&lt;br&gt;
cd | Changes the directory&lt;br&gt;
mkdir | Creates a new directory&lt;br&gt;
touch | Creates a new file&lt;br&gt;
rm | Deletes files or directories&lt;br&gt;
cp | Copies files or directories&lt;br&gt;
mv | Moves or renames files/directories&lt;br&gt;
cat | Displays file content&lt;br&gt;
clear | Clears the terminal screen&lt;br&gt;
man | Shows manual/help for a command (e.g., man ls)&lt;br&gt;
sudo | Runs a command with admin (superuser) permissions&lt;/p&gt;

&lt;p&gt;Don’t worry if these look unfamiliar—we’ll go through each one step by step in the next parts of this series.&lt;/p&gt;

&lt;p&gt;📌 &lt;strong&gt;Coming Up Next&lt;/strong&gt;&lt;br&gt;
In the next post, we’ll dive into using these commands with real-world examples and practice tasks. You’ll be navigating Linux like a pro in no time!&lt;/p&gt;

&lt;h1&gt;
  
  
  LinuxForBeginners #LinuxCommands #Ubuntu #OpenSource #DevOps #SysAdmin #TechLearning #TerminalCommands #WhyLinux #LinuxVsWindows #LinuxBasics #ShellCommands #CommunityLearning #LearnLinux
&lt;/h1&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
