<?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: Madhushan  Herath</title>
    <description>The latest articles on DEV Community by Madhushan  Herath (@madhushan).</description>
    <link>https://dev.to/madhushan</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%2F1249020%2F28530f6d-aa22-48f1-86d0-f8d25bd7b9f6.jpeg</url>
      <title>DEV Community: Madhushan  Herath</title>
      <link>https://dev.to/madhushan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/madhushan"/>
    <language>en</language>
    <item>
      <title>FortiOS 7.6.3 Update: SSL VPN Tunnel Mode No Longer Supported</title>
      <dc:creator>Madhushan  Herath</dc:creator>
      <pubDate>Thu, 17 Apr 2025 20:36:36 +0000</pubDate>
      <link>https://dev.to/madhushan/fortios-763-update-ssl-vpn-tunnel-mode-no-longer-supported-27hg</link>
      <guid>https://dev.to/madhushan/fortios-763-update-ssl-vpn-tunnel-mode-no-longer-supported-27hg</guid>
      <description>&lt;p&gt;If you're managing a FortiGate firewall, it's time to take note of a critical change in FortiOS 7.6.3: SSL VPN tunnel mode is no longer supported. This change affects all FortiGate models, and settings related to SSL VPN tunnel mode will not be carried over during an upgrade.&lt;/p&gt;

&lt;p&gt;❌ What’s Changing?&lt;br&gt;
Starting with FortiOS 7.6.3, Fortinet has removed both GUI and CLI support for SSL VPN tunnel mode. This means:&lt;/p&gt;

&lt;p&gt;Existing configurations will not be upgraded.&lt;/p&gt;

&lt;p&gt;You will no longer see tunnel mode options in the interface.&lt;/p&gt;

&lt;p&gt;Remote access via SSL VPN tunnel mode will stop working after the update unless migrated.&lt;/p&gt;

&lt;p&gt;✅ What You Need to Do&lt;br&gt;
To maintain uninterrupted remote access for users and admins, Fortinet recommends migrating to IPsec VPN before upgrading to 7.6.3.&lt;/p&gt;

&lt;p&gt;🔄 Migration Path&lt;br&gt;
Fortinet has published detailed guides to help you move from SSL VPN tunnel mode to IPsec VPN. These resources walk you through:&lt;/p&gt;

&lt;p&gt;Backing up current configurations.&lt;/p&gt;

&lt;p&gt;Creating equivalent IPsec VPN policies.&lt;/p&gt;

&lt;p&gt;Testing access before and after the upgrade.&lt;/p&gt;

&lt;p&gt;This move aligns with Fortinet’s effort to strengthen VPN security standards. IPsec VPN offers robust encryption and better performance, making it a reliable alternative to the deprecated SSL tunnel mode.&lt;/p&gt;

&lt;p&gt;If you haven’t already, review your current VPN setup and plan your migration now to avoid access issues post-upgrade.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Downloooooad PDFs without using web Browsers</title>
      <dc:creator>Madhushan  Herath</dc:creator>
      <pubDate>Wed, 16 Apr 2025 20:03:35 +0000</pubDate>
      <link>https://dev.to/madhushan/downloooooad-pdfs-without-using-web-browsers-with-python-2ejj</link>
      <guid>https://dev.to/madhushan/downloooooad-pdfs-without-using-web-browsers-with-python-2ejj</guid>
      <description>&lt;p&gt;Install the library first: (pip install googlesearch-python)&lt;/p&gt;

&lt;p&gt;import os&lt;br&gt;
import requests&lt;br&gt;
from googlesearch import search&lt;/p&gt;

&lt;p&gt;def search_pdfs(query, num_results=10):&lt;br&gt;
    pdf_links = []&lt;br&gt;
    query += " filetype:pdf"&lt;br&gt;
    for result in search(query, num_results=num_results):&lt;br&gt;
        if result.lower().endswith(".pdf"):&lt;br&gt;
            pdf_links.append(result)&lt;br&gt;
    return pdf_links&lt;/p&gt;

&lt;p&gt;def download_pdf(url, save_dir="pdf_downloads"):&lt;br&gt;
    if not os.path.exists(save_dir):&lt;br&gt;
        os.makedirs(save_dir)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try:
    filename = url.split("/")[-1].split("?")[0]
    filepath = os.path.join(save_dir, filename)

    response = requests.get(url, stream=True)
    response.raise_for_status()

    with open(filepath, "wb") as f:
        for chunk in response.iter_content(chunk_size=8192):
            if chunk:
                f.write(chunk)

    print(f"✅ Downloaded: {filename}")
except Exception as e:
    print(f"❌ Failed to download {url} - {e}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h1&gt;
  
  
  Example usage
&lt;/h1&gt;

&lt;p&gt;if &lt;strong&gt;name&lt;/strong&gt; == "&lt;strong&gt;main&lt;/strong&gt;":&lt;br&gt;
    query = input("Enter search term: ")&lt;br&gt;
    pdf_links = search_pdfs(query, num_results=10)&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print("\n🔎 Found PDF links:")
for i, link in enumerate(pdf_links, 1):
    print(f"{i}. {link}")

print("\n⬇️ Downloading PDFs...")
for link in pdf_links:
    download_pdf(link)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;you'll be prompted to enter your search term - (Enter search term:What you want to search will be downloaded to your pc with a separate download folder(Only PDFs))&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>downloading</category>
      <category>productivity</category>
    </item>
    <item>
      <title>OSI Model?</title>
      <dc:creator>Madhushan  Herath</dc:creator>
      <pubDate>Fri, 28 Feb 2025 01:19:21 +0000</pubDate>
      <link>https://dev.to/madhushan/osi-model-3afb</link>
      <guid>https://dev.to/madhushan/osi-model-3afb</guid>
      <description>&lt;p&gt;Physical Layer (Layer 1):&lt;br&gt;
This is where the actual physical connection happens, like cables, wireless signals, and network devices (routers, switches).&lt;br&gt;
It converts data into electrical signals or light pulses to send it over physical media.&lt;br&gt;
Example: Ethernet cables, Wi-Fi signals, fiber optic cables.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data Link Layer (Layer 2):
This layer ensures that data can move between devices on the same network. It creates frames from the data, adds error checking, and helps avoid issues with collisions.
It also uses MAC addresses to ensure devices can communicate.
Example: Ethernet, Wi-Fi (MAC addresses).&lt;/li&gt;
&lt;li&gt;Network Layer (Layer 3):
This layer is responsible for routing data across different networks. It uses IP addresses to send data to the correct destination.
Think of this layer as the postal system of the internet, figuring out the best route for the data to take.
Example: Routers, IP addresses, IPv4/IPv6, OSPF, BGP.&lt;/li&gt;
&lt;li&gt;Transport Layer (Layer 4):
It ensures that data arrives reliably by breaking it into smaller pieces (called segments) and ensuring they’re reassembled correctly at the destination.
It also ensures that data is sent in the right order and handles flow control and error correction.
Example: TCP (Transmission Control Protocol), UDP (User Datagram Protocol), SSL/TLS.&lt;/li&gt;
&lt;li&gt;Session Layer (Layer 5):
This layer manages the communication session between devices. It ensures that sessions are properly established, maintained, and terminated once data exchange is done.
It also ensures data synchronization to avoid errors.
Example: Remote Desktop Protocol (RDP), API calls, login sessions.&lt;/li&gt;
&lt;li&gt;Presentation Layer (Layer 6):
The presentation layer is all about data formatting. It converts data into a format that the receiving application can understand.
It also encrypts or compresses data for secure and efficient transmission.
Example: SSL/TLS encryption, image file formats (JPEG, PNG), data compression.&lt;/li&gt;
&lt;li&gt;Application Layer (Layer 7):
The top layer is where end-user applications interact with the network. It provides network services like web browsing, email, file transfer, and more.
This is where users experience the network directly (through their browsers or apps).
Example: HTTP/HTTPS (web browsing), SMTP (email), FTP &lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Wireshark: IT Support Guide to Network Troubleshooting</title>
      <dc:creator>Madhushan  Herath</dc:creator>
      <pubDate>Fri, 28 Feb 2025 01:16:59 +0000</pubDate>
      <link>https://dev.to/madhushan/wireshark-it-support-guide-to-network-troubleshooting-29b3</link>
      <guid>https://dev.to/madhushan/wireshark-it-support-guide-to-network-troubleshooting-29b3</guid>
      <description>&lt;p&gt;If you're new to IT or networking, one of the most important tools you’ll come across is Wireshark. It's a network protocol analyzer that lets you see exactly what’s happening in your network by capturing all the data packets traveling to and from your computer or network. Think of it like a window into the network, showing you all the communication between devices.&lt;/p&gt;

&lt;p&gt;🔍 What Does Wireshark Do?&lt;br&gt;
Wireshark captures data packets moving over the network. A packet is just a small chunk of data, like an email or a website request, that gets sent across the network. Wireshark allows you to “capture” and “analyze” these packets to see what’s going wrong with your network.&lt;/p&gt;

&lt;p&gt;In simple terms:&lt;/p&gt;

&lt;p&gt;It listens to your network to find out where things are breaking down.&lt;br&gt;
It helps you troubleshoot by showing exactly what’s happening with the data being sent and received.&lt;br&gt;
⚡ Why Should You Use Wireshark as a Beginner?&lt;br&gt;
As an IT professional (even at the start of your career), Wireshark helps you by:&lt;/p&gt;

&lt;p&gt;🚀 Spotting network issues – Sometimes, your internet might be slow, or a website might not be loading. Wireshark can help you find out why.&lt;br&gt;
🚀 Checking if data is reaching its destination – You can see if data is successfully reaching the website you want to visit, or if something’s preventing it.&lt;br&gt;
🚀 Understanding different types of data – Wireshark breaks down the data so you can learn more about how websites, apps, and devices communicate.&lt;/p&gt;

&lt;p&gt;Example: If a website isn’t loading:&lt;br&gt;
You might think it’s the website’s fault, but it could actually be a problem with your DNS server or a slow connection.&lt;br&gt;
Wireshark will let you see exactly where the delay is happening, so you can fix it faster.&lt;br&gt;
🛠️ Wireshark Basics: Getting Started&lt;br&gt;
Let’s go through some basic steps to start using Wireshark.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Capture Network Traffic
Step 1: Open Wireshark and choose your network interface (the connection that’s being used, like Ethernet or Wi-Fi).
Step 2: Hit the Start button to begin capturing packets. This will show everything going in and out of your computer.&lt;/li&gt;
&lt;li&gt;Filter Traffic
Wireshark captures a lot of data, so it’s helpful to filter it and focus on what matters.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;dns – Shows all DNS requests, which are made when you visit a website. If there’s a DNS issue, you’ll see it here.&lt;br&gt;
http – Shows all web traffic, such as when you browse a website.&lt;br&gt;
ip.addr == 8.8.8.8 – Focuses on traffic going to Google’s DNS server (8.8.8.8). This can help you check if DNS is working properly.&lt;br&gt;
Why filters help:&lt;br&gt;
Filters narrow down the huge amount of data Wireshark captures, making it easier to spot problems.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Follow a TCP Stream
A TCP stream is like a conversation between two devices. If you're looking at a packet and you want to see the entire back-and-forth communication, you can right-click on it and select "Follow TCP Stream". This will show you the entire exchange of data between your computer and the server, which helps you understand what went wrong.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🔥 How Wireshark Helps You Troubleshoot Network Problems&lt;br&gt;
Here’s how you can use Wireshark to identify common network issues:&lt;/p&gt;

&lt;p&gt;🚀 1. Slow Internet?&lt;/p&gt;

&lt;p&gt;Problem: Websites load slowly, or your internet connection seems slow.&lt;br&gt;
How Wireshark helps: You can see if packets are being delayed or dropped, which is a common cause of slowness.&lt;br&gt;
🚀 2. DNS Issues?&lt;/p&gt;

&lt;p&gt;Problem: You can’t reach certain websites.&lt;br&gt;
How Wireshark helps: DNS packets will show if your system is having trouble resolving domain names (turning google.com into the right IP address).&lt;br&gt;
🚀 3. Website Not Loading?&lt;/p&gt;

&lt;p&gt;Problem: A website doesn’t load at all, or it takes forever.&lt;br&gt;
How Wireshark helps: You can see if the website is responding to your request or if something is blocking it, like a firewall or broken server.&lt;br&gt;
🚀 4. VoIP/Call Quality Issues?&lt;/p&gt;

&lt;p&gt;Problem: VoIP calls (like Skype, Teams, Zoom) are dropping or have poor quality.&lt;br&gt;
How Wireshark helps: You can analyze SIP and RTP traffic, which is used for voice calls, to see if there’s packet loss or delay.&lt;br&gt;
🎯 Why Wireshark is Important for IT Support Beginners&lt;br&gt;
As an IT professional, you’ll face a lot of network-related problems. Using Wireshark can help you understand the root cause of the issue and fix it faster, instead of guessing what’s wrong.&lt;/p&gt;

&lt;p&gt;For example, if someone can’t access a website, you can use Wireshark to quickly check:&lt;/p&gt;

&lt;p&gt;Is it a DNS issue? (Check if DNS queries are failing)&lt;br&gt;
Is it a network problem? (Look for packet loss or delays)&lt;/p&gt;

&lt;p&gt;Scenario:&lt;br&gt;
Your colleague is complaining that a specific website is taking too long to load. They are connected to the company’s network, but the site seems slow only for them, not others. Here’s how you can troubleshoot this using Wireshark:&lt;/p&gt;

&lt;p&gt;Step 1: Capture Network Traffic&lt;br&gt;
Open Wireshark on your computer and select the network interface (Wi-Fi or Ethernet) that is used to connect to the internet.&lt;br&gt;
Start capturing packets by clicking on the Start button.&lt;br&gt;
Step 2: Filter for HTTP Traffic&lt;br&gt;
In Wireshark, you’ll be capturing a lot of different types of traffic. To make it easier to find the problem, use a filter to focus on web traffic.&lt;br&gt;
Type http in the filter bar. This will only show HTTP packets, which are used when loading websites.&lt;br&gt;
Step 3: Browse the Website&lt;br&gt;
Ask your colleague to try loading the slow website while you continue capturing traffic in Wireshark.&lt;br&gt;
Wireshark will capture every data packet that’s sent when your colleague’s browser makes requests to the website.&lt;br&gt;
Step 4: Analyze the Packets&lt;br&gt;
Once the website has been loaded (or failed to load), stop the capture in Wireshark.&lt;br&gt;
Look for requests made to the website's domain (for example, &lt;a href="http://www.example.com" rel="noopener noreferrer"&gt;www.example.com&lt;/a&gt;). You'll see packets like GET requests from the browser to the web server.&lt;br&gt;
Step 5: Check for Delays or Errors&lt;br&gt;
Look for any time gaps between the packets. Large time gaps can indicate delays in loading resources from the website.&lt;br&gt;
Check for retransmissions or timeouts (Wireshark marks these in red or black). Retransmissions often mean packets were lost and had to be resent, which can cause delays.&lt;br&gt;
Look for DNS issues—If the DNS query is taking too long, it could be a reason for the slow website load.&lt;br&gt;
Step 6: Use Follow TCP Stream&lt;br&gt;
If you see a lot of data related to the website (for example, many packets being sent), right-click on one of the packets and choose "Follow TCP Stream". This will show you the entire conversation between the browser and the server.&lt;br&gt;
This helps you identify where the issue might lie. If the server is slow to respond, that’s the problem. If there’s an issue in the data transfer, it might be a network issue.&lt;br&gt;
Step 7: Check DNS Resolution&lt;br&gt;
If the site is loading slowly at the beginning, it could be due to slow DNS resolution (finding the IP address of the website).&lt;br&gt;
To check if DNS is the problem, you can add a DNS filter:&lt;br&gt;
Type dns in the filter bar.&lt;br&gt;
Look at the DNS query and response times. If the DNS server is taking longer than expected to resolve the domain, that’s likely the cause of the delay.&lt;br&gt;
Step 8: Conclusion &amp;amp; Fix&lt;br&gt;
Based on your findings, you can take the next steps:&lt;br&gt;
If DNS is slow: Check the DNS settings on the device and switch to a faster DNS server like Google DNS (8.8.8.8) or Cloudflare DNS (1.1.1.1).&lt;br&gt;
If the website server is slow: Contact the website’s hosting provider or investigate the server-side performance.&lt;br&gt;
If there are network issues (such as packet loss): Check the local network (Wi-Fi router, cables, etc.) or escalate to the network team.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding DNS for IT Support</title>
      <dc:creator>Madhushan  Herath</dc:creator>
      <pubDate>Thu, 27 Feb 2025 23:35:40 +0000</pubDate>
      <link>https://dev.to/madhushan/understanding-dns-for-it-support-15k9</link>
      <guid>https://dev.to/madhushan/understanding-dns-for-it-support-15k9</guid>
      <description>&lt;p&gt;🔹 What is DNS?&lt;br&gt;
DNS (Domain Name System) is like the phonebook of the internet—it translates human-friendly domain names (e.g., google.com) into IP addresses (e.g., 142.250.190.46) that computers use to communicate.&lt;/p&gt;

&lt;p&gt;🔹 How is DNS Used in Windows &amp;amp; Linux?&lt;br&gt;
🖥️ Windows:&lt;br&gt;
✅ Browsing the internet – Resolves website domain names&lt;br&gt;
✅ Active Directory (AD) – Uses DNS for locating domain controllers&lt;br&gt;
✅ Email Services – Uses MX records for mail routing&lt;br&gt;
✅ Remote Desktop &amp;amp; Network Shares – Resolves computer names to IPs&lt;br&gt;
✅ Windows Update &amp;amp; Licensing – Contacts Microsoft servers via DNS&lt;/p&gt;

&lt;p&gt;🐧 Linux:&lt;br&gt;
✅ Web Browsing &amp;amp; Server Hosting – Uses /etc/resolv.conf for DNS settings&lt;br&gt;
✅ Email Servers (Postfix, Exim, Sendmail) – Uses DNS MX records&lt;br&gt;
✅ SSH &amp;amp; Remote Access – Resolves hostnames via DNS&lt;br&gt;
✅ Package Managers (APT, YUM, DNF) – Fetch software updates via domain names&lt;br&gt;
✅ Docker &amp;amp; Kubernetes – Uses DNS for service discovery within containers&lt;/p&gt;

&lt;p&gt;🔹 What Happens If DNS Fails in a Company?&lt;br&gt;
If DNS is misconfigured or goes down, many critical services will fail, including:&lt;/p&gt;

&lt;p&gt;🚨 Internet Access – Employees can’t browse the web or access cloud applications.&lt;br&gt;
🚨 Email Services (Exchange, Outlook, Gmail, etc.) – Emails won’t send or receive.&lt;br&gt;
🚨 Active Directory Authentication – Users may not be able to log in.&lt;br&gt;
🚨 File Shares &amp;amp; Network Drives – Mapped drives won’t work.&lt;br&gt;
🚨 VoIP Phones (Cisco, Avaya, Teams Calling, etc.) – Calls may fail due to DNS-dependent SIP servers.&lt;br&gt;
🚨 Remote Desktop (RDP) – Connections won’t work if the hostname can't be resolved.&lt;br&gt;
🚨 VPN Connectivity – VPN clients may fail to resolve corporate domains.&lt;br&gt;
🚨 Software Updates (Windows, Linux, Antivirus, etc.) – Updates will fail if DNS can't resolve package servers.&lt;br&gt;
🚨 Cloud-Based Applications (Office 365, Google Workspace, AWS, Azure, etc.) – Services won’t be reachable.&lt;br&gt;
🚨 IoT Devices &amp;amp; Security Cameras – May fail if they rely on DNS-based remote connections.&lt;/p&gt;

&lt;p&gt;🔥 A single DNS issue can bring an entire company to a halt! That’s why IT support teams must understand how to troubleshoot it quickly.&lt;/p&gt;

&lt;p&gt;🔹 Common DNS Commands for IT Support&lt;br&gt;
1️⃣ Check Current DNS Settings&lt;br&gt;
🖥️ Windows:&lt;/p&gt;

&lt;p&gt;powershell&lt;br&gt;
ipconfig /all&lt;br&gt;
🔹 Shows the current IP configuration, including DNS servers in use.&lt;/p&gt;

&lt;p&gt;🐧 Linux/macOS:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
cat /etc/resolv.conf&lt;br&gt;
🔹 Displays the DNS servers configured on the system.&lt;/p&gt;

&lt;p&gt;2️⃣ Test DNS Resolution&lt;br&gt;
🖥️ Windows:&lt;/p&gt;

&lt;p&gt;powershell&lt;br&gt;
nslookup google.com&lt;br&gt;
🔹 Queries a DNS server to find the IP address of google.com.&lt;/p&gt;

&lt;p&gt;🐧 Linux/macOS:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
dig google.com&lt;br&gt;
🔹 Performs a detailed DNS lookup, showing records like A, CNAME, and MX.&lt;/p&gt;

&lt;p&gt;3️⃣ Flush DNS Cache (Fix DNS Issues)&lt;br&gt;
🖥️ Windows:&lt;/p&gt;

&lt;p&gt;powershell&lt;br&gt;
ipconfig /flushdns&lt;br&gt;
🔹 Clears the local DNS cache, forcing the system to query fresh records.&lt;/p&gt;

&lt;p&gt;🐧 Linux (varies by system):&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
sudo systemctl restart nscd&lt;br&gt;
🔹 Restarts the Name Service Cache Daemon (NSCD), which clears DNS cache.&lt;/p&gt;

&lt;p&gt;4️⃣ Reverse DNS Lookup (Find Domain from IP)&lt;br&gt;
🖥️ Windows:&lt;/p&gt;

&lt;p&gt;powershell&lt;br&gt;
nslookup 8.8.8.8&lt;br&gt;
🔹 Finds the domain name associated with the IP 8.8.8.8.&lt;/p&gt;

&lt;p&gt;🐧 Linux/macOS:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
host 8.8.8.8&lt;br&gt;
🔹 Performs a reverse DNS lookup to find the hostname for an IP.&lt;/p&gt;

&lt;p&gt;5️⃣ Verify Mail Server (MX Record Check)&lt;br&gt;
🖥️ Windows:&lt;/p&gt;

&lt;p&gt;powershell&lt;br&gt;
nslookup -querytype=MX gmail.com&lt;br&gt;
🔹 Retrieves the MX (Mail Exchange) records for gmail.com, showing its mail servers.&lt;/p&gt;

&lt;p&gt;🐧 Linux/macOS:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
dig gmail.com MX&lt;br&gt;
🔹 Queries the MX records of gmail.com to see where emails are routed.&lt;/p&gt;

&lt;p&gt;6️⃣ Display Cached DNS Entries&lt;br&gt;
🖥️ Windows:&lt;/p&gt;

&lt;p&gt;powershell&lt;br&gt;
ipconfig /displaydns&lt;br&gt;
🔹 Shows a list of cached DNS records stored on the system.&lt;/p&gt;

&lt;p&gt;🐧 Linux/macOS:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
sudo systemd-resolve --statistics&lt;br&gt;
🔹 Displays statistics about DNS caching on a system using systemd-resolved.&lt;/p&gt;

&lt;p&gt;🔹 Troubleshooting DNS Issues in IT Support&lt;br&gt;
🚨 Website not loading?&lt;br&gt;
🔹 Try accessing the site by its IP (ping )&lt;br&gt;
🔹 Change DNS servers (Google DNS: 8.8.8.8 / 8.8.4.4)&lt;br&gt;
🔹 Flush DNS cache (ipconfig /flushdns on Windows, sudo systemctl restart nscd on Linux)&lt;/p&gt;

&lt;p&gt;🚨 Slow browsing?&lt;br&gt;
🔹 Use a faster DNS resolver (Google DNS, Cloudflare DNS 1.1.1.1)&lt;br&gt;
🔹 Check network congestion or ISP issues&lt;/p&gt;

&lt;p&gt;🚨 Internal network issues?&lt;br&gt;
🔹 Verify local DNS settings using:&lt;br&gt;
🖥️ Windows: nslookup example.com&lt;br&gt;
🐧 Linux/macOS: dig example.com&lt;/p&gt;

&lt;p&gt;🔹 Final Thoughts&lt;br&gt;
DNS is a critical component of IT infrastructure. If DNS is misconfigured or goes down, entire businesses can come to a halt! That’s why IT support professionals must know how to diagnose, troubleshoot, and fix DNS issues quickly.&lt;/p&gt;

&lt;p&gt;💡 Have you ever faced a DNS outage at work? How did you solve it? Share your experience below! ⬇️&lt;/p&gt;

&lt;p&gt;This post is fully optimized and ready to copy-paste into LinkedIn, dev.to, or your blog! 🚀&lt;/p&gt;

&lt;p&gt;Would you like me to tweak anything further? 😊&lt;/p&gt;

&lt;p&gt;You said:&lt;br&gt;
include steps to find if its a dns issue or not&lt;br&gt;
ChatGPT said:&lt;br&gt;
Here’s your finalized DNS post, now including steps to determine if an issue is DNS-related! 🚀&lt;/p&gt;

&lt;p&gt;🌐 Understanding DNS for IT Support 🔍&lt;br&gt;
Ever wondered how websites load when you type a URL? That’s where DNS comes in!&lt;/p&gt;

&lt;p&gt;🔹 What is DNS?&lt;br&gt;
DNS (Domain Name System) is like the phonebook of the internet—it translates human-friendly domain names (e.g., google.com) into IP addresses (e.g., 142.250.190.46) that computers use to communicate.&lt;/p&gt;

&lt;p&gt;🔹 How is DNS Used in Windows &amp;amp; Linux?&lt;br&gt;
🖥️ Windows:&lt;br&gt;
✅ Browsing the internet – Resolves website domain names&lt;br&gt;
✅ Active Directory (AD) – Uses DNS for locating domain controllers&lt;br&gt;
✅ Email Services – Uses MX records for mail routing&lt;br&gt;
✅ Remote Desktop &amp;amp; Network Shares – Resolves computer names to IPs&lt;br&gt;
✅ Windows Update &amp;amp; Licensing – Contacts Microsoft servers via DNS&lt;/p&gt;

&lt;p&gt;🐧 Linux:&lt;br&gt;
✅ Web Browsing &amp;amp; Server Hosting – Uses /etc/resolv.conf for DNS settings&lt;br&gt;
✅ Email Servers (Postfix, Exim, Sendmail) – Uses DNS MX records&lt;br&gt;
✅ SSH &amp;amp; Remote Access – Resolves hostnames via DNS&lt;br&gt;
✅ Package Managers (APT, YUM, DNF) – Fetch software updates via domain names&lt;br&gt;
✅ Docker &amp;amp; Kubernetes – Uses DNS for service discovery within containers&lt;/p&gt;

&lt;p&gt;🔹 What Happens If DNS Fails in a Company?&lt;br&gt;
If DNS is misconfigured or goes down, many critical services will fail, including:&lt;/p&gt;

&lt;p&gt;🚨 Internet Access – Employees can’t browse the web or access cloud applications.&lt;br&gt;
🚨 Email Services (Exchange, Outlook, Gmail, etc.) – Emails won’t send or receive.&lt;br&gt;
🚨 Active Directory Authentication – Users may not be able to log in.&lt;br&gt;
🚨 File Shares &amp;amp; Network Drives – Mapped drives won’t work.&lt;br&gt;
🚨 VoIP Phones (Cisco, Avaya, Teams Calling, etc.) – Calls may fail due to DNS-dependent SIP servers.&lt;br&gt;
🚨 Remote Desktop (RDP) – Connections won’t work if the hostname can't be resolved.&lt;br&gt;
🚨 VPN Connectivity – VPN clients may fail to resolve corporate domains.&lt;br&gt;
🚨 Software Updates (Windows, Linux, Antivirus, etc.) – Updates will fail if DNS can't resolve package servers.&lt;br&gt;
🚨 Cloud-Based Applications (Office 365, Google Workspace, AWS, Azure, etc.) – Services won’t be reachable.&lt;br&gt;
🚨 IoT Devices &amp;amp; Security Cameras – May fail if they rely on DNS-based remote connections.&lt;/p&gt;

&lt;p&gt;🔥 A single DNS issue can bring an entire company to a halt! That’s why IT support teams must understand how to troubleshoot it quickly.&lt;/p&gt;

&lt;p&gt;🔹 How to Check If It’s a DNS Issue&lt;br&gt;
✅ Step 1: Check if IP-Based Browsing Works&lt;/p&gt;

&lt;p&gt;Try accessing a website by its IP instead of its domain name.&lt;br&gt;
Example: Open a browser and go to &lt;a href="http://142.250.190.46" rel="noopener noreferrer"&gt;http://142.250.190.46&lt;/a&gt; (Google).&lt;br&gt;
If the site loads, it’s a DNS problem because domain resolution is failing.&lt;br&gt;
If it doesn’t load, it might be a network issue.&lt;br&gt;
✅ Step 2: Test with a Different DNS Server&lt;/p&gt;

&lt;p&gt;Manually set your DNS to Google’s DNS (8.8.8.8 / 8.8.4.4) or Cloudflare (1.1.1.1) and check if browsing works.&lt;br&gt;
If it works after changing DNS, then the default DNS server is faulty.&lt;br&gt;
✅ Step 3: Use nslookup or dig to Query DNS&lt;br&gt;
🖥️ Windows:&lt;/p&gt;

&lt;p&gt;powershell&lt;br&gt;
nslookup google.com&lt;br&gt;
🐧 Linux/macOS:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
dig google.com&lt;br&gt;
If you get an IP address, DNS is working.&lt;br&gt;
If it says “Non-existent domain” or “Server failed”, DNS is the issue.&lt;br&gt;
✅ Step 4: Try a Ping Test&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
ping google.com&lt;br&gt;
If ping fails but ping 8.8.8.8 works, DNS isn’t resolving.&lt;br&gt;
✅ Step 5: Check DNS Configuration&lt;br&gt;
🖥️ Windows:&lt;/p&gt;

&lt;p&gt;powershell&lt;br&gt;
ipconfig /all&lt;br&gt;
🐧 Linux/macOS:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
cat /etc/resolv.conf&lt;br&gt;
Make sure the correct DNS server is listed.&lt;br&gt;
✅ Step 6: Flush DNS Cache&lt;br&gt;
🖥️ Windows:&lt;/p&gt;

&lt;p&gt;powershell&lt;br&gt;
ipconfig /flushdns&lt;br&gt;
🐧 Linux/macOS:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
sudo systemctl restart nscd&lt;br&gt;
This forces the system to query fresh DNS records.&lt;br&gt;
✅ Step 7: Restart DNS Services&lt;br&gt;
🖥️ Windows:&lt;/p&gt;

&lt;p&gt;powershell&lt;br&gt;
net stop dnscache &amp;amp;&amp;amp; net start dnscache&lt;br&gt;
🐧 Linux/macOS:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
sudo systemctl restart systemd-resolved&lt;br&gt;
This restarts the DNS client services on the system.&lt;br&gt;
🔹 Troubleshooting DNS Issues in IT Support&lt;br&gt;
🚨 Website not loading?&lt;br&gt;
🔹 Try accessing the site by its IP (ping )&lt;br&gt;
🔹 Change DNS servers (Google DNS: 8.8.8.8 / 8.8.4.4)&lt;br&gt;
🔹 Flush DNS cache (ipconfig /flushdns on Windows, sudo systemctl restart nscd on Linux)&lt;/p&gt;

&lt;p&gt;🚨 Slow browsing?&lt;br&gt;
🔹 Use a faster DNS resolver (Google DNS, Cloudflare DNS 1.1.1.1)&lt;br&gt;
🔹 Check network congestion or ISP issues&lt;/p&gt;

&lt;p&gt;🚨 Internal network issues?&lt;br&gt;
🔹 Verify local DNS settings using:&lt;br&gt;
🖥️ Windows: nslookup example.com&lt;br&gt;
🐧 Linux/macOS: dig example.com&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Things You Can Automate with Bash for IT Support</title>
      <dc:creator>Madhushan  Herath</dc:creator>
      <pubDate>Sun, 16 Feb 2025 13:30:13 +0000</pubDate>
      <link>https://dev.to/madhushan/things-you-can-automate-with-bash-for-it-support-16ep</link>
      <guid>https://dev.to/madhushan/things-you-can-automate-with-bash-for-it-support-16ep</guid>
      <description>&lt;p&gt;Bash scripting is a game-changer for IT support teams. It helps automate repetitive tasks, saving time and reducing errors. If you’re working in IT, here’s a single script that automates multiple essential tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Complete Bash Automation Script
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="c"&gt;# Function to create a new user&lt;/span&gt;
create_user&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"Enter username: "&lt;/span&gt; username
    &lt;span class="nb"&gt;sudo &lt;/span&gt;useradd &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="nv"&gt;$username&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"User &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt; created."&lt;/span&gt;
    &lt;span class="nb"&gt;sudo &lt;/span&gt;passwd &lt;span class="nv"&gt;$username&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Function to create multiple users from a file&lt;/span&gt;
bulk_create_users&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;read &lt;/span&gt;user&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;useradd &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt; &amp;lt; users.txt
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Function to update system and install essential packages&lt;/span&gt;
update_system&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Updating system..."&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /usr/bin/apt &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt upgrade &lt;span class="nt"&gt;-y&lt;/span&gt;
        &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; vim curl wget git
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /usr/bin/yum &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;yum update &lt;span class="nt"&gt;-y&lt;/span&gt;
    &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Function to perform automated backups&lt;/span&gt;
backup_system&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Performing backup..."&lt;/span&gt;
    &lt;span class="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-czf&lt;/span&gt; /backup/home_&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%F&lt;span class="si"&gt;)&lt;/span&gt;.tar.gz /home/
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Function to clean up logs&lt;/span&gt;
cleanup_logs&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Cleaning up logs..."&lt;/span&gt;
    find /var/log &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*.log"&lt;/span&gt; &lt;span class="nt"&gt;-mtime&lt;/span&gt; +7 &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="se"&gt;\;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Function to check system health&lt;/span&gt;
system_health_check&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Checking system health..."&lt;/span&gt;
    &lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt;
    free &lt;span class="nt"&gt;-m&lt;/span&gt;
    &lt;span class="nb"&gt;uptime&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Function to troubleshoot network&lt;/span&gt;
network_check&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Checking network status..."&lt;/span&gt;
    ping &lt;span class="nt"&gt;-c&lt;/span&gt; 4 google.com
    netstat &lt;span class="nt"&gt;-tulnp&lt;/span&gt;
    ip a | &lt;span class="nb"&gt;grep &lt;/span&gt;inet
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Function to monitor and restart a service&lt;/span&gt;
monitor_service&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;service_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"apache2"&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; systemctl is-active &lt;span class="nt"&gt;--quiet&lt;/span&gt; &lt;span class="nv"&gt;$service_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$service_name&lt;/span&gt;&lt;span class="s2"&gt; is down. Restarting..."&lt;/span&gt;
        &lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart &lt;span class="nv"&gt;$service_name&lt;/span&gt;
    &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Function to automate SSH login &amp;amp; remote command execution&lt;/span&gt;
remote_command&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    ssh user@remote-server &lt;span class="s2"&gt;"df -h"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Run all functions&lt;/span&gt;
create_user
bulk_create_users
update_system
backup_system
cleanup_logs
system_health_check
network_check
monitor_service
remote_command

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"All tasks completed successfully!"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Linux User Management Basics</title>
      <dc:creator>Madhushan  Herath</dc:creator>
      <pubDate>Sun, 16 Feb 2025 13:17:33 +0000</pubDate>
      <link>https://dev.to/madhushan/linux-user-management-basics-me0</link>
      <guid>https://dev.to/madhushan/linux-user-management-basics-me0</guid>
      <description>&lt;h1&gt;
  
  
  Linux User Management Basics: A Beginner's Guide
&lt;/h1&gt;

&lt;p&gt;If you're using Linux, knowing how to manage users is super important, especially if you're running a server or sharing your system with others. It helps you keep things organized and secure. Let’s go over the basics of handling users in Linux!&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Creating a New User
&lt;/h2&gt;

&lt;p&gt;Adding a new user is easy! If you're on Ubuntu/Debian, use this:&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;sudo &lt;/span&gt;adduser username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This sets up a new user with a home directory and some basic settings.&lt;/p&gt;

&lt;p&gt;For other Linux versions, try:&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;sudo &lt;/span&gt;useradd &lt;span class="nt"&gt;-m&lt;/span&gt; username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-m&lt;/code&gt; flag makes sure the home directory is created.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Setting and Changing User Passwords
&lt;/h2&gt;

&lt;p&gt;After adding a user, they’ll need a password:&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;sudo &lt;/span&gt;passwd username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you need to change your own password:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;passwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Deleting a User
&lt;/h2&gt;

&lt;p&gt;To remove a user but keep their files:&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;sudo &lt;/span&gt;deluser username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to remove the user and their home 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;sudo &lt;/span&gt;deluser &lt;span class="nt"&gt;--remove-home&lt;/span&gt; username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For RedHat-based systems:&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;sudo &lt;/span&gt;userdel &lt;span class="nt"&gt;-r&lt;/span&gt; username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Managing User Groups
&lt;/h2&gt;

&lt;p&gt;Groups help organize users with similar permissions. To add a user to a group:&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;sudo &lt;/span&gt;usermod &lt;span class="nt"&gt;-aG&lt;/span&gt; groupname username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To see which groups a user is in:&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;groups &lt;/span&gt;username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To create a new group:&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;sudo &lt;/span&gt;groupadd groupname
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To remove a user from a group:&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;sudo &lt;/span&gt;gpasswd &lt;span class="nt"&gt;-d&lt;/span&gt; username groupname
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Understanding Linux File Permissions
&lt;/h2&gt;

&lt;p&gt;Files and folders have permissions that control who can read, write, or run them. To check permissions:&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;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 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 user group 1234 Jan 1 12:00 file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The first character (&lt;code&gt;-&lt;/code&gt;) means it's a file (&lt;code&gt;d&lt;/code&gt; means directory).&lt;/li&gt;
&lt;li&gt;The next three (&lt;code&gt;rw-&lt;/code&gt;) are for the owner.&lt;/li&gt;
&lt;li&gt;The next three (&lt;code&gt;r--&lt;/code&gt;) are for the group.&lt;/li&gt;
&lt;li&gt;The last three (&lt;code&gt;r--&lt;/code&gt;) are for others.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To change permissions:&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 filename
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To change ownership:&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;chown &lt;/span&gt;user:group filename
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Switching Users
&lt;/h2&gt;

&lt;p&gt;To switch to another user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;su - username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or use &lt;code&gt;sudo&lt;/code&gt; to run commands as another user:&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;sudo&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; username &lt;span class="nb"&gt;command&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Getting Started with Linux: Key Lessons from the Linux Foundation</title>
      <dc:creator>Madhushan  Herath</dc:creator>
      <pubDate>Sun, 16 Feb 2025 12:42:48 +0000</pubDate>
      <link>https://dev.to/madhushan/getting-started-with-linux-key-lessons-from-the-linux-foundation-1g62</link>
      <guid>https://dev.to/madhushan/getting-started-with-linux-key-lessons-from-the-linux-foundation-1g62</guid>
      <description>&lt;p&gt;Linux is an awesome, open-source operating system that powers everything from servers to smartphones. If you're new to Linux and want to get started, the Linux Foundation has some great courses to help you out. Here are some key takeaways from a beginner-friendly Linux Foundation course.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Understanding Linux Basics&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Linux is based on Unix principles, which focus on keeping things simple and efficient. You'll get to know:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Linux file system structure, including folders like /home, /var, /etc, and /bin&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Handy command-line commands to move around and manage files&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How the Linux kernel works and talks to your hardware and apps&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The different Linux distributions and what makes them unique&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Mastering the Command Line&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The command line is where all the magic happens in Linux. Here are some must-know commands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ls – Lists files and folders (use ls -l for extra details)&lt;/li&gt;
&lt;li&gt;cd – Moves between directories (cd .. takes you up a level)&lt;/li&gt;
&lt;li&gt;cp – Copies files (cp file1 file2 to make a copy)&lt;/li&gt;
&lt;li&gt;mv – Moves or renames files (mv oldname newname to rename a file)&lt;/li&gt;
&lt;li&gt;rm – Deletes files (rm -r removes folders too)&lt;/li&gt;
&lt;li&gt;grep – Searches for words in files (grep 'keyword' filename)&lt;/li&gt;
&lt;li&gt;cat, less, and more – Show the contents of files quickly&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Managing Users and Permissions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To keep things secure, Linux has a solid user and permission system. You'll learn about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding and managing users (adduser, passwd, usermod, deluser)&lt;/li&gt;
&lt;li&gt;Changing file permissions (chmod, chown, ls -l to check permissions)&lt;/li&gt;
&lt;li&gt;Managing groups (usermod -aG groupname username to add users to groups)&lt;/li&gt;
&lt;li&gt;How permission values like rwxr-xr-- and numbers like chmod 755 work&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Installing and Managing Software&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Installing software on Linux is pretty straightforward. Here’s what you’ll use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;apt (for Debian/Ubuntu-based systems) – Example: apt install package_name&lt;/li&gt;
&lt;li&gt;yum or dnf (for RHEL/CentOS-based systems) – Used for software management&lt;/li&gt;
&lt;li&gt;snap and flatpak – Universal package managers for different distros&lt;/li&gt;
&lt;li&gt;How to build and install software from source if needed&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;System Monitoring and Process Management&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Keeping your Linux system running smoothly means monitoring it. Some useful commands include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;top and htop – Show what’s running on your system in real time&lt;/li&gt;
&lt;li&gt;ps – Check running processes (ps aux gives detailed info)&lt;/li&gt;
&lt;li&gt;kill – Stop processes (kill -9 PID for force quitting)&lt;/li&gt;
&lt;li&gt;df and du – Check disk space (df -h makes it human-readable)&lt;/li&gt;
&lt;li&gt;free -m – See how much memory is being used&lt;/li&gt;
&lt;li&gt;uptime – Find out how long your system has been running&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Basic Shell Scripting&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Want to automate boring tasks? Shell scripting makes life easier. You'll get into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Writing simple Bash scripts using #!/bin/bash&lt;/li&gt;
&lt;li&gt;Using loops (for, while) and conditions (if, else)&lt;/li&gt;
&lt;li&gt;Setting up automated tasks with cron (crontab -e to edit cron jobs)&lt;/li&gt;
&lt;li&gt;Working with variables and user inputs (read command) to make scripts interactive&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Networking and Security Basics&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Linux is a networking powerhouse. You'll learn how to:&lt;/li&gt;
&lt;li&gt;Check network connectivity (ping, netstat, ip a for IP details)&lt;/li&gt;
&lt;li&gt;Set up firewalls (iptables, ufw for managing access rules)&lt;/li&gt;
&lt;li&gt;Securely connect to remote systems with SSH (ssh user@hostname, scp for file transfers)&lt;/li&gt;
&lt;li&gt;View active connections (netstat -tulnp shows open ports and services)&lt;/li&gt;
&lt;li&gt;Strengthen security with tools like fail2ban and SELinux&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>linux</category>
      <category>cli</category>
      <category>ubuntu</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
