<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Siddh&#39;s Blueprint</title>
  
  
  <link href="https://mistrysiddh.com/atom.xml" rel="self"/>
  
  <link href="https://mistrysiddh.com/"/>
  <updated>2026-11-11T06:44:45.314Z</updated>
  <id>https://mistrysiddh.com/</id>
  
  <author>
    <name>Siddh Mistry</name>
    
  </author>
  
  <generator uri="https://hexo.io/">Hexo</generator>
  
  <entry>
    <title>Setting Up WireGuard VPN in 15 Minutes</title>
    <link href="https://mistrysiddh.com/2026/11/11/Setting-Up-WireGuard-VPN-In-15-Minutes/"/>
    <id>https://mistrysiddh.com/2026/11/11/Setting-Up-WireGuard-VPN-In-15-Minutes/</id>
    <published>2026-11-11T07:00:00.000Z</published>
    <updated>2026-11-11T06:44:45.314Z</updated>
    
    <content type="html"><![CDATA[<p><img src="/images/posts/wireguard-vpn-setup.png" alt="Setting up WireGuard VPN in 15 minutes"></p><h2 id="Why-WireGuard-over-OpenVPN">Why WireGuard over OpenVPN</h2><p>If you’ve set up OpenVPN before, you know the pain: certificate authorities, <code>.ovpn</code> config bundles, sluggish throughput. <strong>WireGuard</strong> is a different approach entirely — modern cryptography, a tiny codebase (easy to audit, hard to hide bugs in), and it’s fast enough that you’ll barely notice it’s running. It’s also baked into the Linux kernel since 5.6, so there’s no sketchy third-party kernel module to install.</p><p>Here’s the whole setup — one server, one client — in about 15 minutes.</p><p><img src="/images/posts/wireguard-tunnel.svg" alt="One tunnel, two peers"></p><h2 id="Step-1-Install-WireGuard-on-the-server">Step 1: Install WireGuard on the server</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> apt update</span><br><span class="line"><span class="built_in">sudo</span> apt install wireguard</span><br></pre></td></tr></table></figure><h2 id="Step-2-Generate-keys-for-the-server">Step 2: Generate keys for the server</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /etc/wireguard</span><br><span class="line"><span class="built_in">umask</span> 077</span><br><span class="line">wg genkey | <span class="built_in">tee</span> server_private.key | wg pubkey &gt; server_public.key</span><br></pre></td></tr></table></figure><p><code>umask 077</code> matters — it makes sure the private key file isn’t readable by other users on the box.</p><h2 id="Step-3-Generate-keys-for-the-client">Step 3: Generate keys for the client</h2><p>Do this on the client machine (or just run it again on the server and copy the keys over):</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wg genkey | <span class="built_in">tee</span> client_private.key | wg pubkey &gt; client_public.key</span><br></pre></td></tr></table></figure><h2 id="Step-4-Write-the-server-config">Step 4: Write the server config</h2><figure class="highlight ini"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># /etc/wireguard/wg0.conf</span></span><br><span class="line"><span class="section">[Interface]</span></span><br><span class="line"><span class="attr">PrivateKey</span> = &lt;paste server_private.key&gt;</span><br><span class="line"><span class="attr">Address</span> = <span class="number">10.8</span>.<span class="number">0.1</span>/<span class="number">24</span></span><br><span class="line"><span class="attr">ListenPort</span> = <span class="number">51820</span></span><br><span class="line"><span class="attr">PostUp</span> = iptables -A FORWARD -i wg0 -j ACCEPT<span class="comment">; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</span></span><br><span class="line"><span class="attr">PostDown</span> = iptables -D FORWARD -i wg0 -j ACCEPT<span class="comment">; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE</span></span><br><span class="line"></span><br><span class="line"><span class="section">[Peer]</span></span><br><span class="line"><span class="attr">PublicKey</span> = &lt;paste client_public.key&gt;</span><br><span class="line"><span class="attr">AllowedIPs</span> = <span class="number">10.8</span>.<span class="number">0.2</span>/<span class="number">32</span></span><br></pre></td></tr></table></figure><p>Replace <code>eth0</code> with whatever your server’s actual internet-facing interface is — check with <code>ip a</code> if you’re not sure.</p><h2 id="Step-5-Write-the-client-config">Step 5: Write the client config</h2><figure class="highlight ini"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># client.conf</span></span><br><span class="line"><span class="section">[Interface]</span></span><br><span class="line"><span class="attr">PrivateKey</span> = &lt;paste client_private.key&gt;</span><br><span class="line"><span class="attr">Address</span> = <span class="number">10.8</span>.<span class="number">0.2</span>/<span class="number">24</span></span><br><span class="line"><span class="attr">DNS</span> = <span class="number">1.1</span>.<span class="number">1.1</span></span><br><span class="line"></span><br><span class="line"><span class="section">[Peer]</span></span><br><span class="line"><span class="attr">PublicKey</span> = &lt;paste server_public.key&gt;</span><br><span class="line"><span class="attr">Endpoint</span> = your.server.ip:<span class="number">51820</span></span><br><span class="line"><span class="attr">AllowedIPs</span> = <span class="number">0.0</span>.<span class="number">0.0</span>/<span class="number">0</span></span><br><span class="line"><span class="attr">PersistentKeepalive</span> = <span class="number">25</span></span><br></pre></td></tr></table></figure><p>Two settings worth understanding, not just copy-pasting:</p><ul><li><strong><code>AllowedIPs = 0.0.0.0/0</code></strong> routes <em>all</em> client traffic through the tunnel — full VPN mode. If you only want to reach your home network (not route your general internet traffic through it), narrow this to your LAN range, e.g. <code>192.168.1.0/24</code>.</li><li><strong><code>PersistentKeepalive = 25</code></strong> sends a keepalive packet every 25 seconds. Without it, NAT on your router or mobile carrier will silently drop the “connection” (WireGuard is connectionless/UDP) after a period of inactivity, and you won’t notice until you try to use it.</li></ul><h2 id="Step-6-Open-the-port-and-enable-IP-forwarding">Step 6: Open the port and enable IP forwarding</h2><p>On the server, allow IP forwarding so it can actually route traffic between the tunnel and the internet:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">echo</span> <span class="string">&#x27;net.ipv4.ip_forward=1&#x27;</span> | <span class="built_in">sudo</span> <span class="built_in">tee</span> -a /etc/sysctl.conf</span><br><span class="line"><span class="built_in">sudo</span> sysctl -p</span><br></pre></td></tr></table></figure><p>Then forward UDP port 51820 to your server in your router’s settings — same place you’d forward any other port.</p><h2 id="Step-7-Bring-it-up">Step 7: Bring it up</h2><p>On the server:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> wg-quick up wg0</span><br><span class="line"><span class="built_in">sudo</span> systemctl <span class="built_in">enable</span> wg-quick@wg0   <span class="comment"># start on boot</span></span><br></pre></td></tr></table></figure><p>On the client (Linux):</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> wg-quick up ./client.conf</span><br></pre></td></tr></table></figure><p>On iOS/Android/macOS/Windows, just import <code>client.conf</code> into the official WireGuard app — it reads the same format directly, no conversion needed.</p><h2 id="Step-8-Verify-it’s-actually-working">Step 8: Verify it’s actually working</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> wg show</span><br></pre></td></tr></table></figure><p>You should see the peer listed with a recent “latest handshake” timestamp. If that timestamp never updates, the most common culprits are: the port isn’t actually forwarded, a firewall is blocking UDP 51820, or you copied a key wrong somewhere.</p><p>Then from the client, confirm your traffic is actually routing through:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl ifconfig.me</span><br></pre></td></tr></table></figure><p>That should now show your server’s public IP, not your actual location.</p><h2 id="Adding-a-second-client">Adding a second client</h2><p>Each new device is just another <code>[Peer]</code> block on the server and a new key pair:</p><figure class="highlight ini"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="section">[Peer]</span></span><br><span class="line"><span class="attr">PublicKey</span> = &lt;new client<span class="string">&#x27;s public key&gt;</span></span><br><span class="line"><span class="string">AllowedIPs = 10.8.0.3/32</span></span><br></pre></td></tr></table></figure><p>Restart the interface to pick up the change:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> wg-quick down wg0 &amp;&amp; <span class="built_in">sudo</span> wg-quick up wg0</span><br></pre></td></tr></table></figure><p>That’s it — no certificate authority to manage, no revocation lists, no bloated config bundles. Just key pairs and IP ranges. This is genuinely the fastest “set up my own VPN” path there is right now.</p>]]></content>
    
    
    <summary type="html">A fast, practical WireGuard VPN setup guide — server config, client config, and how to actually connect, from scratch in about 15 minutes.</summary>
    
    
    
    <category term="Self Hosting" scheme="https://mistrysiddh.com/categories/self-hosting/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="Self Hosting" scheme="https://mistrysiddh.com/tags/Self-Hosting/"/>
    
    <category term="VPN" scheme="https://mistrysiddh.com/tags/VPN/"/>
    
    <category term="WireGuard" scheme="https://mistrysiddh.com/tags/WireGuard/"/>
    
    <category term="Cybersecurity" scheme="https://mistrysiddh.com/tags/Cybersecurity/"/>
    
  </entry>
  
  <entry>
    <title>5 Linux Commands That Replaced 5 GUI Apps for Me</title>
    <link href="https://mistrysiddh.com/2026/11/11/5-Linux-Commands-That-Replaced-5-GUI-Apps/"/>
    <id>https://mistrysiddh.com/2026/11/11/5-Linux-Commands-That-Replaced-5-GUI-Apps/</id>
    <published>2026-11-11T06:50:00.000Z</published>
    <updated>2026-11-11T06:44:45.207Z</updated>
    
    <content type="html"><![CDATA[<p><img src="/images/posts/linux-commands-replace-gui.png" alt="5 Linux commands that replaced 5 GUI apps for me"></p><p>Somewhere along the way, the terminal stopped being “the thing I use when something breaks” and became the thing I reach for first — even on tasks I used to open a whole app for. Here are five that quietly made specific GUI apps disappear from my workflow entirely.</p><h2 id="1-ncdu-replaced-my-disk-usage-analyzer">1. <code>ncdu</code> replaced my disk usage analyzer</h2><p>I used to open a graphical disk-space app, wait for it to scan, then click through a treemap to find what was eating my storage. <code>ncdu</code> (NCurses Disk Usage) does the same job, in the terminal, over SSH, on a headless server where a GUI was never an option anyway.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> apt install ncdu</span><br><span class="line">ncdu /</span><br></pre></td></tr></table></figure><p>Navigate with arrow keys, press <code>d</code> to delete something you find, and it updates live. It’s faster than any GUI equivalent I’ve used, mostly because there’s no window to render.</p><h2 id="2-htop-replaced-my-task-manager">2. <code>htop</code> replaced my task manager</h2><p>Every OS has some version of a graphical task manager. On Linux, <code>htop</code> beats most of them — color-coded CPU/memory bars per core, tree view of process relationships, and you can kill a process without ever leaving the keyboard.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> apt install htop</span><br><span class="line">htop</span><br></pre></td></tr></table></figure><p>Press <code>F6</code> to sort by any column, <code>F9</code> to kill a process, <code>t</code> to toggle tree view. If you SSH into a remote server, this is non-negotiable — there is no GUI task manager to fall back on anyway.</p><h2 id="3-rsync-replaced-my-file-sync-GUI">3. <code>rsync</code> replaced my file-sync GUI</h2><p>I used to run a GUI sync tool to mirror folders between machines, complete with a progress bar and a “scanning files…” spinner that took longer than the actual transfer. <code>rsync</code> does it faster, resumes interrupted transfers automatically, and only copies what’s actually changed.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">rsync -avh --progress /source/folder/ user@remote:/destination/folder/</span><br></pre></td></tr></table></figure><p><code>-a</code> preserves permissions and timestamps, <code>-v</code> is verbose, <code>-h</code> makes sizes human-readable, and <code>--progress</code> gives you the progress bar you actually wanted. Add <code>--delete</code> if you want the destination to exactly mirror the source (careful with that one).</p><h2 id="4-tmux-replaced-juggling-a-dozen-terminal-windows">4. <code>tmux</code> replaced juggling a dozen terminal windows</h2><p>Before <code>tmux</code>, I had a taskbar full of separate terminal windows for “the server log,” “the build process,” “the editor,” “the monitoring dashboard.” <code>tmux</code> puts all of that in one SSH session, split into panes and windows that survive even if your connection drops.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">tmux new -s work</span><br><span class="line"><span class="comment"># Ctrl+b % → split pane vertically</span></span><br><span class="line"><span class="comment"># Ctrl+b &quot; → split pane horizontally</span></span><br><span class="line"><span class="comment"># Ctrl+b d → detach (keeps running)</span></span><br><span class="line">tmux attach -t work   <span class="comment"># reattach later, exactly where you left off</span></span><br></pre></td></tr></table></figure><p>That last part is the real win: close your laptop, open it later, reattach, and everything’s still running exactly as you left it — including over a flaky connection where a GUI remote desktop would’ve just frozen.</p><h2 id="5-ffmpeg-replaced-my-simple-video-editor">5. <code>ffmpeg</code> replaced my simple video editor</h2><p>I’m not cutting a feature film in the terminal, but for the 90% case — trim a clip, convert a format, strip audio, compress a video before uploading it somewhere — opening a full video editor is massive overkill. <code>ffmpeg</code> does all of it in one line.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Trim from 00:01:30 for 20 seconds, no re-encode (fast, lossless)</span></span><br><span class="line">ffmpeg -i input.mp4 -ss 00:01:30 -t 20 -c copy output.mp4</span><br><span class="line"></span><br><span class="line"><span class="comment"># Compress for upload</span></span><br><span class="line">ffmpeg -i input.mp4 -vcodec libx264 -crf 28 output.mp4</span><br><span class="line"></span><br><span class="line"><span class="comment"># Strip audio entirely</span></span><br><span class="line">ffmpeg -i input.mp4 -an output_noaudio.mp4</span><br></pre></td></tr></table></figure><p>The learning curve is real — ffmpeg’s flag soup is legendarily unintuitive — but once you have your five go-to commands saved somewhere, you never touch a GUI editor for simple tasks again.</p><h2 id="The-pattern-here">The pattern here</h2><p>None of these are obscure power-user tools. They’re just better at the one job they do than the GUI equivalent, because they don’t have to render a window, they work identically over SSH on a headless box, and they’re scriptable the moment you need to repeat something. That’s usually the actual argument for the terminal — not “it looks cooler,” but “it does the same job with less overhead and it still works when there’s no display attached.”</p>]]></content>
    
    
    <summary type="html">Five Linux terminal tools that quietly replaced GUI apps I used to rely on — faster, lighter, and they work over SSH.</summary>
    
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/categories/linux/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="terminal" scheme="https://mistrysiddh.com/tags/terminal/"/>
    
    <category term="productivity" scheme="https://mistrysiddh.com/tags/productivity/"/>
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
  </entry>
  
  <entry>
    <title>I Audited My Own Home Network for Security Holes</title>
    <link href="https://mistrysiddh.com/2026/11/11/I-Audited-My-Own-Home-Network-For-Security-Holes/"/>
    <id>https://mistrysiddh.com/2026/11/11/I-Audited-My-Own-Home-Network-For-Security-Holes/</id>
    <published>2026-11-11T06:40:00.000Z</published>
    <updated>2026-11-11T06:44:45.052Z</updated>
    
    <content type="html"><![CDATA[<p><img src="/images/posts/home-network-audit.png" alt="I audited my own home network for security holes"></p><h2 id="Why-bother-auditing-your-own-network">Why bother auditing your own network</h2><p>It’s easy to assume “it’s just my home Wi-Fi, who cares.” But a home network today usually has more exposed surface than most small offices did a decade ago — smart plugs, a NAS, a few Docker hosts, a kid’s tablet, a guest’s phone that was never removed from Wi-Fi. I decided to actually go through mine properly instead of assuming it was fine.</p><p>Here’s what I used, what I found, and what I fixed — so you can run the same pass on yours in an evening.</p><h2 id="Step-1-Find-every-device-actually-on-the-network">Step 1: Find every device actually on the network</h2><p>Don’t trust your router’s “connected devices” page — it’s often incomplete or just wrong. I used <code>arp-scan</code> for a fast local sweep:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> arp-scan --localnet</span><br></pre></td></tr></table></figure><p>And <code>nmap</code> for a more thorough host discovery pass:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> nmap -sn 192.168.1.0/24</span><br></pre></td></tr></table></figure><p><strong>What I found:</strong> two devices I didn’t recognize at first glance. One turned out to be a smart bulb I’d forgotten existed. The other was an old phone still connected from a visit months ago — not malicious, just sloppy hygiene. Still, if I didn’t recognize it, neither would I notice if something actually unwanted joined.</p><p><strong>Fix:</strong> renamed every device in the router’s device list to something identifiable, and kicked the stale connection off.</p><h2 id="Step-2-Port-scan-your-own-devices">Step 2: Port-scan your own devices</h2><p>For each device that matters (NAS, servers, anything self-hosted), I ran a proper port scan from another machine on the same network:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -sV -p- 192.168.1.50</span><br></pre></td></tr></table></figure><p><code>-p-</code> scans all 65535 ports, not just the common 1000 — slower, but it’s the only way to actually know what’s listening.</p><p><strong>What I found:</strong> a management interface on my NAS that I’d set up once for a one-time task and never closed back down. Also a service I’d forgotten was still bound to <code>0.0.0.0</code> instead of <code>127.0.0.1</code>, meaning it was reachable from any device on the LAN, not just the host itself.</p><p><strong>Fix:</strong> closed the management interface, and rebound the forgotten service to localhost-only since nothing else on the network needed to talk to it.</p><h2 id="Step-3-Check-what’s-actually-exposed-to-the-internet">Step 3: Check what’s actually exposed to the internet</h2><p>Your router is your real perimeter. From outside your network (phone on mobile data works fine), check what’s actually reachable:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nmap -Pn your.public.ip -p 1-1000</span><br></pre></td></tr></table></figure><p>Or just use an external tool like <a href="https://www.shodan.io/">Shodan</a> or <a href="https://canyouseeme.org/">canyouseeme.org</a> to check specific ports without needing a second network.</p><p><strong>What I found:</strong> a port-forward rule I’d set up for a game server over a year ago that I never removed. It wasn’t actively dangerous, but it was one more thing an attacker didn’t need to work for.</p><p><strong>Fix:</strong> audited every port-forward rule in the router, removed anything not actively in use, and documented the ones that stayed with a reason why.</p><h2 id="Step-4-Review-Wi-Fi-settings-properly">Step 4: Review Wi-Fi settings properly</h2><p>A few things worth checking that people set once and never revisit:</p><ul><li><strong>WPA3 if your devices support it</strong>, WPA2-AES at minimum — never WPA/TKIP or (god forbid) WEP</li><li><strong>WPS disabled.</strong> It’s a convenience feature with a long history of being trivially brute-forceable</li><li><strong>Guest network actually isolated</strong> from the main LAN, not just a separate SSID on the same subnet</li><li><strong>Router admin password changed</strong> from the default — sounds obvious, still worth double-checking</li><li><strong>Router firmware up to date</strong> — most people never check this after initial setup</li></ul><p><strong>What I found:</strong> WPS was still enabled. Had been since the router was first set up. No idea for how long.</p><p><strong>Fix:</strong> disabled it, verified over a second scan that it was actually off (some routers lie about this in the UI).</p><h2 id="Step-5-Look-at-what-your-devices-are-phoning-home-to">Step 5: Look at what your devices are phoning home to</h2><p>This one’s less common advice but worth it: run a quick DNS query log on your router or a Pi-hole if you have one, and look at what’s leaving your network. You’ll be surprised how much “smart” home gear talks to servers you’ve never heard of, constantly.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># if you&#x27;re running Pi-hole</span></span><br><span class="line">pihole -t</span><br></pre></td></tr></table></figure><p><strong>What I found:</strong> nothing alarming, but a genuinely useful list of exactly which devices talk to which third parties — which is good baseline knowledge to have before something <em>does</em> look wrong later.</p><h2 id="The-actual-takeaway">The actual takeaway</h2><p>None of what I found was a five-alarm fire. That’s kind of the point — most home network security isn’t about catching a sophisticated attacker, it’s about closing the dozen small gaps that accumulate from “I’ll fix that later” over years of normal use. An hour with <code>nmap</code> and <code>arp-scan</code> is enough to find most of them.</p><p>If you’ve never done this pass on your own network, do it this weekend. You’ll probably find at least one thing you forgot was even there.</p>]]></content>
    
    
    <summary type="html">A hands-on walkthrough of auditing a home network for security issues — unknown devices, open ports, weak Wi-Fi settings, and what actually got fixed.</summary>
    
    
    
    <category term="Cybersecurity" scheme="https://mistrysiddh.com/categories/cybersecurity/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="hacking" scheme="https://mistrysiddh.com/tags/hacking/"/>
    
    <category term="homelab" scheme="https://mistrysiddh.com/tags/homelab/"/>
    
    <category term="Self Hosting" scheme="https://mistrysiddh.com/tags/Self-Hosting/"/>
    
    <category term="networking" scheme="https://mistrysiddh.com/tags/networking/"/>
    
  </entry>
  
  <entry>
    <title>Docker Compose for Homelab Beginners</title>
    <link href="https://mistrysiddh.com/2026/11/11/Docker-Compose-For-Homelab-Beginners/"/>
    <id>https://mistrysiddh.com/2026/11/11/Docker-Compose-For-Homelab-Beginners/</id>
    <published>2026-11-11T06:30:00.000Z</published>
    <updated>2026-11-11T06:44:44.920Z</updated>
    
    <content type="html"><![CDATA[<p><img src="/images/posts/docker-compose-homelab.png" alt="Docker Compose for homelab beginners"></p><h2 id="Why-Compose-not-just-docker-run">Why Compose, not just <code>docker run</code></h2><p>If you’ve only ever run containers one at a time with <code>docker run</code>, you already know the pain: remembering which flags you used last time, manually creating networks, starting things in the right order after a reboot. <strong>Docker Compose</strong> fixes all of that with one YAML file that describes your entire stack — and one command to bring it all up or tear it all down.</p><p>For a homelab, that’s the difference between “I’ll fix the server when I get home” and “I’ll SSH in and run <code>docker compose up -d</code> from my phone.”</p><h2 id="The-stack-we’re-building">The stack we’re building</h2><p>A dead-simple, real-world shape: a reverse proxy in front of an app, talking to a database. This is the backbone of a huge number of self-hosted services (Nextcloud, Ghost, Immich, you name it).</p><p><img src="/images/posts/docker-compose-stack.svg" alt="A minimal homelab Compose stack"></p><ul><li><strong>nginx</strong> — reverse proxy, the only thing exposed to the internet</li><li><strong>app</strong> — your actual service</li><li><strong>postgres</strong> — the database, never exposed outside the Docker network</li></ul><h2 id="The-docker-compose-yml">The <code>docker-compose.yml</code></h2><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">version:</span> <span class="string">&quot;3.9&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="attr">services:</span></span><br><span class="line">  <span class="attr">proxy:</span></span><br><span class="line">    <span class="attr">image:</span> <span class="string">nginx:1.25</span></span><br><span class="line">    <span class="attr">ports:</span></span><br><span class="line">      <span class="bullet">-</span> <span class="string">&quot;443:443&quot;</span></span><br><span class="line">      <span class="bullet">-</span> <span class="string">&quot;80:80&quot;</span></span><br><span class="line">    <span class="attr">volumes:</span></span><br><span class="line">      <span class="bullet">-</span> <span class="string">./nginx.conf:/etc/nginx/nginx.conf:ro</span></span><br><span class="line">      <span class="bullet">-</span> <span class="string">./certs:/etc/nginx/certs:ro</span></span><br><span class="line">    <span class="attr">depends_on:</span></span><br><span class="line">      <span class="bullet">-</span> <span class="string">app</span></span><br><span class="line">    <span class="attr">restart:</span> <span class="string">unless-stopped</span></span><br><span class="line"></span><br><span class="line">  <span class="attr">app:</span></span><br><span class="line">    <span class="attr">image:</span> <span class="string">yourapp:latest</span></span><br><span class="line">    <span class="attr">environment:</span></span><br><span class="line">      <span class="attr">DATABASE_URL:</span> <span class="string">postgres://appuser:$&#123;DB_PASSWORD&#125;@db:5432/appdb</span></span><br><span class="line">    <span class="attr">depends_on:</span></span><br><span class="line">      <span class="bullet">-</span> <span class="string">db</span></span><br><span class="line">    <span class="attr">restart:</span> <span class="string">unless-stopped</span></span><br><span class="line"></span><br><span class="line">  <span class="attr">db:</span></span><br><span class="line">    <span class="attr">image:</span> <span class="string">postgres:16</span></span><br><span class="line">    <span class="attr">environment:</span></span><br><span class="line">      <span class="attr">POSTGRES_USER:</span> <span class="string">appuser</span></span><br><span class="line">      <span class="attr">POSTGRES_PASSWORD:</span> <span class="string">$&#123;DB_PASSWORD&#125;</span></span><br><span class="line">      <span class="attr">POSTGRES_DB:</span> <span class="string">appdb</span></span><br><span class="line">    <span class="attr">volumes:</span></span><br><span class="line">      <span class="bullet">-</span> <span class="string">db_data:/var/lib/postgresql/data</span></span><br><span class="line">    <span class="attr">restart:</span> <span class="string">unless-stopped</span></span><br><span class="line"></span><br><span class="line"><span class="attr">volumes:</span></span><br><span class="line">  <span class="attr">db_data:</span></span><br></pre></td></tr></table></figure><p>A few things worth calling out for beginners:</p><ul><li><strong>Only <code>proxy</code> publishes ports.</strong> <code>app</code> and <code>db</code> don’t need <code>ports:</code> at all — Compose automatically puts every service on the same internal network, so <code>app</code> can reach <code>db</code> just by using the service name <code>db</code> as the hostname. That’s why the connection string above says <code>@db:5432</code>, not an IP address.</li><li><strong><code>depends_on</code> controls start order, not readiness.</strong> Compose will start <code>db</code> before <code>app</code>, but it won’t wait for Postgres to actually finish initializing. For anything that matters, add a healthcheck (see below) or build in retry logic on the app side.</li><li><strong>Named volumes (<code>db_data</code>) survive <code>docker compose down</code>.</strong> If you want to wipe everything including data, you need <code>docker compose down -v</code> — that extra <code>-v</code> is the difference between “restart clean” and “delete my database.”</li><li><strong><code>${DB_PASSWORD}</code></strong> pulls from a <code>.env</code> file sitting next to your <code>docker-compose.yml</code>. Never hardcode secrets directly in the YAML if you’re ever going to commit this to git.</li></ul><h2 id="Adding-a-healthcheck-the-thing-most-tutorials-skip">Adding a healthcheck (the thing most tutorials skip)</h2><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">db:</span></span><br><span class="line">  <span class="attr">image:</span> <span class="string">postgres:16</span></span><br><span class="line">  <span class="attr">healthcheck:</span></span><br><span class="line">    <span class="attr">test:</span> [<span class="string">&quot;CMD-SHELL&quot;</span>, <span class="string">&quot;pg_isready -U appuser&quot;</span>]</span><br><span class="line">    <span class="attr">interval:</span> <span class="string">5s</span></span><br><span class="line">    <span class="attr">timeout:</span> <span class="string">5s</span></span><br><span class="line">    <span class="attr">retries:</span> <span class="number">5</span></span><br></pre></td></tr></table></figure><p>Then change <code>app</code>’s dependency to actually wait for it:</p><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">app:</span></span><br><span class="line">  <span class="attr">depends_on:</span></span><br><span class="line">    <span class="attr">db:</span></span><br><span class="line">      <span class="attr">condition:</span> <span class="string">service_healthy</span></span><br></pre></td></tr></table></figure><p>Now <code>app</code> won’t even attempt to start until Postgres reports healthy — no more crash-loop on first boot after a reboot.</p><h2 id="The-commands-you’ll-actually-use">The commands you’ll actually use</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">docker compose up -d        <span class="comment"># start everything, detached</span></span><br><span class="line">docker compose logs -f app  <span class="comment"># tail logs for one service</span></span><br><span class="line">docker compose ps           <span class="comment"># see what&#x27;s running and its health status</span></span><br><span class="line">docker compose restart app  <span class="comment"># restart just one service</span></span><br><span class="line">docker compose down         <span class="comment"># stop and remove containers (keeps volumes)</span></span><br><span class="line">docker compose pull &amp;&amp; docker compose up -d   <span class="comment"># update to latest images</span></span><br></pre></td></tr></table></figure><h2 id="Where-to-go-from-here">Where to go from here</h2><p>Once this clicks, the natural next steps are:</p><ul><li>Put <strong>Traefik</strong> or <strong>Caddy</strong> in front instead of raw nginx for automatic HTTPS certificates</li><li>Split secrets into a proper <code>.env</code> file and add it to <code>.gitignore</code></li><li>Add a second Compose file (<code>docker-compose.override.yml</code>) for dev-vs-prod differences</li><li>Look at <strong>Watchtower</strong> for automated image updates, if you trust upstream maintainers enough</li></ul><p>Compose won’t replace Kubernetes for a real production fleet, but for a homelab running a dozen self-hosted services on one box, it’s honestly all you need.</p>]]></content>
    
    
    <summary type="html">A practical walkthrough of Docker Compose for homelabbers — a reverse proxy, an app, and a database wired together with one YAML file.</summary>
    
    
    
    <category term="Self Hosting" scheme="https://mistrysiddh.com/categories/self-hosting/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="Docker" scheme="https://mistrysiddh.com/tags/Docker/"/>
    
    <category term="homelab" scheme="https://mistrysiddh.com/tags/homelab/"/>
    
    <category term="Self Hosting" scheme="https://mistrysiddh.com/tags/Self-Hosting/"/>
    
    <category term="automation" scheme="https://mistrysiddh.com/tags/automation/"/>
    
  </entry>
  
  <entry>
    <title>PHP2Shell: Inside the Worst PHP RCE in Years (CVE-2026-109618 &amp; CVE-2026-109619)</title>
    <link href="https://mistrysiddh.com/2026/11/09/PHP2Shell-Critical-RCE-CVE-2026-109618-109619/"/>
    <id>https://mistrysiddh.com/2026/11/09/PHP2Shell-Critical-RCE-CVE-2026-109618-109619/</id>
    <published>2026-11-09T12:44:00.000Z</published>
    <updated>2026-11-09T13:02:34.878Z</updated>
    
    <content type="html"><![CDATA[<p><img src="/images/posts/php2shell-cve-2026.png" alt="PHP2Shell CVE-2026-109618 CVE-2026-109619"></p><h2 id="The-headline">The headline</h2><p>On <strong>October 21, 2026</strong>, the PHP core team shipped an out-of-band security release for two critical vulnerabilities — <strong>CVE-2026-109618</strong> and <strong>CVE-2026-109619</strong> — now widely known by their project name, <strong>PHP2Shell</strong>. Both allow <strong>unauthenticated remote code execution</strong>, and PHP’s own advisory says every installation serving web requests is at risk: PHP-FPM, Apache <code>mod_php</code>, <code>php-cgi</code>, FrankenPHP, and LiteSpeed are all in scope.</p><p>That’s basically the entire PHP hosting ecosystem — WordPress, Laravel, Magento, Drupal, ThinkPHP, and every hand-rolled legacy app sitting on a shared host.</p><h2 id="What’s-actually-broken">What’s actually broken</h2><p>This isn’t a simple injection bug — it’s a <strong>use-after-free chain</strong> buried in PHP’s memory management, and it’s been there since <strong>PHP 5.4</strong>.</p><p>In plain terms:</p><ol><li><strong>The setup (mod_php):</strong> PHP can leave dangling pointers when an allocation blows past <code>memory_limit</code>, or a fatal error interrupts cleanup. On Apache’s <code>mod_php</code>, the worker process survives the crash and gets reused for the <em>next</em> request — but some old request’s memory (like session data) never got properly destroyed. A later request can end up reading memory that should have been freed.</li><li><strong>The PHP-FPM twist:</strong> FPM usually kills the whole worker on a startup failure, so that trick shouldn’t work there. But researchers found a second path through PHP’s <strong>unserializer</strong> (<code>BG(unserialize)</code>). If an out-of-memory error hits <em>after</em> the request has already started — say, during <code>session_start()</code> or <code>unserialize()</code> — FPM’s worker survives, but it’s left holding a stale pointer into freed memory.</li><li><strong>The reclaim:</strong> Attackers then send a crafted <strong>multipart file upload</strong> (abusing <code>session.upload_progress</code>) that runs <em>before</em> PHP’s normal request setup. This lets them overwrite that freed memory with their own fake data structures — forging a fake PHP object whose “destructor” is <code>system()</code>.</li><li><strong>The fire:</strong> When the session is cleaned up at the end of the request, PHP calls that fake destructor — and the attacker’s shell command runs. The worker crashes right after, but FPM just respawns it, and the attacker already has their output.</li></ol><p>No login, no plugin, no uploaded <code>.php</code> shell required — just HTTP requests at a PHP app that uses sessions.</p><p><img src="/images/posts/php2shell-attack-chain.svg" alt="PHP2Shell attack chain: ARM, RECLAIM, FORGE, FIRE"></p><h2 id="Who’s-affected">Who’s affected</h2><table><thead><tr><th>Branch</th><th>Vulnerable</th><th>Patched</th></tr></thead><tbody><tr><td>PHP 8.4</td><td>8.4.0 – 8.4.26</td><td><strong>8.4.27</strong></td></tr><tr><td>PHP 8.3</td><td>8.3.0 – 8.3.35</td><td><strong>8.3.36</strong></td></tr><tr><td>PHP 8.2</td><td>8.2.0 – 8.2.34</td><td><strong>8.2.35</strong></td></tr><tr><td>PHP 8.1 / 8.0</td><td>every release</td><td>⚠️ <strong>no official patch</strong> (EOL)</td></tr><tr><td>PHP 7.x</td><td>every release</td><td>⚠️ <strong>no official patch</strong> (EOL)</td></tr><tr><td>PHP 5.x</td><td>every release</td><td>⚠️ <strong>no official patch</strong> (EOL) — limited to a related session-file attack</td></tr></tbody></table><p>If you’re still running PHP 7.x or 8.0/8.1 in production, this is the wake-up call to migrate — there is no fix coming for EOL branches.</p><h2 id="What-to-do-right-now">What to do right now</h2><ol><li><strong>Patch immediately.</strong> Upgrade to PHP 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 or later. This is the only complete fix.</li><li><strong>If you can’t patch yet (temporary, partial mitigation only):</strong><ul><li>On <strong>PHP-FPM</strong>: set <code>session.upload_progress.enabled = 0</code> and <code>memory_limit = -1</code>.</li><li>On <strong>mod_php</strong>: set <code>memory_limit = -1</code>.</li><li>Understand that removing <code>memory_limit</code> trades one risk (RCE) for another (memory exhaustion / DoS) — patch as soon as you can and don’t treat this as a fix.</li></ul></li><li><strong>If you’re on a managed platform</strong> (AWS, Azure App Service, etc.), check whether the platform already auto-patched — most major cloud PHP runtimes rolled out fixes within 24 hours of disclosure.</li><li><strong>Watch your logs</strong> for unusually large multipart/session traffic hitting PHP endpoints — that’s the fingerprint of exploitation attempts in the wild.</li></ol><h2 id="It’s-not-just-PHP2Shell-—-a-rough-month-for-PHP-security">It’s not just PHP2Shell — a rough month for PHP security</h2><p>A few other PHP-ecosystem CVEs have landed recently and are worth knowing about if you’re running a PHP stack:</p><ul><li><strong>CVE-2025-63888 / CVE-2025-63889</strong> — Two vulnerabilities in <strong>ThinkPHP 5.0.24</strong>’s template engine: a remote code execution bug via the template file driver, and an arbitrary file-read bug via crafted template paths. If you’re still on ThinkPHP 5.0.x, it’s end-of-life and these won’t be the last.</li><li><strong>CVE-2025-63828</strong> — An HTTP header injection vulnerability in the <strong>Backdrop CMS</strong> (PHP-based) password reset flow, allowing session hijacking via a manipulated <code>Host</code> header. No fixed version exists yet.</li></ul><p>The pattern across all of these is the same: legacy PHP code paths, memory-handling edge cases, and unvalidated input in places developers assumed were “internal.” If there’s one takeaway, it’s this — <strong>patch cadence matters more for PHP than almost any other stack</strong>, because so much of the internet still runs on it.</p><h2 id="Bottom-line">Bottom line</h2><p>PHP2Shell is a textbook example of how a decade-old memory bug can resurface as a pre-auth RCE once someone puts the right pieces together. If you run anything on PHP — and odds are you do, even indirectly — check your version today:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">php -v</span><br></pre></td></tr></table></figure><p>If it’s not 8.2.35+, 8.3.36+, 8.4.27+, or 8.5.12+, that’s your next task.</p>]]></content>
    
    
    <summary type="html">A breakdown of the PHP2Shell vulnerabilities (CVE-2026-109618, CVE-2026-109619), the critical RCE chain affecting PHP-FPM, mod_php, and more, plus other PHP CVEs making headlines right now.</summary>
    
    
    
    <category term="Cybersecurity" scheme="https://mistrysiddh.com/categories/cybersecurity/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="PHP" scheme="https://mistrysiddh.com/tags/PHP/"/>
    
    <category term="CVE" scheme="https://mistrysiddh.com/tags/CVE/"/>
    
    <category term="RCE" scheme="https://mistrysiddh.com/tags/RCE/"/>
    
    <category term="vulnerability" scheme="https://mistrysiddh.com/tags/vulnerability/"/>
    
  </entry>
  
  <entry>
    <title>Hermes Brain: An Obsidian Second Brain Your AI Agent Can&#39;t Forget</title>
    <link href="https://mistrysiddh.com/2026/10/30/Hermes-Brain-Obsidian-Second-Brain-Template/"/>
    <id>https://mistrysiddh.com/2026/10/30/Hermes-Brain-Obsidian-Second-Brain-Template/</id>
    <published>2026-10-30T06:30:00.000Z</published>
    <updated>2026-11-02T12:30:00.000Z</updated>
    
    <content type="html"><![CDATA[<p><img src="/images/posts/hermes-brain-graph-view.png" alt="Hermes Brain graph view"></p><hr><h2 id="The-Problem-Your-Agent-Remembers-Everything-Except-When-It-Matters">The Problem: Your Agent Remembers Everything, Except When It Matters</h2><p>In my <a href="/2026/09/06/Self-Hosted-AI-Assistant-OpenClaw-Hermes/">last post</a> I walked through running OpenClaw on Hermes on my own hardware. It works well, but after weeks of daily usage, two fundamental pain points kept surfacing:</p><ol><li><strong>Context lived in chat logs I would never scroll back through.</strong> A critical architectural decision made during a 2:00 AM debugging session three weeks ago was effectively lost.</li><li><strong>Agent memory was an opaque black box.</strong> Whatever the agent decided to remember, it silently stashed away. I had no easy way to inspect it, verify it, or say: <em>“no, that assumption is wrong.”</em></li></ol><p>So I built <strong>Hermes Brain</strong>: an Obsidian vault template that sits next to your agent and turns every session into plain, searchable markdown, with a human-in-the-loop review step before anything becomes permanent memory.</p><p>It is free, MIT-licensed, and lives here: <a href="https://github.com/mistrysiddh/hermes-brain-template">github.com/mistrysiddh/hermes-brain-template</a>.</p><p>Since its initial release, the project has grown through 40+ releases into a full-fledged agent intelligence system (currently <strong>v1.37.0</strong>), featuring 15+ multi-harness agent skills, offline semantic search, cognitive reflection cycles, a decision log, and automated vault curation.</p><hr><h2 id="How-It-Works-The-3-Stage-Memory-Pipeline">How It Works: The 3-Stage Memory Pipeline</h2><p>The foundation of Hermes Brain is a disciplined three-stage progression:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">04-Archives/Daily/YYYY/MM/DD/*.md  →  04-Archives/Memory-Review/*.md  →  Hermes MEMORY.md / USER.md</span><br><span class="line">      (raw session archive)              (staged candidate facts,            (durable, injected into</span><br><span class="line">                                          human-reviewed)                     every turn, promoted by hand)</span><br></pre></td></tr></table></figure><ol><li><strong>Archive.</strong> An automated background job dumps every Hermes session to markdown. Transcripts are deduplicated, scrubbed for secrets (API keys, IP addresses, tokens) on the way in, and indexed in <code>manifest.jsonl</code>.</li><li><strong>Stage.</strong> Facts and learnings worth preserving are written as <em>candidates</em> into <code>04-Archives/Memory-Review/</code>. Nothing auto-promotes to permanent memory without review.</li><li><strong>Promote.</strong> You review candidates (via Obsidian Kanban boards, or through <code>promote_memory.py --review</code>) and approve the ones you want. Only then do they reach the agent’s durable system prompt memory.</li></ol><p>Your agent gets a persistent memory, and you retain the editor’s pen.</p><hr><h2 id="What’s-Inside-the-Vault">What’s Inside the Vault</h2><p>The vault implements the <strong>PARA method</strong> (Projects, Areas, Resources, Archives) augmented with a <code>_System/</code> automation core:</p><table><thead><tr><th>Folder</th><th>What lives there</th></tr></thead><tbody><tr><td><code>01-Projects/</code></td><td>Active projects, Architecture Decision Records (<code>ADR/</code>), and Dataview project databases (<code>Projects.base</code>)</td></tr><tr><td><code>02-Areas/</code></td><td>Human alignment profile (<code>User-Profile.md</code>), installed skills catalog, team rosters, and the [[Personality-Judgment-Framework]]</td></tr><tr><td><code>03-Resources/</code></td><td>Maps of Content (AI/ML, Cybersecurity, Agentic Architecture, Tech Stack), technical guides, deep research notes, plus <code>Decisions/</code>, <code>Principles/</code> and <code>Axioms.md</code></td></tr><tr><td><code>04-Archives/</code></td><td>Daily session timeline, chat correlations, memory review Kanban staging, audit reports, and <code>Cron/</code> logs and cron-run sessions (kept separate from real chats)</td></tr><tr><td><code>_System/</code></td><td>Note templates, visual architecture canvases (<code>Memory-Pipeline.canvas</code>), and cross-platform automation scripts</td></tr></tbody></table><p>It comes preconfigured with <strong>Dataview</strong>, <strong>Kanban</strong>, <strong>Local REST API</strong>, and <strong>Smart Connections</strong> plugins, two dark themes (<strong>Tokyo Night</strong> and <strong>Nemoclaw</strong>), and a unified <code>Dashboard.md</code> tracking active projects, token telemetry, archiver health, and skill analytics.</p><p>It also bundles an <strong>MCP Server</strong> (<code>hermes_brain_mcp.py</code>) that exposes tools like <code>vault_search</code>, <code>read_note</code>, and <code>stage_memory_candidate</code> directly to local and remote LLM agents.</p><hr><h2 id="Decisions-Principles-Axioms">Decisions, Principles &amp; Axioms</h2><p>Added in v1.24, this is a knowledge layer built for how agents actually reason, not just search:</p><ul><li><strong><code>Decisions/</code></strong>: log hard-to-reverse choices with a mandatory <strong>Alternatives Rejected</strong> section. It is the most valuable part, because it stops your agent re-proposing an idea you already considered and rejected months ago.</li><li><strong><code>Principles/</code></strong>: standing rules distilled from repeated decisions (“we always do X”, not just “we chose X on this date”).</li><li><strong><code>Axioms.md</code></strong>: the few foundational beliefs everything else derives from. It ships empty on purpose, because these should be yours.</li></ul><p>Notes link to each other (<code>derived_from</code>, <code>evidenced_by</code>), so an agent can trace <em>why</em> a rule exists.</p><hr><h2 id="Multi-Harness-Agent-Skills-GitHub-Agents">Multi-Harness Agent Skills &amp; GitHub Agents</h2><p>Hermes Brain is no longer just a passive note repository. It ships with a suite of <strong>multi-harness agent skills</strong> (<code>AGENTS.md</code>) designed to run as standalone CLI tools or as GitHub Agents (<code>.github/agents/</code> / <code>@hermes-brain &lt;skill&gt;</code>):</p><ul><li>🔍 <strong><code>self-critique</code> (<code>self_critique.py</code>)</strong>: Runs comprehensive vault health audits — flagging broken wikilinks, missing YAML frontmatter, path inconsistencies, and secret leaks.</li><li>🛠️ <strong><code>auto-remediate</code> (<code>auto_remediate.py</code>)</strong>: Safely and automatically applies fixes for issues surfaced by self-critique.</li><li>🧬 <strong><code>knowledge-synthesis</code> (<code>knowledge_synthesis.py</code>)</strong>: Performs BASB and Zettelkasten knowledge consolidation — extracting atomic notes, progressive summaries, Maps of Content (MOCs), and bidirectional backlinks.</li><li>🌙 <strong><code>dream-cycle</code> (<code>dream_cycle.py</code>)</strong>: Autonomous cognitive reflection — connects disparate sessions, identifies knowledge drift, drafts ADRs, and prepares memory candidates.</li><li>📡 <strong><code>radar</code> (<code>radar.py</code>)</strong>: Standing surveillance on blogs, news feeds, and arXiv papers, producing curated daily/weekly intelligence digests.</li><li>📊 <strong><code>metrics</code> (<code>metrics.py</code>)</strong>: Generates timestamped snapshots of vault growth, link density, tag distribution, and stale content.</li><li>🎯 <strong><code>quiz</code> (<code>quiz.py</code>)</strong>: Generates active-recall questions directly from your notes to reinforce learned concepts.</li><li>🧠 <strong><code>converse-learn</code> (<code>converse_learn.py</code>)</strong>: Reviews sessions and extracts learnings into memory, lessons, skills, or project docs, confirmation-first.</li><li>🗂️ <strong><code>zknote</code> (<code>zknote.py</code>)</strong>: Zettelkasten workflow with fleeting and literature notes, MOC building, note splitting, and orphan and weak-link detection.</li><li>🧹 <strong><code>merge-duplicate</code> (<code>merge_duplicate.py</code>)</strong>: Finds near-duplicate notes (Jaccard similarity), flags divisive topics instead of auto-merging, and can atomize large notes by heading.</li><li>🧭 <strong><code>unstuck-decide</code> (<code>unstuck_decide.py</code>)</strong>: Structured antidotes for roadblocks, plus pros/cons, 2x2 matrix, and weighted-criteria decision modes.</li><li>📝 <strong><code>auto-changelog</code> (<code>auto_changelog.py</code>)</strong>: Builds a Keep-a-Changelog file from conventional commits.</li><li>👋 <strong><code>onboarding</code> (<code>onboarding.py</code>)</strong>: Conversational setup of your profile, integrations, and PARA structure check.</li><li>✍️ <strong><code>prompt-quality</code> (<code>prompt_quality.py</code>)</strong>: Scores prompts 0-100 on clarity, specificity, actionability, structure, and completeness, with improvement tips.</li><li>🔁 <strong><code>self-improvement</code> (<code>self_improvement_agent.py</code>)</strong>: Routes grunt work to small models and orchestration to large ones, with a self-evaluation loop.</li><li>🔬 <strong><code>pm-skills</code> (<code>pm_skills_examination.py</code>)</strong> and <strong><code>sota-scan</code> (<code>sota_scan.py</code>)</strong>: Compare skill-pack repos, and benchmark this repo against comparators with a ranked gap list.</li><li>🤖 <strong>Specialized Subagents (<code>subagents.py</code>)</strong>: Decomposed roles (<code>researcher</code>, <code>graph-analyst</code>, <code>curator</code>, <code>ingestor</code>, <code>linker</code>, <code>reviewer</code>) that execute focused vault tasks without overloading context.</li></ul><p>Every skill defaults to <code>--dry-run</code> and only writes with <code>--apply</code>/<code>--save</code>, so you stay the approver here too.</p><hr><h2 id="Local-Semantic-Search-Intelligent-Analytics">Local Semantic Search &amp; Intelligent Analytics</h2><p>Unlike cloud-dependent memory tools, Hermes Brain emphasizes local privacy:</p><ul><li><strong>Local Vector Search (<code>semantic_search.py</code>)</strong>: Uses <code>sentence-transformers/all-MiniLM-L6-v2</code> (a lightweight 22MB CPU model) to build an incremental semantic index over your sessions and notes. It runs entirely offline with zero cloud API costs, accessible via CLI or an embedded HTTP endpoint powering natural-language queries directly in <code>Dashboard.md</code>.</li><li><strong>Automated Topic Tagging (<code>session_tagger.py</code>)</strong>: Extracts topics using lightweight pattern matching, creating global tag clouds and tracking 14-day topic trends.</li><li><strong>Predictive Skill Forecasting (<code>skill_forecast.py</code>)</strong>: Analyzes vault activity logs alongside your installed skill index to suggest what skills, tools, or workflows your agent should acquire next.</li></ul><hr><h2 id="Why-Not-Just-Use-a-Vector-DB-Memory-Service">Why Not Just Use a Vector-DB Memory Service?</h2><table><thead><tr><th>Feature</th><th style="text-align:center">Hermes Brain</th><th style="text-align:center">Raw Chat Logs</th><th style="text-align:center">Vector-DB Memory (e.g. Mem0)</th><th style="text-align:center">Generic Obsidian</th></tr></thead><tbody><tr><td><strong>Human review before “memory”</strong></td><td style="text-align:center">✅ Staged candidate review</td><td style="text-align:center">❌ Lost in logs</td><td style="text-align:center">❌ Auto-embedded, opaque</td><td style="text-align:center">N/A</td></tr><tr><td><strong>Readable without special tooling</strong></td><td style="text-align:center">✅ Pure Markdown</td><td style="text-align:center">✅ Unstructured</td><td style="text-align:center">❌ Requires vendor UI/API</td><td style="text-align:center">✅</td></tr><tr><td><strong>No vendor lock-in</strong></td><td style="text-align:center">✅ Pure Git repo</td><td style="text-align:center">✅</td><td style="text-align:center">❌ Proprietary</td><td style="text-align:center">✅</td></tr><tr><td><strong>Multi-harness agent skills</strong></td><td style="text-align:center">✅ 15+ built-in skills</td><td style="text-align:center">❌</td><td style="text-align:center">❌</td><td style="text-align:center">❌</td></tr><tr><td><strong>Offline semantic search</strong></td><td style="text-align:center">✅ 22MB local model</td><td style="text-align:center">❌</td><td style="text-align:center">Varies</td><td style="text-align:center">Optional plugin</td></tr><tr><td><strong>Out-of-the-box agent wiring</strong></td><td style="text-align:center">✅ MCP + Hermes cron</td><td style="text-align:center">N/A</td><td style="text-align:center">❌ Custom setup</td><td style="text-align:center">❌</td></tr></tbody></table><p>If you want completely hands-off semantic recall, a hosted vector database works. If you want to <strong>see, verify, and govern</strong> what your AI knows in files you control forever, Hermes Brain is built for you.</p><hr><h2 id="Installing-Verifying-in-Under-2-Minutes">Installing &amp; Verifying in Under 2 Minutes</h2><p>Pick whichever method fits your setup:</p><h3 id="Option-1-One-Line-Terminal-Install-Linux-macOS-WSL">Option 1: One-Line Terminal Install (Linux, macOS, WSL)</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl -fsSL https://raw.githubusercontent.com/mistrysiddh/hermes-brain-template/main/_System/Scripts/Installers/install.sh | bash</span><br></pre></td></tr></table></figure><p><em>(Windows PowerShell equivalent: <code>irm https://raw.githubusercontent.com/mistrysiddh/hermes-brain-template/main/_System/Scripts/Installers/install.ps1 | iex</code>)</em></p><h3 id="Option-2-Clone-Local-Setup">Option 2: Clone &amp; Local Setup</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/mistrysiddh/hermes-brain-template.git my-second-brain</span><br><span class="line"><span class="built_in">cd</span> my-second-brain</span><br><span class="line">./_System/Scripts/Installers/install.sh</span><br></pre></td></tr></table></figure><h3 id="Option-3-Instant-60-Second-Verification-No-Hermes-Needed">Option 3: Instant 60-Second Verification (No Hermes Needed)</h3><p>Verify the bundled machinery right after installation:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 1. Self-test the bundled MCP server</span></span><br><span class="line">python _System/Scripts/hermes_brain_mcp.py --<span class="built_in">test</span></span><br><span class="line"><span class="comment"># Output ends with: &quot;All hermes-brain-mcp self-tests PASSED&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 2. Check pending candidate memory facts (prints [] on fresh install)</span></span><br><span class="line">python _System/Scripts/promote_memory.py --list</span><br></pre></td></tr></table></figure><p>The installer also runs <code>verify_install</code> automatically, checking the folder structure, required plugins, MCP server, memory pipeline, and <code>User-Profile.md</code> integrity.</p><h3 id="Grow-Into-It-Opt-in-Feature-Packs">Grow Into It: Opt-in Feature Packs</h3><p><code>_System/Scripts/features/</code> lets you adopt the template gradually: <strong>beginner</strong> (archiving and memory promotion, the default), <strong>analyst</strong> (semantic search, tagging, dashboards), <strong>poweruser</strong> (forecasting, audit, drift checks), and <strong>experimental</strong>.</p><h3 id="Other-Ways-to-Try">Other Ways to Try</h3><ul><li><strong>One paste into Hermes (<code>INSTALL_PROMPT.md</code>)</strong>: Copy the master prompt directly into your Hermes chat to install the vault and schedule the hourly cron job automatically.</li><li><strong>Scratch Vault (<code>try.sh</code> / <code>try.ps1</code>)</strong>: Spins up a throwaway temporary vault so you can experiment without modifying your live environment.</li><li><strong>GitHub Codespaces</strong>: One-click zero-install browser environment using the GitHub Codespaces template badge.</li></ul><hr><h2 id="Privacy-Operational-Safety">Privacy &amp; Operational Safety</h2><ul><li><strong>Structure Only</strong>: The repository contains no private chat history, API keys, or personal data. A GitHub Action workflow (<code>personal-data-guard</code>) actively blocks accidental secrets.</li><li><strong>Git-Ignored Personal Paths</strong>: <code>Daily/</code>, <code>Memory-Review/</code>, <code>.smart-env/</code>, and plugin <code>data.json</code> files are excluded by default.</li><li><strong>Safe Template Updates</strong>: Running <code>update.sh</code> / <code>update.ps1</code> pulls the latest code, templates, and skills while strictly preserving your <code>User-Profile.md</code> and personal notes.</li><li><strong>Local Git Safety Net</strong>: <code>session_git_snapshot.py</code> auto-commits a local snapshot at session end (never pushes), and refuses to commit if it spots API keys or private keys. Wire it to <code>on_session_end</code> as a cheap undo button for bad multi-file agent edits.</li><li><strong>Template Drift Checker</strong>: <code>template_drift.py</code> compares your vault to the latest release by SHA256 and marks each file safe-to-update, customized, outdated, or missing.</li><li><strong>Process Concurrency Locking</strong>: The session archiver uses exclusive <code>.hourly_archive.lock</code> protection so background crons and on-demand <code>archive_now.py</code> runs never corrupt <code>manifest.jsonl</code>.</li></ul><hr><h2 id="Do-I-Need-Hermes-or-a-Local-LLM">Do I Need Hermes or a Local LLM?</h2><ul><li><strong>No local LLM required</strong>: The core vault, archiving engine, memory pipeline, and multi-harness skills run fast on pure Python. Only the optional trend-digest scripts use Ollama or <code>sentence-transformers</code>.</li><li><strong>No Hermes required for the vault</strong>: The PARA architecture, templates, Dataview queries, and Kanban boards work as a standalone Obsidian second brain. Hermes or OpenClaw is only needed when you want automated transcript feeds.</li></ul><hr><h2 id="Links-Community">Links &amp; Community</h2><ul><li>⭐ <strong>GitHub Repository</strong>: <a href="https://github.com/mistrysiddh/hermes-brain-template">github.com/mistrysiddh/hermes-brain-template</a></li><li>🌐 <strong>Interactive Showcase</strong>: <a href="https://mistrysiddh.github.io/hermes-brain-template/">mistrysiddh.github.io/hermes-brain-template</a></li><li>📺 <strong>Install Walkthrough</strong>: <a href="https://youtu.be/2cXrS1IWsSw">Watch on YouTube</a></li><li>💬 <strong>Discussions &amp; Ideas</strong>: <a href="https://github.com/mistrysiddh/hermes-brain-template/discussions">GitHub Discussions</a></li></ul><p>Give your agent a memory you can actually inspect, govern, and trust.</p>]]></content>
    
    
    <summary type="html">Hermes Brain is a free, MIT-licensed Obsidian vault template for Hermes and OpenClaw agents: automatic session archiving, multi-harness agent skills, local semantic search, secret scrubbing, and human-reviewed memory promotion.</summary>
    
    
    
    <category term="Self Hosting" scheme="https://mistrysiddh.com/categories/self-hosting/"/>
    
    <category term="AI" scheme="https://mistrysiddh.com/categories/self-hosting/ai/"/>
    
    
    <category term="automation" scheme="https://mistrysiddh.com/tags/automation/"/>
    
    <category term="AI" scheme="https://mistrysiddh.com/tags/AI/"/>
    
    <category term="Obsidian" scheme="https://mistrysiddh.com/tags/Obsidian/"/>
    
    <category term="Hermes" scheme="https://mistrysiddh.com/tags/Hermes/"/>
    
    <category term="OpenClaw" scheme="https://mistrysiddh.com/tags/OpenClaw/"/>
    
    <category term="self hosting" scheme="https://mistrysiddh.com/tags/self-hosting/"/>
    
    <category term="open source" scheme="https://mistrysiddh.com/tags/open-source/"/>
    
    <category term="privacy" scheme="https://mistrysiddh.com/tags/privacy/"/>
    
    <category term="agent skills" scheme="https://mistrysiddh.com/tags/agent-skills/"/>
    
  </entry>
  
  <entry>
    <title>I Built My Own Self-Hosted AI Assistant (No OpenAI Subscription Needed)</title>
    <link href="https://mistrysiddh.com/2026/09/06/Self-Hosted-AI-Assistant-OpenClaw-Hermes/"/>
    <id>https://mistrysiddh.com/2026/09/06/Self-Hosted-AI-Assistant-OpenClaw-Hermes/</id>
    <published>2026-09-06T14:15:00.000Z</published>
    <updated>2026-09-06T14:16:47.371Z</updated>
    
    <content type="html"><![CDATA[<p><img src="/images/posts/self-hosted-ai-openclaw-v2.jpg" alt="Self Hosted AI"></p><hr><h2 id="Why-I-Stopped-Renting-My-AI-and-Started-Hosting-It">Why I Stopped Renting My AI and Started Hosting It</h2><p>Every “AI assistant” you use today — ChatGPT, Gemini, whatever bot is trending this month — lives on someone else’s server, under someone else’s terms of service, with your conversations sitting on someone else’s disk. For a lot of casual use, that’s fine. But if you actually want an assistant that remembers things across sessions, can act on your behalf (send messages, run automations, manage your projects), and doesn’t quietly change behavior after a policy update — you want it running on hardware you control.</p><p>That’s exactly why I set up <strong>OpenClaw</strong> running on <strong>Hermes</strong> on my own Linux box. No monthly “Pro” tier, no rate limits I don’t control, no black box. Just a system I configured, that I can inspect, extend, and fully own.</p><p>This post walks through what that setup actually looks like, why I chose this stack, and what you need if you want to build something similar.</p><hr><h2 id="What-Is-Hermes">What Is Hermes?</h2><p>Hermes is the runtime — think of it as the engine that lets an AI agent actually <em>do things</em> instead of just replying with text in a chat window. It gives the assistant:</p><ul><li><strong>Tools</strong> — browser control, terminal access, file read/write, web search, code execution</li><li><strong>Memory</strong> — persistent facts and context that carry across sessions, not wiped every time you close the tab</li><li><strong>Skills</strong> — reusable, documented procedures for recurring tasks (deploying a server, managing a Discord community, editing a video, whatever you do often)</li><li><strong>Integrations</strong> — Telegram, Discord, cron jobs, and other delivery channels so the assistant can reach you outside of a chat window</li></ul><p>In short: Hermes turns a language model from “a thing you type questions into” into “an agent that lives on your infrastructure and does work.”</p><h2 id="What-Is-OpenClaw">What Is OpenClaw?</h2><p>OpenClaw is the framework/persona layer sitting on top of Hermes — it’s what gives the assistant a consistent identity, personality, and operating rules across every session, instead of starting from a blank slate every time you open a new chat. It’s the difference between talking to a stateless chatbot and working with something that actually remembers who you are and how you like things done.</p><hr><h2 id="The-Actual-Setup">The Actual Setup</h2><p>Here’s the practical side — what running this actually takes:</p><p><strong>Hardware</strong>: You don’t need a beast of a machine. My box runs on a modest 2-CPU, ~8GB RAM VPS. No GPU required, because the model inference itself happens via API calls to a hosted model (Claude, in my case) — the server just runs the <em>agent</em>, not the model weights. That’s an important distinction: self-hosting the <em>agent</em> is lightweight; self-hosting the <em>model</em> is a completely different (and much heavier) project.</p><p><strong>Core stack</strong>:</p><ul><li>Linux server (any modern distro works)</li><li>Hermes runtime installed and configured</li><li>API key for your model of choice (Anthropic, OpenAI, or a local model if you want to go fully offline)</li><li><code>.env</code> file holding your bot tokens (Telegram, Discord) — never committed to git</li><li>Cron jobs for scheduled tasks (briefings, monitoring, reports)</li></ul><p><strong>Integrations I run</strong>:</p><ul><li><strong>Telegram bot</strong> — direct messages and notifications land straight in my phone via the Bot API (<code>sendPhoto</code>, <code>sendMessage</code>), no polling needed</li><li><strong>Discord</strong> — full server management (channels, roles, onboarding, AutoMod) via raw REST calls using a bot token, tied to my YouTube community server</li><li><strong>Skills system</strong> — instead of re-explaining how I want something done every single time, I write it once as a skill file and the assistant loads it automatically when relevant</li></ul><h2 id="What-This-Actually-Buys-You">What This Actually Buys You</h2><ol><li><strong>Privacy</strong> — conversations, memory, and automations stay on infrastructure you control. No third party mining your chat history for training data.</li><li><strong>Persistence</strong> — memory survives across sessions. It doesn’t forget your preferences, your projects, or your running context every time you start a new conversation.</li><li><strong>Automation</strong> — cron-triggered briefings, monitoring, and notifications running independently of you being actively in a chat.</li><li><strong>No lock-in</strong> — swap the underlying model provider without rebuilding your entire workflow. The agent layer stays yours.</li><li><strong>Extensibility</strong> — every tool, skill, and integration is something you can read, edit, and fix yourself. When something breaks, you’re not waiting on a support ticket.</li></ol><hr><h2 id="Is-This-For-Everyone">Is This For Everyone?</h2><p>Honestly — no. If you just want quick answers to questions, a hosted chatbot is easier and requires zero setup. This approach makes sense if you:</p><ul><li>Automate things regularly (deployments, monitoring, content workflows)</li><li>Care about where your data lives</li><li>Like understanding and controlling your own tools instead of trusting a black box</li><li>Already run Linux servers and are comfortable in a terminal</li></ul><p>If that’s you, self-hosting your AI agent stack is one of the more satisfying things you can build right now — it’s the same shift we already made with self-hosted NAS systems, home automation, and Pi servers, just applied to AI.</p><hr><h2 id="What’s-Next">What’s Next</h2><p>I’ll be covering the deeper technical bits in follow-up posts and on the <a href="https://youtube.com/@mistrysiddh">YouTube channel</a> — setting up specific integrations, writing custom skills, and the security considerations that come with giving an AI agent terminal and browser access on your own machine (spoiler: sandboxing and permission boundaries matter a lot).</p><p>If you’re building something similar or have questions about the setup, drop them in the comments.</p>]]></content>
    
    
    <summary type="html">A practical walkthrough of building a self-hosted AI assistant using OpenClaw and Hermes — no cloud subscriptions, no vendor lock-in, full control over your data.</summary>
    
    
    
    <category term="Self Hosting" scheme="https://mistrysiddh.com/categories/self-hosting/"/>
    
    <category term="AI" scheme="https://mistrysiddh.com/categories/self-hosting/ai/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="automation" scheme="https://mistrysiddh.com/tags/automation/"/>
    
    <category term="AI" scheme="https://mistrysiddh.com/tags/AI/"/>
    
    <category term="self hosting" scheme="https://mistrysiddh.com/tags/self-hosting/"/>
    
    <category term="privacy" scheme="https://mistrysiddh.com/tags/privacy/"/>
    
    <category term="Claude Code" scheme="https://mistrysiddh.com/tags/Claude-Code/"/>
    
  </entry>
  
  <entry>
    <title>Cybersecurity Tips and Tricks</title>
    <link href="https://mistrysiddh.com/2025/01/13/Cybersecurity-tips-and-tricks/"/>
    <id>https://mistrysiddh.com/2025/01/13/Cybersecurity-tips-and-tricks/</id>
    <published>2025-01-13T03:33:44.000Z</published>
    <updated>2026-07-24T14:33:54.387Z</updated>
    
    <content type="html"><![CDATA[<p><img src="https://images.hdqwalls.com/wallpapers/mr-robot-season-3-rami-malek-w0.jpg" alt="Cybersecurity"></p><hr><h2 id="How-to-Protect-Yourself-from-Hackers-and-Online-Scams"><strong>How to Protect Yourself from Hackers and Online Scams</strong></h2><p><strong>Summary</strong><br>Cybersecurity is about keeping your online world safe from threats like hackers and scammers. Think of it as locking the doors to your digital life. Whether it’s protecting personal data, avoiding fraud, or using technology responsibly, staying secure online is essential in today’s fast-paced digital age. In this guide, we’ll explore simple yet effective steps you can take to safeguard yourself and your loved ones from cyber threats.</p><p>The internet has made our lives easier in so many ways. We shop online, manage our bank accounts, connect with friends, and even work remotely. But unfortunately, hackers and scammers are constantly looking for ways to take advantage of us.</p><p>The good news? You don’t have to be a tech expert to protect yourself online. With a few simple habits, you can significantly reduce your risk of falling victim to cybercrimes. Let’s break it down!</p><hr><h3 id="1-Use-Strong-Unique-Passwords"><strong>1. Use Strong, Unique Passwords</strong></h3><p><img src="https://media.wired.com/photos/641e1a1b43ffd37beea02cdf/4:3/w_4497,h_3373,c_limit/Best%20Password%20Managers%20Gear%20GettyImages-1408198405.png" alt="Strong Password"><br>Think of your password as the lock on your front door. A weak password is like leaving your door unlocked. Here’s how to make a strong one:</p><ul><li>Use at least 12 characters.</li><li>Mix letters (uppercase and lowercase), numbers, and symbols.</li><li>Don’t reuse passwords across different accounts.</li></ul><p>👉 <strong>Tip:</strong> Use a password manager app (like LastPass or Dashlane) to remember them for you.</p><hr><h3 id="2-Double-Check-Before-You-Click"><strong>2. Double-Check Before You Click</strong></h3><p><img src="https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/sites/45147/images/ypn2Dpe5RPS6CuDNuaIO_Think_before_you_click.jpg" alt="Double Checl"><br>Have you ever received an email or message asking you to click a link or download something? Scammers often use tricks like this to steal your information.</p><ul><li>If you don’t know the sender, don’t click!</li><li>Check for oddities in the email, like misspellings or unusual requests.</li></ul><p>👉 <strong>Tip:</strong> If an email claims to be from your bank or a company, visit their website directly instead of using the link in the email.</p><hr><h3 id="3-Keep-Everything-Updated"><strong>3. Keep Everything Updated</strong></h3><p><img src="https://cdn.appuals.com/wp-content/uploads/2020/08/intro-2.jpg" alt="Update"><br>Your devices and apps often release updates to fix security issues. If you skip these updates, hackers might find ways to break in.</p><ul><li>Turn on automatic updates for your phone, computer, and apps.</li><li>Update antivirus software regularly (it’s like a digital security guard).</li></ul><p>👉 <strong>Tip:</strong> If you see a notification about updates, don’t delay—do it right away!</p><hr><h3 id="4-Watch-What-You-Share-Online"><strong>4. Watch What You Share Online</strong></h3><p><img src="https://bpb-us-e1.wpmucdn.com/blogs.uoregon.edu/dist/2/2871/files/2013/08/shutterstock_58591429-22qa8k2.jpg" alt="Watch Online"><br>Social media is fun, but sharing too much can be risky. Hackers use personal details like your birthday, pet’s name, or school name to guess passwords or trick you.</p><ul><li>Avoid posting private information, like your address or travel plans.</li><li>Be cautious about what you share in public profiles.</li></ul><hr><h3 id="5-Use-Two-Step-Verification"><strong>5. Use Two-Step Verification</strong></h3><p><img src="https://businessresources.bitdefender.com/hubfs/Josue_MFA.jpg" alt="Two-Step Verification"><br>This is like adding a second lock to your door. Even if someone steals your password, they can’t get in without a second step, like a code sent to your phone.</p><ul><li>Look for “Two-Factor Authentication” or “2FA” in your account settings.</li></ul><p>👉 <strong>Tip:</strong> Use apps like Google Authenticator instead of relying on text messages for these codes.</p><hr><h3 id="6-Stay-Alert-to-Scams"><strong>6. Stay Alert to Scams</strong></h3><p><img src="https://benchmarkfcu.org/wp-content/uploads/2021/11/Scam-Alert_v2.jpg" alt="Scam Alert"><br>Scammers are smart, but you can outsmart them. Here’s what to watch for:</p><ul><li><strong>Fake calls or texts:</strong> If someone claims to be from your bank or a company and asks for sensitive information, hang up and call the company directly.</li><li><strong>Too-good-to-be-true offers:</strong> If it feels too good to be true, it probably is.</li></ul><hr><h3 id="7-Secure-Your-Wi-Fi-at-Home"><strong>7. Secure Your Wi-Fi at Home</strong></h3><p><img src="https://us.norton.com/content/dam/blogs/images/norton/am/evil-twin-attack-explained-anim.gif" alt="Wi-Fi Security"><br>Your Wi-Fi connects all your devices, so it’s important to keep it safe.</p><ul><li>Change the default password on your router to something only you know.</li><li>Use a strong Wi-Fi password, not something easy like “password123.”</li></ul><hr><h3 id="8-Check-Your-Bank-Statements"><strong>8. Check Your Bank Statements</strong></h3><p><img src="https://www.worldbank.org.ge/files/2020/05/future-of-banks.jpg" alt="Online Banking"><br>Hackers sometimes make small charges on your credit card to test if it works before taking more.</p><ul><li>Review your statements every month.</li><li>Set up alerts for unusual activity.</li></ul><p>👉 <strong>Tip:</strong> If you see a charge you don’t recognize, report it to your bank immediately.</p><hr><h3 id="9-Back-Up-Your-Data"><strong>9. Back Up Your Data</strong></h3><p><img src="https://www.lifewire.com/thmb/B3ek5KLwgHiMpi8HnT2KZrgnv28=/2120x1414/filters:fill(auto,1)/GettyImages-962574588-d07e325236e84e23971c5f6d5079775e.jpg" alt="Backup Data"><br>Imagine losing all your photos, documents, or contacts—terrifying, right? Backing up your data keeps it safe.</p><ul><li>Use an external hard drive or a cloud service like Google Drive or iCloud.</li><li>Back up important files regularly.</li></ul><hr><h3 id="10-Stay-Informed"><strong>10. Stay Informed</strong></h3><p><img src="https://g.foolcdn.com/editorial/images/538853/newspaper-headlined-breaking-news.jpg" alt="Stay informed"><br>Cybercriminals are always finding new tricks. By staying informed, you can stay ahead of them.</p><ul><li>Follow trusted websites or news sources about online safety.</li><li>Share tips with your friends and family to help them stay safe too.</li></ul><hr><h3 id="Final-Thoughts"><strong>Final Thoughts</strong></h3><p>Online security doesn’t have to be complicated. Small steps like using strong passwords, keeping your software updated, and being cautious about what you click can go a long way.</p><p>If something feels suspicious, trust your instincts. It’s better to be safe than sorry. By staying alert and following these tips, you can enjoy the benefits of the digital world without falling victim to hackers and frauds.</p><p>💡 <strong>Remember:</strong> Staying safe online is a habit. Start today and protect your future!</p><hr><p><strong>Share this post</strong> to help others stay safe online too!</p><h1>Donation</h1><p><a href="https://www.buymeacoffee.com/mistrysiddh" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a></p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;&lt;img src=&quot;https://images.hdqwalls.com/wallpapers/mr-robot-season-3-rami-malek-w0.jpg&quot; alt=&quot;Cybersecurity&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;How-to-Protec</summary>
      
    
    
    
    <category term="Cybersecurity" scheme="https://mistrysiddh.com/categories/cybersecurity/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="hacking" scheme="https://mistrysiddh.com/tags/hacking/"/>
    
    <category term="DDOS attack" scheme="https://mistrysiddh.com/tags/DDOS-attack/"/>
    
  </entry>
  
  <entry>
    <title>Cyber Security</title>
    <link href="https://mistrysiddh.com/2023/08/22/CyberSecurity/"/>
    <id>https://mistrysiddh.com/2023/08/22/CyberSecurity/</id>
    <published>2023-08-22T06:48:04.000Z</published>
    <updated>2026-07-24T14:33:54.387Z</updated>
    
    <content type="html"><![CDATA[<p><img src="https://c.wallhere.com/photos/96/13/Mr_Robot_Rami_Malek-1412613.jpg!d" alt="Cyber Security"></p><h1>Safeguarding Your Digital World: A Comprehensive Guide to Cybersecurity</h1><p>In our modern age, where digital technology reigns supreme, the need for cybersecurity has taken center stage. From individuals to corporations, the increasing frequency and sophistication of cyber threats make it crucial to bolster our digital defenses. This comprehensive guide aims to demystify the world of cybersecurity and provide you with practical steps to ensure your online safety.</p><h2 id="1-Understanding-Cybersecurity">1. Understanding Cybersecurity</h2><p><img src="https://g.foolcdn.com/editorial/images/610632/digital-cybersecurity-concept.jpg" alt="Understanding"><br>At its core, cybersecurity involves a range of strategies and measures aimed at shielding digital systems, networks, and data from unauthorized access, malicious attacks, and potential damage. It’s a multi-layered approach that thwarts threats like hacking, phishing, malware, and ransomware.</p><h2 id="2-Common-Cyber-Threats">2. Common Cyber Threats</h2><p><img src="https://cdn.technadu.com/wp-content/uploads/2020/02/hacker.jpg" alt="Threats"><br>Let’s familiarize ourselves with some prevalent cyber threats:</p><ul><li><strong>Phishing:</strong> Deceptive attempts to acquire sensitive information.</li><li><strong>Malware:</strong> Destructive software that can compromise, disrupt, or gain unauthorized access.</li><li><strong>Ransomware:</strong> Encrypts data and demands payment for its release.</li><li><strong>Data Breaches:</strong> Unauthorized access to sensitive information.</li><li><strong>Social Engineering:</strong> Manipulating individuals into revealing confidential data.</li></ul><h2 id="3-Essential-Cybersecurity-Practices">3. Essential Cybersecurity Practices</h2><p><img src="https://images2.alphacoders.com/227/227292.png" alt="Practices"><br>Here are some fundamental practices for robust cybersecurity:</p><ul><li><strong>Strong Passwords:</strong> Craft intricate passwords with a mix of characters, avoiding easily guessable information.</li><li><strong>Multi-Factor Authentication (MFA):</strong> Add an extra layer of security by requiring multiple verification steps.</li><li><strong>Regular Updates:</strong> Keep software and systems up to date to patch vulnerabilities.</li><li><strong>Firewalls and Antivirus:</strong> Install reliable firewalls and antivirus software to prevent breaches.</li><li><strong>Secure Wi-Fi:</strong> Use robust encryption, change router passwords, and avoid public Wi-Fi for sensitive tasks.</li><li><strong>Data Encryption:</strong> Safeguard sensitive data through encryption to prevent unauthorized access.</li><li><strong>Backup Data:</strong> Regularly back up crucial files to an external, secure location.</li></ul><h2 id="4-Cyber-Hygiene-for-Individuals">4. Cyber Hygiene for Individuals</h2><p><img src="https://ebs-integrator.com/wp-content/uploads/2021/06/CyberSecurityRoadmap-1024x566.png" alt="Individuals"><br>Practice good “cyber hygiene” with these individual-oriented steps:</p><ul><li><strong>Email Vigilance:</strong> Be cautious of unexpected emails, avoid clicking suspicious links, and verify sender identities.</li><li><strong>Social Media Awareness:</strong> Limit sharing personal information and adjust privacy settings.</li><li><strong>Safe Browsing:</strong> Verify URLs, stick to secure connections (HTTPS), and steer clear of untrusted websites.</li><li><strong>App Permissions:</strong> Review and restrict app permissions to only necessary functions.</li></ul><h2 id="5-Cybersecurity-for-Businesses">5. Cybersecurity for Businesses</h2><p><img src="https://2.bp.blogspot.com/-IADidIr6y4g/WNEiVNVeMDI/AAAAAAAAfu0/dAht1c9kr0Ecr2On5VZsk9bAGQKjqE5hACLcB/s1600/cybersecurity+domains+v2.0+henry+jiang+crop.jpg" alt="Businesses"><br>Businesses need specialized measures to protect their digital assets:</p><ul><li><strong>Employee Training:</strong> Regularly educate staff about cybersecurity threats and best practices.</li><li><strong>Network Security:</strong> Implement firewalls, intrusion detection systems, and stringent access controls.</li><li><strong>Data Management:</strong> Safeguard sensitive data with encryption and access controls.</li><li><strong>Incident Response Plan:</strong> Develop a clear strategy for addressing cyber incidents to minimize damage.</li><li><strong>Vendor Security:</strong> Assess third-party vendor security practices before sharing data.</li></ul><h2 id="6-Staying-Informed">6. Staying Informed</h2><p><img src="https://www.analyticsinsight.net/wp-content/uploads/2020/08/Cybersecurity.jpg" alt="Informed"><br>Stay updated on evolving cybersecurity trends through reliable sources, industry news, and security blogs.</p><h2 id="7-Seek-Professional-Help">7. Seek Professional Help</h2><p><img src="https://www.nuyew.academy/wp-content/uploads/2021/01/A-Day-in-the-Life-of-a-Cyber-Security-Specialist.jpeg" alt="Help"><br>For intricate cybersecurity needs, consider enlisting experts or consultants to assess, advise, and bolster your security measures.</p><p>In today’s interconnected world, cybersecurity is everyone’s responsibility. By adopting proactive measures, staying informed, and cultivating cautious digital habits, you can shield your digital presence and contribute to a safer online environment. Remember, the most powerful defense against cyber threats is knowledge and preparedness.</p><iframe width="100%" height="512" src="https://www.youtube-nocookie.com/embed/aP8yrkkLWlM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe><h1>Donation</h1><p><a href="https://www.buymeacoffee.com/mistrysiddh" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a></p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;&lt;img src=&quot;https://c.wallhere.com/photos/96/13/Mr_Robot_Rami_Malek-1412613.jpg!d&quot; alt=&quot;Cyber Security&quot;&gt;&lt;/p&gt;
&lt;h1&gt;Safeguarding Your Digital </summary>
      
    
    
    
    <category term="Cybersecurity" scheme="https://mistrysiddh.com/categories/cybersecurity/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="hacking" scheme="https://mistrysiddh.com/tags/hacking/"/>
    
    <category term="DDOS attack" scheme="https://mistrysiddh.com/tags/DDOS-attack/"/>
    
  </entry>
  
  <entry>
    <title>ROS on Raspberry PI 4</title>
    <link href="https://mistrysiddh.com/2022/10/17/ROS-on-RaspberryPI4/"/>
    <id>https://mistrysiddh.com/2022/10/17/ROS-on-RaspberryPI4/</id>
    <published>2022-10-17T01:36:04.000Z</published>
    <updated>2026-11-09T13:53:44.073Z</updated>
    
    <content type="html"><![CDATA[<p><img src="/images/posts/ros-raspberrypi.png" alt="ROS"></p><h1>Overview</h1><p>We will be install ROS on Raspberry PI 4 without Ubuntu. In this tutorial we we will be using docker insted of using ubuntu or any other software.</p><h1>Requirments</h1><ul><li>Laptop or Desktop</li><li>Stable internet connection(Mobile or Router no matter which connection is it)</li><li>Raspberry Pi with 4GB+ ram (mine is Raspberry Pi 4 B+ model with 8GB of ram)</li><li>MicroSD card with a minimum of 32GB size</li><li>Power supply (power bank or cell phone adaptor)</li><li>MicroB to HDMI with monitor(optional) if you’re going to use a monitor then you will be needing of keyboard</li><li>And most important thing a cup of <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a></li></ul><h1>Step 1 - Hardware setup</h1><p>Ok first of all we need some software which will help us to flash memory card so that we can install os in the memory card to boot in pi.</p><p><img src="/images/posts/raspberry-pi.png" alt="Raspberry pi software"></p><p>Go to <a href="https://www.raspberrypi.com/software/">https://www.raspberrypi.com/software/</a> and download software according to your OS I’m using Zorin OS which is based on Ubuntu so I will be using the terminal. If you are using terminal use the following command</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install rpi-imager</span><br></pre></td></tr></table></figure><p>as you can see in the below image I have already installed it on my device<br><img src="/images/posts/terminal-pi.png" alt="Terminal"></p><p>Go ahead and open it up after opening it up plugin your 8GB or higher sd card on your laptop. as you can see in the image I have inserted 8GB of card<br><img src="/images/posts/disk-pi.png" alt="Disk"></p><p>Now do the following steps as soon in the photo’s</p><p><img src="/images/posts/raspberrypi-software.png" alt="Disk"></p><p><img src="/images/posts/raspberrypi-software1.png" alt="Disk"><br>Select <strong>Raspberry Pi OS(other)</strong></p><p><img src="/images/posts/raspberrypi-software2.png" alt="Disk"><br>Then select <strong>Raspberry Pi OS with desktop</strong></p><p><img src="/images/posts/raspberrypi-software3.png" alt="Disk"></p><p>Now select your disk but before writing your os we will configure it first so that we don’t have to connect any kind of ethernet cable or mini Wi-Fi. Press <code>ALT + SHIFT + X</code> to open secret setting</p><p><img src="/images/posts/raspberrypi-software4.png" alt="Disk"><br><strong>Note:</strong> set your hostname and remember it we will be needing it later</p><p><img src="/images/posts/raspberrypi-software5.png" alt="Disk"><br>Click on Yes and let it complete it. After that, you will be granted this message so it means that it is been completed.</p><p><img src="/images/posts/raspberrypi-software6.png" alt="Disk"></p><h1>Step 2 - Booting UP</h1><p>Remove your memory card from the computer and plug that it into pi and power it on, well as the pi is doing some process grab a cup of <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a> and wait for a few minutes.</p><p><img src="https://gifimage.net/wp-content/uploads/2018/11/gif-a-few-moment-later.gif" alt="A few moments later"></p><p>Open up your terminal and enter the following command</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># as you remember I have told you to set your hostname in the software and remember it.</span></span><br><span class="line">ssh pi@hostname.local</span><br></pre></td></tr></table></figure><p>Replace your hostname with the hostname you have set while preparing the sd card. In my case, I have set my hostname with datacenter so my command will be like this</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh pi@datacenter.local</span><br></pre></td></tr></table></figure><p><img src="/images/posts/terminal-pi-login.png" alt="Pi Login"></p><p>as soon as you hit enter it will as you for a conformation like this</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">~ ➤ ssh pi@datacenter.local                                                   </span><br><span class="line">The authenticity of host &#x27;datacenter.local (192.168.32.200)&#x27; can&#x27;t be established.</span><br><span class="line">ECDSA key fingerprint is SHA256:VlnqrEfP5pLc62h2TQbN0Z4pEudRsmRQL4+LqDD6ZB8.</span><br><span class="line">Are you sure you want to continue connecting (yes/no/[fingerprint])?</span><br></pre></td></tr></table></figure><p>answer it with <strong>yes</strong> after that it will as you for a password which we have set during the software installation. As you have given the password right then you will see that you have been login into your account successfully like I did.</p><p><img src="/images/posts/pi-login.png" alt="Pi Login Successful"></p><p>Congratulation we have been login successfully into our pi take a break grab a cup of <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a> and relax.</p><h1>Step 3 - Software setup</h1><p>As we successfully login into pi first we will update the repository as well as we will be upgrading it by the following command don’t worry if you haven’t used Linux in your life this will be your first experience as well as it will be really easy just follow my steps.</p><h2 id="Update-and-Upgradation-of-packages">Update and Upgradation of packages</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> apt update</span><br><span class="line"><span class="built_in">sudo</span> apt upgrade -y</span><br><span class="line"><span class="built_in">sudo</span> apt full-upgrade -y</span><br></pre></td></tr></table></figure><p>The above command will update the repositories as well as it will be upgrading all the packages which are outdated so that we don’t get any kind of error while installing. It will take a few minutes after all the process is completed we will check once again if there is any software that is left to upgrade by the following command.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> apt update &amp;&amp; <span class="built_in">sudo</span> apt list --upgradable</span><br></pre></td></tr></table></figure><p>The following command will check whether any package is upgradable or not, if its all upgrade then it will return it with this message</p><p><img src="/images/posts/pi-updated.png" alt="Pi updated"></p><h2 id="Package-Installation">Package Installation</h2><p>Now we will install some few pre-required software so that we will use it properly. Follow me oh and don’t forget your cup of <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a> ;)</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> apt update</span><br><span class="line"><span class="built_in">sudo</span> apt install nano wget git curl htop -y</span><br><span class="line"><span class="built_in">sudo</span> init 6 <span class="comment"># this command will restart your Raspberry PI4</span></span><br></pre></td></tr></table></figure><h1>Step 4 - Getting docker</h1><p>There is a script which will help us to easily install docker on our PI without any command just a single command and then run it. Right simple as it says lets give it a run.</p><p>Download the following scipt</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl -fsSL https://get.docker.com -o get-docker.sh</span><br></pre></td></tr></table></figure><p>After downloading it script rut it with super user permission(root access)</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> bash get-docker.sh</span><br></pre></td></tr></table></figure><p>Grab your cup of <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a> and wait till the installtion is over</p><p>Once Docker is installed, add your login user to the docker group with the following command:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> usermod -aG docker $(<span class="built_in">whoami</span>)</span><br></pre></td></tr></table></figure><p>For our safty we will reboot out PI for external changes</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> init 6</span><br></pre></td></tr></table></figure><p>After rebooting just check docker verion by following command:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker version <span class="comment"># if the following command wont work then add sudo in front of it</span></span><br></pre></td></tr></table></figure><p>This is the following version which im running right now:</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">docker version</span><br><span class="line">Client: Docker Engine - Community</span><br><span class="line"> Version:           20.10.19</span><br><span class="line"> API version:       1.41</span><br><span class="line"> Go version:        go1.18.7</span><br><span class="line"> Git commit:        d85ef84</span><br><span class="line"> Built:             Thu Oct 13 16:45:42 2022</span><br><span class="line"> OS/Arch:           linux/arm64</span><br><span class="line"> Context:           default</span><br><span class="line"> Experimental:      true</span><br><span class="line"></span><br><span class="line">Server: Docker Engine - Community</span><br><span class="line"> Engine:</span><br><span class="line">  Version:          20.10.19</span><br><span class="line">  API version:      1.41 (minimum version 1.12)</span><br><span class="line">  Go version:       go1.18.7</span><br><span class="line">  Git commit:       c964641</span><br><span class="line">  Built:            Thu Oct 13 16:44:07 2022</span><br><span class="line">  OS/Arch:          linux/arm64</span><br><span class="line">  Experimental:     false</span><br><span class="line"> containerd:</span><br><span class="line">  Version:          1.6.8</span><br><span class="line">  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6</span><br><span class="line"> runc:</span><br><span class="line">  Version:          1.1.4</span><br><span class="line">  GitCommit:        v1.1.4-0-g5fd4c4d</span><br><span class="line"> docker-init:</span><br><span class="line">  Version:          0.19.0</span><br><span class="line">  GitCommit:        de40ad0</span><br></pre></td></tr></table></figure><h1>Step 5 - Installing Docker composer</h1><p>Docker Compose is a tool for automating Docker projects using a YAML file. With the help of thi file you can create many project from scratch as I did.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> apt install python3-pip -y</span><br></pre></td></tr></table></figure><p><code>PIP</code> is a tool which will help us to install docker composer. If it already install then we will move on to the next step</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> pip3 install docker-compose</span><br></pre></td></tr></table></figure><p>After installing docker composer we will check wheather it is installed properly or not</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">docker-compose version</span><br><span class="line">docker-compose version 1.29.2, build unknown</span><br><span class="line">docker-py version: &lt;module &#x27;docker.version&#x27; from &#x27;/usr/local/lib/python3.10/dist-packages/docker/version.py&#x27;&gt;</span><br><span class="line">CPython version: 3.10.7</span><br><span class="line">OpenSSL version: OpenSSL 3.0.5 5 Jul 2022</span><br></pre></td></tr></table></figure><h1>Step 6 - Installation of ROS (semi-final step)</h1><p>Before going further we will just give it a reboot so that we make sure that everything is working propely</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> init 6</span><br></pre></td></tr></table></figure><p>As we have rebooted our system we will now search for our docker repository by using docker search command</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">docker search siddhmistry</span><br><span class="line">NAME                   DESCRIPTION              STARS     OFFICIAL   AUTOMATED</span><br><span class="line">siddhmistry/mrfoxie                             0                    </span><br><span class="line">siddhmistry/ros_rpi4   ROS <span class="keyword">for</span> Raspberry PI 4   0  </span><br></pre></td></tr></table></figure><p>We need to install second one which is second one <code>siddhmistry/ros_rpi4</code> follow the following steps</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">xhost +</span><br><span class="line">docker pull siddhmistry/ros_rpi4:armhf</span><br><span class="line">docker container run -it --name ROS_RPI4 --net=host -e DISPLAY siddhmistry/ros_rpi4:armhf</span><br></pre></td></tr></table></figure><p>Now it will take come time so have a <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a> break</p><h1>Step 7 - Final step</h1><p>As by now you have noticed that a terminator has been popped up run the following command so that we can setup our ROS System</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">source</span> /opt/ros/noetic/setup.bash</span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;source /opt/ros/noetic/setup.bash&quot;</span> &gt;&gt; ~/.bashrc</span><br><span class="line"><span class="built_in">source</span> ~/.bashrc</span><br></pre></td></tr></table></figure><p>As we have completed all the steps try to run <code>roscore</code> if this commands works then you have successfully installed it. Press <code>Ctrl + C</code> to exit roscore after that type <code>exit</code> to exit it. Now that we have done everything we just need to install just a small thing which is called Portainer which will help to run this container easily</p><h1>Step 8 - Installing Portainer</h1><p>As we know we have already install docker so we will start installing Portainer so just follow the steps</p><p>First, create the volume that Portainer Server will use to store its database:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker volume create portainer_data</span><br></pre></td></tr></table></figure><p>Then, download and install the Portainer Server container:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest</span><br></pre></td></tr></table></figure><p>Portainer Server has now been installed. You can check to see whether the Portainer Server container has started by running <code>docker ps</code>:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">docker ps</span><br><span class="line">CONTAINER ID   IMAGE                          COMMAND                  CREATED       STATUS      PORTS                                                                                  NAMES             </span><br><span class="line">de5b28eb2fa9   portainer/portainer-ee:latest  <span class="string">&quot;/portainer&quot;</span>             2 weeks ago   Up 9 days   0.0.0.0:8000-&gt;8000/tcp, :::8000-&gt;8000/tcp, 0.0.0.0:9443-&gt;9443/tcp, :::9443-&gt;9443/tcp   portainer</span><br></pre></td></tr></table></figure><p>Now that the installation is complete, you can log into your Portainer Server instance by opening a web browser and going to: <a href="https://localhost:9443">portainer</a></p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">https://localhost:9443</span><br></pre></td></tr></table></figure><p>When you open the url you will be asked to steup admin username and password after login into the admin panel it looks like this</p><p><img src="/images/posts/portainer-admin-panel.png" alt="Portainer"></p><p>Here you will see a local enviroment click on it and this page will open it up:</p><p><img src="/images/posts/portainer-admin-panel-env.png" alt="Portainer Enviroment"></p><p>At the left side panel you will able to see <code>Containers</code> option. When you open that page it will grant you with some containers.</p><p><img src="/images/posts/portainer-admin-panel-containers.png" alt="Portainer Enviroment"></p><p>You will see that there is a container name <code>ROS_PI4</code> select it and press start anf baam it started working. Portainer is a tool where it will help you control your container and also to add more containers in it. I hope you loved it.</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;&lt;img src=&quot;/images/posts/ros-raspberrypi.png&quot; alt=&quot;ROS&quot;&gt;&lt;/p&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;We will be install ROS on Raspberry PI 4 without Ubuntu.</summary>
      
    
    
    
    <category term="Raspberry Pi" scheme="https://mistrysiddh.com/categories/raspberry-pi/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="industrial automation" scheme="https://mistrysiddh.com/tags/industrial-automation/"/>
    
    <category term="new site" scheme="https://mistrysiddh.com/tags/new-site/"/>
    
  </entry>
  
  <entry>
    <title>Raspberry Pi NAS System</title>
    <link href="https://mistrysiddh.com/2022/02/11/Raspberry-pi-NAS-System/"/>
    <id>https://mistrysiddh.com/2022/02/11/Raspberry-pi-NAS-System/</id>
    <published>2022-02-11T08:47:46.000Z</published>
    <updated>2026-11-09T13:53:27.620Z</updated>
    
    <content type="html"><![CDATA[<p><img src="https://i.ytimg.com/vi/Jc4Y2jA4Yeg/maxresdefault.jpg" alt="PI NAS"></p><h2 id="Overview">Overview</h2><p>We will be seeing a fully functional NAS server on Raspberry Pi(all pi version) homemade with simple few lines of command and with one software require before we start we will be requiring a few things before we start.</p><h2 id="Requirments">Requirments</h2><ul><li>Laptop or Desktop</li><li>Stable internet connection(Mobile or Router no matter which connection is it)</li><li>Raspberry Pi with 4GB+ ram (mine is Raspberry Pi 4 B+ model with 8GB of ram)</li><li>MicroSD card with a minimum of 8GB size</li><li>Power supply (power bank or cell phone adaptor)</li><li>MicroB to HDMI with monitor(optional) if you’re going to use a monitor then you will be needing of keyboard</li><li>And most important thing a cup of <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a></li></ul><h2 id="Step-1-Hardware-setup">Step 1 Hardware setup</h2><p>Ok first of all we need some software which will help us to flash memory card so that we can install os in the memory card to boot in pi.</p><p><img src="/images/posts/raspberry-pi.png" alt="Raspberry pi software"></p><p>Go to <a href="https://www.raspberrypi.com/software/">https://www.raspberrypi.com/software/</a> and download software according to your OS I’m using Zorin OS which is based on Ubuntu so I will be using the terminal. If you are using terminal use the following command</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install rpi-imager</span><br></pre></td></tr></table></figure><p>as you can see in the below image I have already installed it on my device<br><img src="/images/posts/terminal-pi.png" alt="Terminal"></p><p>Go ahead and open it up after opening it up plugin your 8GB or higher sd card on your laptop. as you can see in the image I have inserted 8GB of card<br><img src="/images/posts/disk-pi.png" alt="Disk"></p><p>Now do the following steps as soon in the photo’s</p><p><img src="/images/posts/raspberrypi-software.png" alt="Disk"></p><p><img src="/images/posts/raspberrypi-software1.png" alt="Disk"><br>Select <strong>Raspberry Pi OS(other)</strong></p><p><img src="/images/posts/raspberrypi-software2.png" alt="Disk"><br>Then select <strong>Raspberry Pi OS Lite (Legacy)</strong></p><p><img src="/images/posts/raspberrypi-software3.png" alt="Disk"></p><p>Now select your disk but before writing your os we will configure it first so that we don’t have to connect any kind of ethernet cable or mini Wi-Fi. Press <code>ALT + SHIFT + X</code> to open secret setting</p><p><img src="/images/posts/raspberrypi-software4.png" alt="Disk"><br><strong>Note:</strong> set your hostname and remember it we will be needing it later</p><p><img src="/images/posts/raspberrypi-software5.png" alt="Disk"><br>Click on Yes and let it complete it. After that, you will be granted this message so it means that it is been completed.</p><p><img src="/images/posts/raspberrypi-software6.png" alt="Disk"></p><h1>Step 2</h1><p>After that plug, it into pi and power it on, well as the pi is doing some process grab a cup of <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a> and wait for a few minutes.</p><p><img src="https://gifimage.net/wp-content/uploads/2018/11/gif-a-few-moment-later.gif" alt="A few moments later"></p><p>Open up your terminal and enter the following command</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"># as you remember I have told you to set your hostname in the software and remember it.</span><br><span class="line">ssh pi@hostname.local</span><br></pre></td></tr></table></figure><p>Replace your hostname with the hostname you have set while preparing the sd card. In my case, I have set my hostname with datacenter so my command will be like this</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh pi@datacenter.local</span><br></pre></td></tr></table></figure><p><img src="/images/posts/terminal-pi-login.png" alt="Pi Login"></p><p>as soon as you hit enter it will as you for a conformation like this</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">~ ➤ ssh pi@datacenter.local                                                   </span><br><span class="line">The authenticity of host &#x27;datacenter.local (192.168.32.200)&#x27; can&#x27;t be established.</span><br><span class="line">ECDSA key fingerprint is SHA256:VlnqrEfP5pLc62h2TQbN0Z4pEudRsmRQL4+LqDD6ZB8.</span><br><span class="line">Are you sure you want to continue connecting (yes/no/[fingerprint])?</span><br></pre></td></tr></table></figure><p>answer it with <strong>yes</strong> after that it will as you for a password which we have set during the software installation. As you have given the password right then you will see that you have been login into your account successfully like I did.</p><p><img src="/images/posts/pi-login.png" alt="Pi Login Successful"></p><p>Congratulation we have been login successfully into our pi take a break grab a cup of <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a> and relax.</p><h2 id="Step-2-Software-setup">Step 2 Software setup</h2><p>As we successfully login into pi first we will update the repository as well as we will be upgrading it by the following command don’t worry if you haven’t used Linux in your life this will be your first experience as well as it will be really easy just follow my steps.</p><h3 id="Update-and-Upgradation-of-packages">Update and Upgradation of packages</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sudo apt update</span><br><span class="line">sudo apt upgrade -y</span><br><span class="line">sudo apt full-upgrade -y</span><br></pre></td></tr></table></figure><p>The above command will update the repositories as well as it will be upgrading all the packages which are outdated so that we don’t get any kind of error while installing our NAS software. It will take a few minutes after all the process is completed we will check once again if there is any software that is left to upgrade by the following command.</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt update &amp;&amp; sudo apt list --upgradable</span><br></pre></td></tr></table></figure><p>The following command will check whether any package is upgradable or not, if its all upgrade then it will return it with this message</p><p><img src="/images/posts/pi-updated.png" alt="Pi updated"></p><h3 id="Packages-installation">Packages installation</h3><p>Now we will be requirement few software for NAS to install without any error follow me</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install wget htop -y</span><br></pre></td></tr></table></figure><p>These packages are preinstalled but in some cases, these packages are not been installed so we will be making sure that it’s installed.</p><h3 id="Script-installation">Script installation</h3><p>This script will not affect your network connection but if it did then I will leave a tutorial at the end of installation (<a href="#wi-fi-setup">Wi-Fi setup</a>). Clear your terminal by using the <code>clear</code> command it will clear your terminal so that you can see it easily. Now past this script into the terminal so that installation start’s</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">wget https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install</span><br><span class="line">chmod +x install</span><br><span class="line">sudo ./install -n</span><br></pre></td></tr></table></figure><p>Sit back and relax until the process is been done till that time go ahead and give me a cup of <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a> so that I can bring up various kinds of this topic so that you can enjoy it</p><p><img src="/images/posts/nas-installation-complete.png" alt="Install complate"><br>Congratulation it’s been installed completed for our protection we will reboot our system with the following command <code>sudo reboot</code>.</p><h2 id="Step-3-NAS-setup-on-browser">Step 3 NAS setup on browser</h2><p>As in <a href="#step-2-software-setup">Step 2 Software setup</a> we have installed once again we will be login into ssh account to check the IP address of our Pi use the following command to check the IP address</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hostname -I</span><br></pre></td></tr></table></figure><p><img src="/images/posts/hostname.png" alt="Finding IP address"><br>After finding your IP address use that IP address and open it in the browser with <code>https://your_ip_address</code> and it will grant you this page</p><p><img src="/images/posts/openmediavault.png" alt="OpenMediaVault"><br>Now now don’t be frightened of the login page because you don’t know the password and username well of course I also don’t know. Just joking type the following and it will let you in</p><figure class="highlight txt"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">username: admin</span><br><span class="line">password: openmediavault</span><br></pre></td></tr></table></figure><p>Congratulation you have successfully login, now before doing anything we will go ahead and change the password you will grant with this screen</p><p><img src="/images/posts/omv-admin.png" alt="Admin Panel"></p><h3 id="Changing-admin-panel-password">Changing admin panel password</h3><p>Go to <strong>System</strong> &gt;&gt; <strong>General Settings</strong> &gt;&gt; Click on <strong>Web Administrator Password</strong> then enter your new password after doing that we will plug in any kind of hard drive or some sort of memory storing device<br><img src="/images/posts/omv-password-change.png" alt="Password Change"></p><h3 id="Storage-setup">Storage setup</h3><p>As we have inserted external storage head over to <strong>Storage</strong> &gt;&gt; <strong>Disk</strong> and there you will be able to see your storage mounted on pi in my case I have inserted 128GB of memory card for the testing purpose also I have a few files copied into it</p><p><img src="/images/posts/omv-disk.png" alt="Disk"></p><p>Select the disk and then click on Wipe</p><p><img src="/images/posts/omv-disk-wipe.png" alt="Disk Wipe"></p><p>![Disk Wipe]</p><p>As we have confirmed that our storage is been mounted on our pi now we will make a shared folder so that we can access it from any device.</p><p><img src="/images/posts/omv-storage-delete.png" alt="Storage Delete"></p><p>Now select the quick option</p><p><img src="/images/posts/omv-storage-delete-1.png" alt="Storage Delete"></p><h3 id="File-System-setup">File System setup</h3><p>After wiping the data from the drive click on <code>File System</code> in the <code>Storage</code> section. Click on Add button and select <code>Device</code> and select the device and give it a label of your choice I will be giving it the name DataCenter, and make sure that you select <code>EXT4</code> in <code>File System</code>.</p><p><img src="/images/posts/omv-adding-device.png" alt="Adding Device"></p><p>After hitting Yes to add device take a cup of <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a> and wait for it</p><p><img src="/images/posts/omv-adding-device-complete.png" alt="Adding Device Complete"></p><p>Select your device and click on the mount option to mount your device. A pop-up has been visible on the top just hit on the <code>Apply</code> button to apply changes so that to make sure that what are we going to make changes will work properly. It will take a few minutes to complete the process.</p><h3 id="Sharing-Folder-setup">Sharing Folder setup</h3><p><img src="/images/posts/omv-folder-setup.png" alt="Folder Sharing"><br>Now we will head to <code>Sharing Folder Setup</code> to set up our sharing folder. Go to <code>Access Rights Management</code> &gt; <code>Shared Folders</code>  when you will go there you will find it empty because we haven’t set up any sharing folder go ahead and hit that <code>Add</code> button without any thoughts.<br><img src="/images/posts/omv-folder-setup-1.png" alt="Folder Sharing Setup"></p><p>Fill in all the details according to your need and make sure to leave <code>Permission</code> as it is until and unless you know the purpose of it. I will be labeling it as DataCenter if you want to comment on that device then you can otherwise Save it, again you will see Apply button on the top right side of the screen as shown in the image below it will take a while to apply the changes.</p><p><img src="/images/posts/omv-folder-setup-2.png" alt="Folder Sharing Setup"></p><p>We will permit it so that we can <code>Read/Write</code> files into it. Select your newly created folder and click <code>Privileges</code> and give <code>Read/Write</code> to both pi users. Hit save and apply.</p><h3 id="Services-Setup">Services Setup</h3><p>Go to the <strong>Services</strong> section and select <code>SMB/CIFS</code> as soon as you select it you will be granted a screen with soo many scary options but don’t worry we will be using only 2 options only. So go ahead and click sharing in the <code>SMB/CIFS</code> section.</p><p><img src="/images/posts/omv-service-smb-page.png" alt="Samba Service"></p><p><img src="/images/posts/omv-services-smb-share.png" alt="Samba Service"></p><p>Go ahead click on the <code>Add</code> button select your shared folder which you have been created. Hit save and apply don’t change any other kind of options if your expert then only does it or else let it be as it is. Go back to the <code>SMB/CIFS</code> setting page and enable it. Hit save and apply. Take a cup of <a href="https://www.buymeacoffee.com/mistrysiddh">coffee</a> and relax for a bit because we are coming to the most intrusting part which is accessing it from our devices.</p><h2 id="Accessing-our-NAS">Accessing our NAS</h2><iframe width="560" height="315" src="https://www.youtube.com/embed/gwM9RaemCvE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>Before we move on `Windows User` please see the above video to enable `SMB`, as I'm on Ubuntu I can directly access it<p><img src="/images/posts/omv-nas-folder.png" alt="NAS Test"><br><img src="/images/posts/omv-nas-auth.png" alt="NAS Test"><br>If you try to access it, it will as you for authentication so use your pi account and password which you used while setting up os if it fails then go to <code>Access Rights Management</code> &gt; <code>User</code>, select pi user, and edit it after that add your new password and save it. go back to the folder and try to login back and you will be successfully logged in to NAS Folder</p><p><img src="/images/posts/omv-nas-folder-access.png" alt="NAS Folder Access"></p><h2 id="Wi-Fi-Setup">Wi-Fi Setup</h2><p>If you’re going to use Wi-Fi then connect to a monitor and attach a keyboard then simply type the following command in the terminal to access the raspberry pi configuration setup</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo raspi-config</span><br><span class="line"># it will represent you with the screen bellow</span><br></pre></td></tr></table></figure><p><img src="/images/posts/raspberrypi-wifi-setup.png" alt="Wifi Setup"></p><p>Select <code>System Options</code> &gt; <code>Wireless LAN</code> &gt; Enter your Wi-Fi Name &gt; Enter your Wi-Fi password<br><img src="/images/posts/raspberrypi-wifi-setup-1.png" alt="Wifi Setup"><br><img src="/images/posts/raspberrypi-wifi-setup-2.png" alt="Wifi Setup"><br><img src="/images/posts/raspberrypi-wifi-setup-3.png" alt="Wifi Setup"></p><p>After completing all the above steps reboot your system with <code>sudo reboot</code> and bam done.</p>]]></content>
    
    
    <summary type="html">Use your Raspberry Pi as NAS server at home or on a drive wherever you go. Simple steps to install and easy to set up everything</summary>
    
    
    
    <category term="Raspberry Pi" scheme="https://mistrysiddh.com/categories/raspberry-pi/"/>
    
    <category term="Self Hosting" scheme="https://mistrysiddh.com/categories/raspberry-pi/self-hosting/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="industrial automation" scheme="https://mistrysiddh.com/tags/industrial-automation/"/>
    
    <category term="new site" scheme="https://mistrysiddh.com/tags/new-site/"/>
    
  </entry>
  
  <entry>
    <title>Uninstall Edge</title>
    <link href="https://mistrysiddh.com/2021/08/20/Uninstall_Edge/"/>
    <id>https://mistrysiddh.com/2021/08/20/Uninstall_Edge/</id>
    <published>2021-08-20T05:04:48.000Z</published>
    <updated>2026-11-09T13:53:27.608Z</updated>
    
    <content type="html"><![CDATA[<h2 id="The-Problem">The Problem</h2><p>Microsoft Edge has taken over PDF viewer, and other default web tasks. Even when manually removing it will reinstall via windows updates.</p><h2 id="Removing-the-Base-Install">Removing the Base Install</h2><p>We first need to find the Edge install of the chromium edition in your Program Files.</p><p>Location:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">C:\Program Files (x86)\Microsoft\Edge\Application\</span><br></pre></td></tr></table></figure><p>The setup program is what we need to uninstall edge. Go to the location above and drill down from the number and Install folder</p><p>Example:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">C:\Program Files (x86)\Microsoft\Edge\Application\92.0.902.62\Installer</span><br></pre></td></tr></table></figure><p>Once you find your path you can now uninstall edge with the following command <em>(Note: YOURS WILL BE DIFFERENT!)</em></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">C:\Program Files (x86)\Microsoft\Edge\Application\92.0.902.62\Installer\setup.exe --uninstall --system-level --verbose-logging --force-uninstall</span><br></pre></td></tr></table></figure><h2 id="Keep-it-from-coming-back…-for-now">Keep it from coming back… for now</h2><p>You now need to add a registry entry. The following location <code>Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EdgeUpdate</code> needs to be added with a DWORD called <code>DoNotUpdateToEdgeWithChromium</code> with a value of <code>1</code>.</p><p>You can do this with a simply reg file. (<code>stopedge.reg</code>)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">Windows Registry Editor Version 5.00</span><br><span class="line"></span><br><span class="line">[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EdgeUpdate]</span><br><span class="line">&quot;DoNotUpdateToEdgeWithChromium&quot;=dword:00000001</span><br></pre></td></tr></table></figure><p>Create this file or download the file @ <a href="https://www.mistrysiddh.tk/files/stopedge.zip">https://www.mistrysiddh.tk/files/stopedge.zip</a></p><p>Run this to prevent edge reinstallation. <em>Note: Microsoft will kill this workaround in the future and force edge on you</em></p>]]></content>
    
    
    <summary type="html">This goes over Removing Microsoft Edge Chromium edition and keeping it removed.</summary>
    
    
    
    <category term="Windows" scheme="https://mistrysiddh.com/categories/Windows/"/>
    
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="windows 1" scheme="https://mistrysiddh.com/tags/windows-1/"/>
    
  </entry>
  
  <entry>
    <title>Guiscrcpy</title>
    <link href="https://mistrysiddh.com/2021/07/20/GUIScrcpy/"/>
    <id>https://mistrysiddh.com/2021/07/20/GUIScrcpy/</id>
    <published>2021-07-20T08:52:15.000Z</published>
    <updated>2026-11-09T13:53:27.645Z</updated>
    
    <content type="html"><![CDATA[<p><img src="https://raw.githubusercontent.com/srevinsaju/guiscrcpy-docs/master/docs/screen3.png" alt="GUIScrcpy"></p><h2 id="Requirement">Requirement</h2><ol><li>Android Phone</li><li>Data cable</li><li>Scrcpy - <a href="https://github.com/Genymobile/scrcpy">https://github.com/Genymobile/scrcpy</a></li><li>Guiscrcpy - <a href="https://github.com/srevinsaju/guiscrcpy">https://github.com/srevinsaju/guiscrcpy</a></li></ol><h3 id="Enabling-Usb-debugging">Enabling Usb debugging</h3><p>First of all, you need to know the Android version of your phones. You can find it on your phone information section. Try to tap <strong>Settings</strong> &gt; <strong>About Device</strong> &gt; <strong>Software information</strong> (or <strong>System</strong> in some Android version) &gt; <strong>Android version</strong> and then you can know which Android version your phone have on.</p><p><img src="https://www.isunshare.com/images/article/android/enable-usb-debugging/find-android-version-in-smartphone.png" alt=" find Android version in your phone"></p><p>Now connect your phone with your desktop.</p><h2 id="Guiscrcpy-Scrcpy-installation">Guiscrcpy &amp; Scrcpy installation</h2><p>Goto <a href="https://github.com/srevinsaju/guiscrcpy/releases/tag/continuous">Guiscrcpy release</a> and scrcpy files and place it in one folder like this</p><p><img src="/images/posts/m8KuMHCCeA.png" alt="Guiscrcpy &amp; scrcpy"></p><p>Extract all the file of scrcpy*.zip into a folder after doing that open Guiscrcpy. It will ask you to locate <code>scrcpy.exe</code> no go into the extraced folder and select <code>scrcpy.exe</code></p><p><img src="/images/posts/e2GmICGlGd.png" alt="Select scrcpy.exe"></p><p><img src="/images/posts/cjqDYpptso.png" alt="Select scrcpy.exe"></p><p>!<img src="/images/posts/moSrWxBbhA.png" alt="Guiscrcpy"></p><p>After doing that connect your phone to your device and <code>Start Scrcpy</code></p><p><img src="/images/posts/AFjGGRSe3F.png" alt="Screencasting phone"></p><p><strong>Congratulations</strong> now you can cast you screen on your laptop or Desktop.</p><h2 id="Watch-Netflix-Movie-on-larger-screen-with-mobile-plan-Top-Secret">Watch Netflix Movie on larger screen with mobile plan (Top Secret)</h2><video width="100%" height="250" controls>    <source src="/videos/Screencast_Netflix.mkv"></video><p>Use this method to trick your friends. Enjoy</p>]]></content>
    
    
    <summary type="html">Screen cast your phone and record high quality games on your laptop or desktop</summary>
    
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/categories/linux/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="ubuntu" scheme="https://mistrysiddh.com/tags/ubuntu/"/>
    
    <category term="windows 11" scheme="https://mistrysiddh.com/tags/windows-11/"/>
    
    <category term="pubg" scheme="https://mistrysiddh.com/tags/pubg/"/>
    
    <category term="gaming" scheme="https://mistrysiddh.com/tags/gaming/"/>
    
  </entry>
  
  <entry>
    <title>Creating a Website on Raspberry Pi at home</title>
    <link href="https://mistrysiddh.com/2021/07/18/Pi-Site/"/>
    <id>https://mistrysiddh.com/2021/07/18/Pi-Site/</id>
    <published>2021-07-18T16:54:13.000Z</published>
    <updated>2026-11-09T13:53:27.593Z</updated>
    
    <content type="html"><![CDATA[<p><img src="https://i.ytimg.com/vi/QdHvS0D1zAI/maxresdefault.jpg" alt="Rasberry PI 4"></p><h2 id="Overview">Overview</h2><p>This is perfect for setting up your first website and learning not only administering a wordpress site, but learning Linux. You will need a Raspberry Pi, a couple hours, and a computer to download the image on. The Raspberry Pi (RPI) is a perfect device for learning these things.</p><p>Also check out the official projects site from RaspberryPi<br>Source: <a href="https://projects.raspberrypi.org/en/projects/lamp-web-server-with-wordpress">https://projects.raspberrypi.org/en/projects/lamp-web-server-with-wordpress</a></p><h2 id="Downloading-the-RPI-Imager">Downloading the RPI Imager</h2><p>Download the Imager for your operating system. This supports all three OS’s (Windows, Mac, and Linux).</p><p><a href="https://www.raspberrypi.org/downloads/">https://www.raspberrypi.org/downloads/</a></p><ul><li>Run and Install the Imager</li><li>Select Raspberry Pi OS (other) -&gt; Raspberry Pi OS Lite (32-bit)<ul><li>Note: This is the one with NO Desktop Environment</li></ul></li><li>Insert the SD Card into your Computer</li><li>Click Write</li></ul><h2 id="Install-Dependencies">Install Dependencies</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install apache2 php mariadb-server php-mysql -y</span><br><span class="line">sudo service apache2 restart</span><br></pre></td></tr></table></figure><h2 id="Install-Wordpress">Install Wordpress</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">cd /var/www/html/</span><br><span class="line">sudo rm *</span><br><span class="line">sudo wget http://wordpress.org/latest.tar.gz</span><br><span class="line">sudo tar xzf latest.tar.gz</span><br><span class="line">sudo mv wordpress/* .</span><br><span class="line">sudo rm -rf wordpress latest.tar.gz</span><br><span class="line">sudo chown -R www-data: .</span><br></pre></td></tr></table></figure><h2 id="Setup-WordPress-Database">Setup WordPress Database</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo mysql_secure_installation</span><br></pre></td></tr></table></figure><ul><li>You will be asked Enter current password for root (enter for none): — press Enter.</li><li>Type in Y and press Enter to Set root password?.</li><li>Type in a password at the New password: prompt, and press Enter. Important: remember this root password, as you will need it later to set up WordPress.</li><li>Type in Y to Remove anonymous users.</li><li>Type in Y to Disallow root login remotely.</li><li>Type in Y to Remove test database and access to it.</li><li>Type in Y to Reload privilege tables now.</li></ul><p><em>When complete, you will see the message All done! and Thanks for using MariaDB!.</em></p><p>Login to MySQL with <code>sudo mysql -uroot -p</code> and enter the password you set above.</p><p>You will see the terminal prompt change and you can enter the following:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">create database wordpress;</span><br><span class="line">GRANT ALL PRIVILEGES ON wordpress.* TO &#x27;root&#x27;@&#x27;localhost&#x27; IDENTIFIED BY &#x27;YOURPASSWORD&#x27;;</span><br><span class="line">FLUSH PRIVILEGES;</span><br></pre></td></tr></table></figure><p><em>IMPORTANT: Exit SQL Prompt with <code>Ctrl + D</code> and change <code>YOURPASSWORD</code> above to your password!</em></p><p>Reboot with <code>sudo reboot</code></p><h2 id="Wordpress-Configuration">Wordpress Configuration</h2><p>Remote Access can be done with SSH from any system. Find your Raspberry Pi IP with <code>ip a</code>. This IP is only your Local IP and not accessible from the outside world.</p><p>Initial setup can be done from any computer in the same network as the RPI. Type your pi ip address from above into your browsers address bar.</p><p><strong>Example: <a href="https://127.0.0.1">https://127.0.0.1</a></strong></p><p>Remote Login after initial setup append <code>/wp-admin</code> to the address</p><p><strong>Example: <a href="https://127.0.0.1/wp-adin">https://127.0.0.1/wp-admin</a></strong></p><h2 id="Recommended-Server-settings">Recommended Server settings</h2><p>Finally we need to make some quality of life improvements so you don’t have weird looking addresses. This is called “Friendly Permalinks”.</p><p>In the <em>WP Admin Portal</em>:</p><ul><li>Go to <em>Setting</em>, then <em>Permalinks</em></li><li>Select the <em>Post name</em> option and click <em>Save Changes</em></li></ul><p>From <em>SSH or Terminal on the RPI</em> you need to enter the following:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo a2enmod rewrite</span><br><span class="line">sudo nano /etc/apache2/sites-available/000-default.conf</span><br></pre></td></tr></table></figure><p>000-default.conf edits (Add this midway in the file)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&lt;Directory &quot;/var/www/html&quot;&gt;</span><br><span class="line">    AllowOverride All</span><br><span class="line">&lt;/Directory&gt;</span><br></pre></td></tr></table></figure><p>Save the File by press Ctrl + O and Exit with Ctrl + X</p><p>Now restart Apache Web with <code>sudo service apache2 restart</code></p>]]></content>
    
    
    <summary type="html">This is a guide on how to create a website on a Raspberry Pi. This will teach you the basics of using a LAMP stack.</summary>
    
    
    
    <category term="Raspberry Pi" scheme="https://mistrysiddh.com/categories/raspberry-pi/"/>
    
    <category term="Linux" scheme="https://mistrysiddh.com/categories/raspberry-pi/linux/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="industrial automation" scheme="https://mistrysiddh.com/tags/industrial-automation/"/>
    
    <category term="new site" scheme="https://mistrysiddh.com/tags/new-site/"/>
    
  </entry>
  
  <entry>
    <title>Update any PC to Windows 11</title>
    <link href="https://mistrysiddh.com/2021/07/10/Update_PC_To_Windows_11/"/>
    <id>https://mistrysiddh.com/2021/07/10/Update_PC_To_Windows_11/</id>
    <published>2021-07-10T13:36:27.000Z</published>
    <updated>2026-11-09T13:53:27.632Z</updated>
    
    <content type="html"><![CDATA[<p><img src="/images/posts/winver_KHcHK2lCu3.png" alt="Update Any PC ti Win11"></p><h2 id="Requirement-software">Requirement software</h2><ol><li>Latest version Windows 11. <a href="https://letsupload.io/2Txxv/21996.1.210529-1541.co_release_CLIENT_CONSUMER_x64FRE_en-us.iso">Download</a></li><li>Winrar. <a href="https://www.rarlab.com/download.htm">Download</a></li><li>Rufuse. <a href="https://rufus.ie/">Download</a></li><li>TPM fix. <a href="https://www.mistrysiddh.com/files/fix_TPM_error.zip">Download</a> (if its prompt for password then enter <code>123</code>)</li></ol><h2 id="Windows-Insider-Registration">Windows Insider Registration</h2><p>The path for upgrading to 11 requires you to have an activated Windows 10 PC and be subscribed to the insider builds.</p><p>Insider builds can be registerd for use  <a href="https://insider.windows.com/">https://insider.windows.com/</a></p><h2 id="System-Modification">System Modification</h2><p>Windows 11 does checks for TPM and Secure boot before it allows the upgrade process to start. However, these can be bypassed.</p><p>Note: It is important to understand Microsoft can at ANY TIME enforce these rules or ignore these modifications which means you would NO LONGER recieve updates</p><p>Here is the registry edits that need to be made: (win11bypass.reg)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">Windows Registry Editor Version 5.00</span><br><span class="line"></span><br><span class="line">[HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig]</span><br><span class="line">&quot;BypassTPMCheck&quot;=dword:00000001</span><br><span class="line">&quot;BypassSecureBootCheck&quot;=dword:00000001</span><br></pre></td></tr></table></figure><p>Download Reg File here: <a href="https://www.mistrysiddh.com/files/win11bypass.reg">https://www.mistrysiddh.com/files/win11bypass.reg</a></p><p><img src="/images/posts/regedit_jC4CAtccM9.png" alt="Regedit"><br><code>REBOOT AFTER MODIFICATIONS MADE</code></p><h2 id="TPM-Secure-Boot-Fix">TPM &amp; Secure Boot Fix</h2><p>Copy Windows 11 and TPM fix in one folder</p><p><img src="/images/posts/explorer_XHraYMkR0O.png" alt="Windows 11 &amp; TPM fix"></p><p>Extract both the ISO and zip in that folder after that open <code>fix_TPM_error</code> and copy both the files and past it in <code>21996.1.210529-1541.co_release_CLIENT_CONSUMER_x64FRE_en-us (1)/sources</code> folder it will as you for replacing the file replace it.</p><p><img src="/images/posts/lkpepc63fl.png" alt="file replace"></p><p>Now go back <code>21996.1.210529-1541.co_release_CLIENT_CONSUMER_x64FRE_en-us (1)</code> folder and run <code>setup.exe</code> select the options of your like.</p><p><img src="/images/posts/SetupHost_DDXsib9QUZ.png" alt="Setup.exe"></p><h2 id="Congratulation">Congratulation</h2><p>Congratulation now you have successfully install Windows 11 on your system</p><p><img src="/images/posts/winver_KHcHK2lCu3.png" alt="winver"></p>]]></content>
    
    
    <summary type="html">This is a guide going over updating any PC to Windows 11 that “doesn’t meet requirements” or doesn’t use Secure Boot or has a TPM 2.0 chip.</summary>
    
    
    
    <category term="Windows" scheme="https://mistrysiddh.com/categories/Windows/"/>
    
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="windows 11" scheme="https://mistrysiddh.com/tags/windows-11/"/>
    
  </entry>
  
  <entry>
    <title>Face Detection using OpenCV + Python (🐍)</title>
    <link href="https://mistrysiddh.com/2021/06/21/Face-Detection/"/>
    <id>https://mistrysiddh.com/2021/06/21/Face-Detection/</id>
    <published>2021-06-21T10:35:37.000Z</published>
    <updated>2026-07-24T14:33:54.388Z</updated>
    
    <content type="html"><![CDATA[<p><img src="https://i.ytimg.com/vi/t-MDoI7MuY0/maxresdefault.jpg" alt="Face Detection"></p><h2 id="What-is-Face-Detection">What is Face Detection?</h2><p>Face detection is AI-based computer technology that is used to extract and identify human faces from digital images. When integrated with <a href="https://recfaces.com/articles/what-is-biometrics">biometric</a> security systems (particularly, facial recognition ones), this kind of technology is what makes it possible to monitor and track people in real-time. In applications that use facial tracking, analysis, and recognition, face detection typically works as the first step and has a significant impact on how sequential operations within the app will perform.</p><p>Face detection helps with facial analysis by identifying the parts of a video or an image that should be focused on when determining gender, age, and emotions. Similarly, with facial recognition systems (which create “faceprint” maps of facial features), face detection data is included in the system’s algorithms. And why? Face detection helps determine which parts of the video or image are needed to produce a faceprint.</p><h2 id="HOW-DOES-FACE-DETECTION-WORK">HOW DOES FACE DETECTION WORK?</h2><p>Face detection technology uses machine learning and algorithms in order to extract human faces from larger images; such images typically contain plenty of non-face objects, such as buildings, landscapes, and various body parts.</p><p>Facial detection algorithms usually begin by seeking out human eyes, which are one of the easiest facial features to detect. Next, the algorithm might try to find the mouth, nose, eyebrows, and iris. After identifying these facial features, and the algorithm concludes that it has extracted a face, it then goes through additional tests to confirm that it is, indeed, a face.</p><p>To make algorithms as accurate as possible, they must be trained with huge data sets that contain hundreds of thousands of images. Some of these images contain faces, while others do not. The training procedures help the algorithm’s ability to decide whether an image contains faces, and where those facial regions are located.</p><p>Also, now would be a good time to give you definitions of the main types of algorithms – ML, AI, and Deep Learning.</p><ul><li><strong>Machine Learning (ML)</strong>: ML algorithms use statistics to find patterns in huge amounts of data. This data can include words, numbers, images, clicks, and more. ML is the process behind many modern services – voice assistants (Siri and Alexa), search engines (Google and Baidu), and recommendation systems (Spotify and Netflix);</li><li><strong>Artificial Intelligence (AI)</strong>: If an ML solution is programmed to learn how to perform a task, rather than just simple performance, then it is AI. Systems that use AI demonstrate behaviors similar to human intelligence – for instance, problem solving, planning, learning, perception, manipulation, and reasoning;</li><li><strong>Deep Learning:</strong> This algorithm is a subset of machine learning, and it is what forms deep neural networks; essentially, machines are given a greater ability to find and amplify tiny patterns. Such networks have any layers of computational nodes that collaborate to sift through data and deliver predictions.</li></ul><p>Now, as for the exact technologies used to develop face detection applications; these include:</p><ul><li>OpenCV;</li><li>Matlab;</li><li>Tensorflow;</li><li>Neural Networks.</li></ul><p>All of these follow almost the exact same procedure for face detection.</p><h3 id="FACE-DETECTION-METHODS">FACE DETECTION METHODS</h3><p>Three researchers from the University of California, David Kriegman, Ming-Hsuan Yang, and Narendra Ahuja, published a classification of facial detection methods. There are four classifiable categories, of which face detection algorithms can belong to 2+ groups. Let’s take a look at each category.</p><h4 id="Feature-Based-Method">Feature-Based Method</h4><p>This method located faces by extracting structural features. First, an algorithm is trained as a classifier. Next, it is used to sort facial regions from non-facial regions. The general idea is to move past humans’ instinctive knowledge of faces. When feature-based approaches tackle photos with many faces, they have a 94% success rate.</p><p><strong>Summary:</strong> Features such as a person’s nose or eyes are used to detect a face.</p><h4 id="Knowledge-Based-Method">Knowledge-Based Method</h4><p>A knowledge-based algorithm is dependent upon a set of rules, and it is built on human knowledge. For instance, “rules” might include that a face should have eyes, a nose, and a mouth in certain positions relative to each other. However, this kind of method comes with one huge challenge: it is very difficult to build an appropriate rules set. If the rules are too general, there may be many false positives – and, conversely, if the rules are too detailed, the system could generate many false negatives.</p><p><strong>Summary:</strong> A face is determined based on whether it meets a set of rules made by a human.</p><h4 id="Template-Matching-Method">Template Matching Method</h4><p>With a template matching algorithm, parameterized or pre-defined templates are used to locate or detect faces – the system measures the correlation between the input photos and the templates. For instance, the template may show that a human face is divided into nose, mouth, eyes, and face contour regions. Also, a facial model could be comprised of just edges and use the edge detection method – implementation of this approach is easy, but it is insufficient for face detection.</p><p><strong>Summary:</strong> Images are compared to standard face patterns that have been previously stored.</p><h4 id="Appearance-Based-Method">Appearance-Based Method</h4><p>An appearance-based algorithm uses a set of training images to “learn” what a face should look like. In general, this method relies on machine learning and statistical analysis to determine relevant facial characteristics. An appearance-based approach is generally considered to be stronger than the previously mentioned methods.</p><p><strong>Summary:</strong> Statistical analysis and machine learning are combined to find a face image’s characteristics.</p><h3 id="FACE-DETECTION-TECHNIQUES">FACE DETECTION TECHNIQUES</h3><p>Some of the more specific facial detection techniques include:</p><ol><li>Removing the background. Let’s say an image has a pre-defined, static background or a plain, single-color background – removing it can help determine the face’s boundaries;</li><li>With color images, the color of the skin can sometimes be used to find faces;</li><li>Motion can be used to detect faces. In a real-time video, a person’s face is nearly always in motion. However, a drawback of this technique is that a face could be confused with other moving objects.</li></ol><p>When the aforementioned strategies are combined, they can create a comprehensive face detection approach.</p><h2 id="WHAT-ARE-THE-CHALLENGES-IN-FACE-DETECTION">WHAT ARE THE CHALLENGES IN FACE DETECTION?</h2><p>Researchers Ashu Kumar, Amandeep Kaur, and Munish Kumar published a <a href="https://www.researchgate.net/publication/326667118_Face_Detection_Techniques_A_Review">review of face detection techniques</a>, which included a detailed explanation of the challenges that facial detection faces. To sum up their findings, the challenges in face detection include:</p><ul><li>Odd expressions. A human face might have an odd expression, making it difficult for facial detection algorithms to identify it as a face;</li><li>Face occlusion. If a face is hidden by hair, a hat, a hand, glasses, or a scarf, it may result in a false negative;</li><li>Illuminations. An image might not have uniform lighting effects; part of the image may be overexposed, while another part is very dark. Again, this can contribute to false negatives;</li><li>Complex background. When lots of objects are present in an image, face detection’s accuracy is reduced;</li><li>Too many faces. If there is a large number of human faces in an image, face detection software may have a hard time distinguishing between some of them;</li><li>Low resolution. If an image’s resolution is poor, it is more difficult to detect faces;</li><li>Skin color. If somebody’s skin color falls outside of the gradient that is recognized by the algorithm,<br>their face might not be detected.</li></ul><h2 id="HOW-DOES-FACE-DETECTION-WORK-WITH-DEEP-LEARNING">HOW DOES FACE DETECTION WORK WITH DEEP LEARNING?</h2><p>As we mentioned earlier, deep learning is a subset of machine learning in which large neural networks process huge amounts of data and make complex predictions. So how does deep learning factor into face detection? Well, multiple <a href="https://arxiv.org/abs/1502.02766">deep learning methods</a> have been developed specifically for facial detection.</p><p>One of the most popular deep learning approaches is the Multi-Task Cascaded Convolutional Neural Network – or, MTCNN. This approach is popular because it achieved cutting-edge results (for the time) on a variety of benchmark datasets – plus, it is able to use landmark detection to recognize the eyes, mouth, and other facial features.</p><p>MTCNN uses a cascade structure that contains three networks: P-net, R-Net, and O-Net. The image is first rescaled to different sizes (or an image period). P-Net proposes facial regions, R-Net filters the bounding boxes, and O-Net proposes facial landmarks.</p><h2 id="WHY-IS-FACE-DETECTION-IMPORTANT-TODAY">WHY IS FACE DETECTION IMPORTANT TODAY?</h2><p>Face detection is the initial step in face analysis, face tracking, and, most importantly, face recognition. The latter industry is growing by leaps and bounds, and is applied to device unlocking, banking, hospitality, law enforcement, building security, and more. Face detection is necessary for facial recognition algorithms to know which parts of an image must be used to generate faceprints.</p><h2 id="FACE-DETECTION-VS-FACE-RECOGNITION-WHAT’S-THE-DIFFERENCE">FACE DETECTION VS. FACE RECOGNITION: WHAT’S THE DIFFERENCE?</h2><p>Facial recognition is merely one application of face detection. The former is used for biometric verification and device unlocking, whereas the latter can also be applied to facial analysis and tracking. For a more comprehensive look at face recognition, check out our <a href="https://recfaces.com/articles/types-of-biometrics">Types of Biometrics guide.</a></p><h2 id="ADVANTAGES-AND-DISADVANTAGES-OF-FACE-DETECTION-SYSTEMS">ADVANTAGES AND DISADVANTAGES OF FACE DETECTION SYSTEMS</h2><p>While face detection systems can be powerful, they are by no means foolproof, as demonstrated by our list of challenges. Let’s take a look at the advantages and disadvantages that face detection systems can bring.</p><h3 id="ADVANTAGES-OF-FACE-DETECTION">ADVANTAGES OF FACE DETECTION</h3><ol><li>Better security. Face detection augments surveillance tactics and forms the basis of the identification process of terrorists and criminals;</li><li>Easy to integrate. Most face detection solutions are compatible with security software;</li><li>Automated identification. Face detection lets facial identification be automated, thus increasing efficiency alongside a heightened rate of accuracy.</li></ol><h3 id="DISADVANTAGES-OF-FACE-DETECTION">DISADVANTAGES OF FACE DETECTION</h3><ol><li>Huge storage requirements. Machine learning technology requires powerful data storage;</li><li>Detection can be vulnerable. We’ve outlined the way in which facial detection can be thrown off;</li><li>Potential privacy issues. There is disagreement on whether face detection is compatible with human privacy rights.</li></ol><h3 id="PROS-AND-CONS-TABLE-SUMMARY">PROS AND CONS TABLE SUMMARY</h3><table><thead><tr><th>Advantages of Face Detection</th><th>Disadvantages of Face Detection</th></tr></thead><tbody><tr><td>Better security</td><td>Huge storage requirements</td></tr><tr><td>Easy to integrate</td><td>Vulnerable detection</td></tr><tr><td>Automated identification</td><td>Potential privacy issues</td></tr></tbody></table><h2 id="HOW-FACE-DETECTION-ALGORITHMS-ARE-USED">HOW FACE DETECTION ALGORITHMS ARE USED</h2><p>Before we wrap up this guide, we wanted to give some examples of how face detection algorithms are applied in the real world. Some applications include photography, lip reading, marketing, and more.</p><h3 id="FACIAL-MOTION-CAPTURE">FACIAL MOTION CAPTURE</h3><p>With applications such as Snapchat, people’s faces can be altered in real-time with fun filters. Facial detection makes this possible, as its algorithms tell the applications that there is a face that can be traced and changed.</p><h3 id="FACIAL-RECOGNITION">FACIAL RECOGNITION</h3><p><a href="https://recfaces.com/articles/what-is-facial-recognition-used-for">Facial recognition</a> adds increased security to nearly every global industry. It seeks to identify a person and then authenticate their identity – but for a person’s faceprint to be analyzed via facial recognition, the facial area to be assessed is determined by face detection.</p><h3 id="PHOTOGRAPHY">PHOTOGRAPHY</h3><p>Facial recognition can be used to “tag” people’s faces in photos across social media platforms, and facial detection forms the foundation of this application. Furthermore, facial detection technology can be used alongside tracking to focus on a person’s face while the photo is being taken.</p><h3 id="MARKETING">MARKETING</h3><p>Facial surveillance can help stores determine customers that have visited a few times and offer them perks or discounts – thus fostering increased customer loyalty.</p><h3 id="EMOTIONAL-INFERENCE">EMOTIONAL INFERENCE</h3><p>Emotion recognition applications are still in the works; when they are fully developed, AI might be able to “read” nonverbal cues, gestures, body movements, and facial expressions to convey a person’s feelings.</p><h3 id="LIP-READING">LIP READING</h3><p>The detection, modeling, and tracking of lips during videos can be used to generate automatic subtitles. Such an application can be found on YouTube, where some videos have the option to turn on subtitles, even if the creator has not provided any.</p><h2 id="SUMMARY">SUMMARY</h2><p>To sum up the key points of this guide:</p><ul><li>Face detection is AI-based computer technology that is used to extract and identify human faces from<br>digital images;</li><li>Face detection algorithms can be feature-based, knowledge-based, template matching, appearance- based, or a combination of methods;</li><li>Advantages of face detection include better security, easy integration, and automated identification;</li><li>Disadvantages include huge storage requirements, vulnerable detection, and potential privacy issues.</li></ul><p>Face detection is the foundation of a huge number of facial applications – we can see it in our day-to-day life. When we unlock our smartphone via face recognition, that would not be possible without face detection. The same goes for facial recognition surveillance systems, photo tagging, and Snapchat filters. There are many exciting applications in the works that we can thank face detection for!</p><h2 id="Tutorial-Time">Tutorial Time</h2><p>Now we will see a small example of OpenCV and Python with its explanations, before we start we will need following software and if you are Linux base OS then you can skip installation process. Lets start.</p><h3 id="Installation-on-Windows">Installation on Windows</h3><p>Software we will be using</p><ol><li>PyCharm Community version</li><li>Latest version of python</li><li>And most import is your support. Lets start.</li></ol><h4 id="1-PyCharm-Community-version">1. PyCharm Community version</h4><p>First open your favorite browser and paste this link in there <code>https://www.jetbrains.com/pycharm/download/</code> after that click on download under Community section.</p><p><img src="/images/posts/pycharm.png" alt="PyCharm"></p><p>After downloading it just open the installer you shall be granted with this screen</p><p><img src="/images/posts/pycharm-community.png" alt="PyCharm Community"></p><p>Click on next and complete installation process.</p><h4 id="2-Python">2. Python</h4><p>After completing installation of <code>PyCharm</code> now we will install Python, so same copy and past this link <code>https://www.python.org/downloads/</code> in browser and download installer</p><p><img src="/images/posts/python-download.png" alt="Python"></p><p>Now open the installer and start the installation process and make sure that you check all the options in <code>Optional Features</code> like this</p><p><img src="/images/posts/python-optional-features.png" alt="Python Optional Feature"></p><p>Now we are set for tutorial so open up your PyCharm.</p><h3 id="Coding">Coding</h3><p>First of all we will be opening PyCharm from start menu under JetBrains folder</p><p><img src="/images/posts/jetbrains.png" alt="JetBrains"></p><p>Create a new project named it OpenCV.</p><p><img src="/images/posts/pycharm64_sdEaNyoXbp.png" alt="pycharm64_sdEaNyoXbp"></p><p>After creating new project it will take few minutes to setup editor for us and after completing this will on your screen</p><p><img src="/images/posts/pycharm64_c6nRLL7MiL.png" alt="PyCharm Editor"></p><h4 id="Package-Installation">Package Installation</h4><p>Now clear everything in <code>main.py</code> and it should be empty after that we will be creating a text file called <code>requirement.txt</code> in your project folder using <code>cmd</code> for that you have to open <code>cmd</code>and navigate to you project folder like this</p><p><img src="/images/posts/cmd_CnLDIMeHY8.png" alt="CMD"></p><p>now type <code>notepad.exe requirement.txt</code> it will ask you for create a new file and click on yes after that paste bellow packages name there.</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">opencv-python</span><br><span class="line">opencv-contrib-python</span><br><span class="line">numpy</span><br><span class="line">pillow</span><br></pre></td></tr></table></figure><p>Save the file and close it now as we have saved the file we need to install all this packages by bellow command it will take a few minutes depending on your data transfer speed</p><figure class="highlight cmd"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip install -r requirement.txt</span><br></pre></td></tr></table></figure><p>I have already installed it so it will give me this output</p><p><img src="/images/posts/cmd_J3z721ij7x.png" alt="Package installation"></p><h4 id="Video-detection">Video detection</h4><p>Close cmd and come back to your PyCharm, after we have installed all the required packages we will make a simple program for video capture so that we know that our video camera is working or not, but before we code in PyCharm we have to import all this packages we installed so follow me. First got to menu then File &gt; Settings and you will see this window.</p><p><img src="/images/posts/pycharm64_PxPA5214bM.png" alt="Project Settings"></p><p>Open <code>Project: OpenCV</code> and in that select <code>Python Interpreter</code> in that add all this packages</p><p><img src="/images/posts/pycharm64_PxPA5214bM.png" alt="Project Settings"></p><p>Now we will be coding a small program on video detection.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2 <span class="comment">#importing opencv package</span></span><br><span class="line">capture = cv2.VideoCapture(<span class="number">0</span>) <span class="comment"># we will create a variable name capture to capture webcam of our device which is &quot;0&quot; or else you can write ip address in &#x27;&#x27; of your webcam</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">while</span>(<span class="literal">True</span>):</span><br><span class="line">    ret, frame = capture.read() <span class="comment"># to read data from video capture variable</span></span><br><span class="line">    cv2.imshow(<span class="string">&quot;Video Feed&quot;</span>,frame) <span class="comment"># to show live video camera feed</span></span><br><span class="line">    <span class="keyword">if</span> cv2.waitKey(<span class="number">1</span>) &amp; <span class="number">0xFF</span> == <span class="built_in">ord</span>(<span class="string">&#x27;q&#x27;</span>): <span class="comment"># we have set waitKey at 0 means infinite or you can write any miliseconds and for ord(&#x27;q&#x27;) for quiting in live feed by pressing q on keyboard</span></span><br><span class="line">        <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line">capture.release()</span><br><span class="line">cv2.destroyAllWindows()</span><br></pre></td></tr></table></figure><p>Now press <kbd>shift + F10</kbd> from keyboard or go-to menu Run &gt; Run ‘main’ to run the program you may be able to see a new window with the name <code>Video Feed</code> try it yourself and you will be able to see your face.</p><p><img src="/images/posts/vLylUVtgbB.png" alt="Test image">This is test image which I will be using it.</p><h4 id="OpenCV-Cascade">OpenCV Cascade</h4><p>It means that our camera of our system is working properly now we need face detection cascades there are two ways of finding that files first is by downloading from <a href="/files/cascades.zip">here</a> or by following commands open your cmd and type <code>python</code> or <code>py</code> after that type following commands</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2</span><br><span class="line"><span class="built_in">print</span>(cv2.__file__)</span><br></pre></td></tr></table></figure><p><img src="/images/posts/WindowsTerminal_vDoEGwj6gk.png" alt="CV2 Path"></p><p>Go to the highlighted path and in there you will be able to see all the files and in that file there will be a folder called data will be there</p><p><img src="/images/posts/explorer_Ixdq0hGTPD.png" alt="Data"></p><p>Copy that folder and past it in your project and rename from <code>data</code> to <code>cascade</code> like this.</p><p><img src="/images/posts/explorer_sCfK1JWEKV.png" alt="Cascade"></p><p>After doing we will be creating a new variable called <code>face_cascade</code> and in that variable we will use OpenCV, paste this code in your <a href="http://main.py">main.py</a> file</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2 <span class="comment">#add bellow this line</span></span><br><span class="line">face_cascade = cv2.CascadeClassifier(<span class="string">&#x27;cascades/haarcascade_frontalface_alt.xml&#x27;</span>) </span><br></pre></td></tr></table></figure><h4 id="Using-Face-Classifier">Using Face Classifier</h4><p>Now we will be converting our colored BGR color to Gray color so that our cascade can understand the image properly, mostly face detection works in gray scale so we will be converting our colored frame to gray scale. For that you have to create a new variable called gray under <code>ret, frame = capture.read()</code>. Remember OpenCV uses BGR method while for other color code it is RGB you must be familiar with RGB so you will understand BGR. Now we will add this line into our code</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ret, frame = capture.read() <span class="comment"># add bellow this line</span></span><br><span class="line">gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) <span class="comment"># to convert BGR image to grayscale image</span></span><br></pre></td></tr></table></figure><p>and don’t worry if your not able to understand the code I will be giving you project like so that you can download it and run it on your own. We will now detect faces in webcam, photo frame or video. For that we will be using gray scale which we have converted from BGR ti GRAY so for that we need <code>detectMultiScale</code> function for scale factor and minimum neighbors detection.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) <span class="comment">#add bellow this</span></span><br><span class="line">faces = face_cascade.detectMultiScale(gray, scaleFactor=<span class="number">1.5</span>, minNeighbors=<span class="number">5</span>) <span class="comment"># you can play with the numbers as much as you want</span></span><br></pre></td></tr></table></figure><p>now we will pe finding our face in frame by finding position and checking whether the face is present or not for that we will be using width, height, x direction, y direction of the video feed.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">faces = face_cascade.detectMultiScale(gray, scaleFactor=<span class="number">1.5</span>, minNeighbors=<span class="number">5</span>)  <span class="comment"># add bellow this line</span></span><br><span class="line">    <span class="keyword">for</span> (x, y, w, h) <span class="keyword">in</span> faces:</span><br><span class="line">        <span class="built_in">print</span>(x,y,w,h) <span class="comment"># print coordinates of your face</span></span><br></pre></td></tr></table></figure><p>This command will show you the coordinates of your face in the frame so that we can identify that someone is present here.</p><p><img src="/images/posts/9GZxLCVtAp.png" alt="Face Coordinate's"></p><p>Now we will be drawing a square around our face so that we can clearly identify it for that we will be will be using gray scale image. Now we will make a region of interest or ROI using gray scale image to determine its width and height</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">for</span> (x, y, w, h) <span class="keyword">in</span> faces:</span><br><span class="line">     <span class="built_in">print</span>(x,y,w,h) <span class="comment"># print bellow this line</span></span><br><span class="line">     roi_gray = gray[y:y + h, x:x + h] <span class="comment"># regoin of interest of gray scale image</span></span><br><span class="line">     roi_color = frame[y:y + h, x:x + w] <span class="comment"># regoin of interest of colored image</span></span><br></pre></td></tr></table></figure><p>so now as we have found our region of interest we will check that whether it is working properly or not so we will capture our face by making a PNG fine</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">roi_color = frame[y:y + h, x:x + w] <span class="comment"># add bellow this</span></span><br><span class="line">  img_item = <span class="string">&quot;my-image.png&quot;</span> <span class="comment"># creating a variable name img_item</span></span><br><span class="line">  cv2.imwrite(img_item, roi_color) <span class="comment"># to create an image file where we can see our face only</span></span><br></pre></td></tr></table></figure><p>What this above line will do is that it will create an PNG file with the name <code>my-image.png</code> in your project folder so that we can understand that which portion of our face is been captured.</p><p><img src="/images/posts/ATItkXEuFa.png" alt="my-image.png"></p><p>After detecting our face and saving it in a PNG file what we will do is that we will create a border and track our live feed cam and see it more clearly</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">cv2.imwrite(img_item, roi_color) <span class="comment"># add bellow this</span></span><br><span class="line">color = (<span class="number">0</span>,<span class="number">0</span>,<span class="number">255</span>) <span class="comment"># BGR format you can choose whatever you want go to this site to choose color https://wamingo.net/rgbbgr/</span></span><br><span class="line">   stroke = <span class="number">2</span></span><br><span class="line">   end_cord_x = x + w</span><br><span class="line">   end_cord_y = y + h</span><br><span class="line">   cv2.rectangle(frame,(x, y), (end_cord_x, end_cord_y), color, stroke)</span><br></pre></td></tr></table></figure><p><img src="/images/posts/bzUl6UbhVI.png" alt="Drawing rectangle on face"></p><p>Until now what we have done is that we have just detecting our face using <code>Cascades</code> but as we have successfully done it so now we will be creating recognizer to recognize who is that person is for that we will be creating an algorithm. So now we will be creating new python file <code>train-faces.py</code> so that we will be writing all the algorithm in it to train our facial recognition system. After creating <code>train-faces.py</code> file we will create a folder of name <code>images</code> where we will be adding all images in it to train our trainer. Open <a href="http://train-faces.py">train-faces.py</a> and type the following code:</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> os <span class="comment"># to detect which kind of operating system we are been using example: Windows, Linux, Debian, Mac, etc.</span></span><br><span class="line">BASE_DIR = os.path.dirname(os.path.abspath(__file__)) <span class="comment"># to automatical find out the path of our project</span></span><br></pre></td></tr></table></figure><p>What we have done is that we told the system to find the path of our project automatically and also to detect os also and after detecting our project folder we will be adding our images directory so that we will be able to find all images at one place.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">BASE_DIR = os.path.dirname(os.path.abspath(__file__)) <span class="comment"># add bellow this</span></span><br><span class="line">image_dir = os.path.join(BASE_DIR, <span class="string">&quot;images&quot;</span>) <span class="comment"># this will add images at the end of our base dir example: C:\User\Admin\Desktop\facedetection\images\</span></span><br></pre></td></tr></table></figure><p>As our system or file has detected the path we will check all the images which are present in it.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">image_dir = os.path.join(BASE_DIR, <span class="string">&quot;images&quot;</span>) <span class="comment"># add bellow this line</span></span><br><span class="line"><span class="keyword">for</span> root, dirs, files <span class="keyword">in</span> os.walk(image_dir): <span class="comment"># this will detect our image path</span></span><br><span class="line">    <span class="keyword">for</span> file <span class="keyword">in</span> files: </span><br><span class="line">        <span class="keyword">if</span> file.endswith(<span class="string">&quot;png&quot;</span>) <span class="keyword">or</span> file.endswith(<span class="string">&quot;jpg&quot;</span>): <span class="comment"># this is use to check whether there are png file or jpg files</span></span><br><span class="line">            path = os.path.join(root, file) <span class="comment"># this will join our project director and images folder path</span></span><br><span class="line">            <span class="built_in">print</span>(path) <span class="comment"># to check all the apth of images</span></span><br></pre></td></tr></table></figure><p><img src="/images/posts/pycharm64_QFG764uyci.png" alt="Image path"></p><p>Now what we will do is that we will be giving labels to our directories which are present in images folder</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">      path = os.path.join(root, file) <span class="comment"># add bellow this line</span></span><br><span class="line">label = os.path.basename(root) <span class="comment"># to give the label of our image folder</span></span><br><span class="line">  <span class="built_in">print</span>(label, path) <span class="comment"># add label in old print function</span></span><br></pre></td></tr></table></figure><p>So when we will run the code now we will be able to see path as well as label. So now we will be creating empty list.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">image_dir = os.path.join(BASE_DIR, <span class="string">&quot;images&quot;</span>) <span class="comment"># add bellow this</span></span><br><span class="line">y_labels = []</span><br><span class="line">x_train = []</span><br></pre></td></tr></table></figure><p>Training images using <code>NumPy</code> array also we will be using <code>PIL</code> python library to grab pill of image</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2 <span class="comment">#add bellow this</span></span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"><span class="keyword">from</span> PIL <span class="keyword">import</span> Image</span><br></pre></td></tr></table></figure><p>After importing Image from PIL library we will be converting image into gray</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">  <span class="built_in">print</span>(label, path) <span class="comment"># add bellow this</span></span><br><span class="line">pil_image = Image.<span class="built_in">open</span>(path).convert(<span class="string">&quot;L&quot;</span>) <span class="comment"># to convert colored image to gray scale</span></span><br></pre></td></tr></table></figure><p>Now we will be using NumPy array to train our images</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">pil_image = Image.open(path).convert(&quot;L&quot;) # add bellow this line</span><br><span class="line">image_array = np.array(pil_image, &quot;uint8&quot;)</span><br><span class="line">print(image_array) # to check images array</span><br></pre></td></tr></table></figure><p><img src="/images/posts/pycharm64_D0vgyFuYoF.png" alt="Image Array"></p><p>We will check ROI of images so that we can train our trainer for that we need to <code>import cv2</code> into our <code>train-faces.py</code> using our Cascades</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2 </span><br><span class="line">BASE_DIR = os.path.dirname(os.path.abspath(__file__)) <span class="comment"># to automatical find out the path of our project</span></span><br><span class="line"></span><br><span class="line">image_dir = os.path.join(BASE_DIR, <span class="string">&quot;images&quot;</span>) <span class="comment"># this will add images at the end of our base dir example: C:\User\Admin\Desktop\facedetection\images\</span></span><br><span class="line">face_cascade = cv2.CascadeClassifier(<span class="string">&#x27;cascades/haarcascade_frontalface_alt2.xml&#x27;</span>) <span class="comment"># add this line</span></span><br></pre></td></tr></table></figure><p>After importing OpenCV and Cascades we will be detecting faces using <code>detectMultiScale</code>.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">      <span class="built_in">print</span>(image_array) <span class="comment"># add bellow this</span></span><br><span class="line">faces = face_cascade.detectMultiScale(image_array, scaleFactor=<span class="number">1.5</span>, minNeighbors=<span class="number">5</span>)</span><br><span class="line">      <span class="keyword">for</span> (x, y, w, h) <span class="keyword">in</span> faces:</span><br><span class="line">          roi = image_array[y:y + h, x:x + w]</span><br><span class="line">          x_train.append(roi)</span><br></pre></td></tr></table></figure><p>We will be giving labels so that it would be easy to understand it properly, also not that it would be easy to see who is the person in the video feed or photo frame for that we will be creating a variable.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">face_cascade = cv2.CascadeClassifier(<span class="string">&#x27;cascades/haarcascade_frontalface_alt2.xml&#x27;</span>) <span class="comment"># add bellow this line</span></span><br><span class="line">current_id = <span class="number">0</span> <span class="comment"># creating an id starting with 0</span></span><br><span class="line">label_ids = &#123;&#125; <span class="comment"># to create and empty directory</span></span><br><span class="line"><span class="comment"># Now come down to this line </span></span><br><span class="line">        <span class="built_in">print</span>(label, path) <span class="comment"># ad bellow this</span></span><br><span class="line">            <span class="keyword">if</span> <span class="keyword">not</span> label <span class="keyword">in</span> label_ids: <span class="comment"># it will check whether the labels are there or not</span></span><br><span class="line">                label_ids[label] = current_id</span><br><span class="line">                current_id += <span class="number">1</span></span><br><span class="line">            id_ = label_ids[label]</span><br><span class="line">            <span class="built_in">print</span>(label_ids) <span class="comment"># to print label ids</span></span><br><span class="line"><span class="comment"># Now come down to this line </span></span><br><span class="line">x_train.append(roi) <span class="comment"># add bellow this line</span></span><br><span class="line">                y_labels.append(id_)</span><br><span class="line"><span class="built_in">print</span>(y_labels)</span><br><span class="line"><span class="built_in">print</span>(x_train)</span><br></pre></td></tr></table></figure><p>What we have done is that we have created labels ids for each and every image we have so after doing that we will saving all thoes lables so that it would be easy for our program to recognize it for that we need pickle so I assume that you know who to import any library so import pickle. Now go to the bottom of you <a href="http://train-faces.py">train-faces.py</a> file and paste bellow code but before pasting this code make sure to add <code>#</code> infront of <code>print</code> function.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">with</span> <span class="built_in">open</span>(<span class="string">&quot;labels.pickle&quot;</span>, <span class="string">&quot;wb&quot;</span>) <span class="keyword">as</span> f:</span><br><span class="line">    pickle.dump(label_ids, f)</span><br></pre></td></tr></table></figure><p>After this we will train our OpenCV recognizer for each an every images so that it can recognize it propely so for that we will create a variable call recognizer.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">face_cascade = cv2.CascadeClassifier(<span class="string">&#x27;cascades/haarcascade_frontalface_alt2.xml&#x27;</span>) <span class="comment"># add bellow this line</span></span><br><span class="line">recognizer = cv2.face.LBPHFaceRecognizer_create() <span class="comment">#creating our face recognizer</span></span><br></pre></td></tr></table></figure><p>Successful creation of our recognizer we will be needing numpy array to save all those array in a single file and remember one thing the more numbers of photo will take more time to write it also it deppends on speed of your devices also.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">with</span> <span class="built_in">open</span>(<span class="string">&quot;labels.pickle&quot;</span>, <span class="string">&quot;wb&quot;</span>) <span class="keyword">as</span> f:</span><br><span class="line">    pickle.dump(label_ids, f) <span class="comment"># add bellow this</span></span><br><span class="line">recognizer.train(x_train, np.array(y_labels)) <span class="comment"># using numpy array we will be training our recognizer</span></span><br><span class="line">recognizer.save(<span class="string">&quot;trainer.yml&quot;</span>) <span class="comment"># and from above training we will be saving it in a single file called trainner.yml</span></span><br></pre></td></tr></table></figure><p>As we have completed our <code>train-faces.py</code> we will run it and train our project so that we can recognize our faces, so now go to your cmd and <code>type py tain-faces.py</code> and wait until you get this message</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Process finished with exit code 0</span><br></pre></td></tr></table></figure><p>After you see this message it means that our trainer has been successfully trained so <a href="http://main.py">main.py</a> is been left to update for final run. Now open your <a href="http://main.py">main.py</a> file and past this line</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">face_cascade = cv2.CascadeClassifier(<span class="string">&#x27;cascades/haarcascade_frontalface_alt2.xml&#x27;</span>) <span class="comment"># add bellow this</span></span><br><span class="line">recognizer = cv2.face.LBPHFaceRecognizer_create() <span class="comment">#creating our face recognizer</span></span><br><span class="line">recongnizer.read(<span class="string">&quot;trainer.yml&quot;</span>)</span><br><span class="line"><span class="keyword">with</span> <span class="built_in">open</span>(<span class="string">&quot;labels.pickle&quot;</span>, <span class="string">&quot;rb&quot;</span>) <span class="keyword">as</span> f:</span><br><span class="line">    og_labels = pickle.load(f)</span><br></pre></td></tr></table></figure><p>What we did is imported <code>trainer.yml</code> so that we can read all the data we have been trained data. After that we will be import all the the tags and ids we have created.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">roi_color = img[y:y + h, x:x + w] <span class="comment"># add bellow this line</span></span><br><span class="line">id_, conf = recognizer.predict(roi_gray)</span><br><span class="line">  <span class="keyword">if</span> conf&gt;= <span class="number">45</span>:</span><br><span class="line">    <span class="built_in">print</span>(id_)</span><br></pre></td></tr></table></figure><h4 id="Loading-Label-Names-from-Pickle">Loading Label Names from Pickle</h4><p>Now we will labels from <code>labels.pickle</code> so that we can identify labels, so what we will do is fetch all the labels from that file.</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">recognizer.read(&quot;trainer.yml&quot;) # add bellow this</span><br><span class="line"></span><br><span class="line">labels = &#123;&quot;person_name&quot;: 1&#125; # display person name</span><br></pre></td></tr></table></figure><p>What we did is we will display person name so to do that we are going to add this line to display it</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">og_labels = pickle.load(f) <span class="comment"># add bellow this</span></span><br><span class="line">labels = &#123;v:k <span class="keyword">for</span> k,v <span class="keyword">in</span> labels.items()&#125;</span><br></pre></td></tr></table></figure><p>Now we will print ids</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">print</span>(id_) <span class="comment"># add bellow this</span></span><br><span class="line">    </span><br></pre></td></tr></table></figure><h4 id="Put-Text-on-your-face">Put Text on your face</h4><p>We will put text on our webcam face recognition so that we can identify who is that person is for that we will be using <code>putText</code> function.</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> conf &gt;= <span class="number">45</span>:</span><br><span class="line">    <span class="built_in">print</span>(id_)</span><br><span class="line">    <span class="built_in">print</span>(labels[id_]) <span class="comment"># add bellow this</span></span><br><span class="line">    font = cv2.FONT_HERSHEY_SIMPLEX</span><br><span class="line">    name = labels[id_]</span><br><span class="line">    color = (<span class="number">0</span>,<span class="number">0</span>,<span class="number">255</span>) <span class="comment"># BGR choose any color you like</span></span><br></pre></td></tr></table></figure><p>We will resize little bit so that it reads perfectly in <code>train-faces.py</code></p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">         pil_image = Image.<span class="built_in">open</span>(path).convert(<span class="string">&quot;L&quot;</span>) <span class="comment"># add bellow this</span></span><br><span class="line">size = (<span class="number">500</span>,<span class="number">500</span>)</span><br><span class="line">         final_image = pil_image.rezise(size, Image.ANTIALIAS)</span><br></pre></td></tr></table></figure><p>After saving both the files run your <a href="http://main.py">main.py</a> file and check the output of it.</p><h4 id="Complete-Code">Complete Code</h4><p><strong>requirement.txt</strong></p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">opencv-python</span><br><span class="line">opencv-contrib-python</span><br><span class="line">numpy</span><br><span class="line">pillow</span><br></pre></td></tr></table></figure><p><strong><a href="http://main.py">main.py</a></strong></p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2 </span><br><span class="line"><span class="keyword">import</span> pickle</span><br><span class="line"><span class="comment"># url = &#x27;&#x27; # add your remote ip of webcam example &#x27;http://192.168.0.1/video&#x27; or &#x27;http://192.168.0.1&#x27; depending on your ip even you can use security camera ip also</span></span><br><span class="line">face_cascade = cv2.CascadeClassifier(<span class="string">&#x27;cascades/haarcascade_frontalface_alt2.xml&#x27;</span>)</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">recognizer = cv2.face.LBPHFaceRecognizer_create()</span><br><span class="line">recognizer.read(<span class="string">&quot;trainer.yml&quot;</span>)</span><br><span class="line">labels = &#123;<span class="string">&quot;person_name&quot;</span>: <span class="number">1</span>&#125;</span><br><span class="line"><span class="keyword">with</span> <span class="built_in">open</span>(<span class="string">&quot;labels.pickle&quot;</span>,<span class="string">&quot;rb&quot;</span>) <span class="keyword">as</span> f:</span><br><span class="line">    og_labels = pickle.load(f)</span><br><span class="line">    labels = &#123;v:k <span class="keyword">for</span> k,v <span class="keyword">in</span> og_labels.items()&#125;</span><br><span class="line">cap = cv2.VideoCapture(<span class="number">0</span>) <span class="comment"># comment this if your using ip camera</span></span><br><span class="line"><span class="comment"># cap = cv2.VideoCapture(url) # uncomment this line to use remote camera url</span></span><br><span class="line">cap.<span class="built_in">set</span>(<span class="number">3</span>,<span class="number">512</span>)</span><br><span class="line">cap.<span class="built_in">set</span>(<span class="number">4</span>,<span class="number">512</span>)</span><br><span class="line">cap.<span class="built_in">set</span>(<span class="number">10</span>,<span class="number">150</span>)</span><br><span class="line"></span><br><span class="line"><span class="keyword">while</span> <span class="literal">True</span>:</span><br><span class="line">    <span class="comment"># Capture frame-by-frame</span></span><br><span class="line">    ret, frame = cap.read()</span><br><span class="line">    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)</span><br><span class="line">    faces = face_cascade.detectMultiScale(gray, scaleFactor=<span class="number">1.5</span>, minNeighbors=<span class="number">5</span>)</span><br><span class="line">    <span class="keyword">for</span> (x, y, w, h) <span class="keyword">in</span> faces:</span><br><span class="line">        <span class="comment"># print(x,y,w,h)</span></span><br><span class="line">        roi_gray = gray[y:y+h, x:x+w]</span><br><span class="line">        roi_color = frame[y:y+h, x:x+w]</span><br><span class="line">        id_, conf = recognizer.predict(roi_gray)</span><br><span class="line">        <span class="keyword">if</span> conf&gt;=<span class="number">45</span>: <span class="comment"># and conf&lt;=85:</span></span><br><span class="line">            <span class="comment"># print(id_)</span></span><br><span class="line">            <span class="comment"># print(labels[id_])</span></span><br><span class="line">            font = cv2.FONT_HERSHEY_SIMPLEX</span><br><span class="line">            name = labels[id_]</span><br><span class="line">            color = (<span class="number">0</span>,<span class="number">255</span>,<span class="number">0</span>)</span><br><span class="line">            stroke = <span class="number">2</span></span><br><span class="line">            cv2.putText(frame, name, (x,y), font, <span class="number">1</span>, color, stroke, cv2.LINE_AA)</span><br><span class="line"></span><br><span class="line">        img_item = <span class="string">&quot;test.png&quot;</span></span><br><span class="line">        cv2.imwrite(img_item, roi_color)</span><br><span class="line">        color = (<span class="number">0</span>,<span class="number">255</span>,<span class="number">0</span>) <span class="comment"># BGR</span></span><br><span class="line">        stroke = <span class="number">2</span></span><br><span class="line">        end_cord_x = x + w</span><br><span class="line">        end_cord_y = y + h</span><br><span class="line">        cv2.rectangle(frame, (x, y), (end_cord_x, end_cord_y), color, stroke)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># Display the resulting frame</span></span><br><span class="line">    cv2.imshow(<span class="string">&#x27;Frame&#x27;</span>,frame)</span><br><span class="line">    <span class="keyword">if</span> cv2.waitKey(<span class="number">1</span>) &amp; <span class="number">0xFF</span> == <span class="built_in">ord</span>(<span class="string">&#x27;q&#x27;</span>):</span><br><span class="line">        <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line">cap.release()</span><br><span class="line">cv2.destroyAllWindows()</span><br></pre></td></tr></table></figure><p><strong><a href="http://train-faces.py">train-faces.py</a></strong></p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2</span><br><span class="line"><span class="keyword">import</span> os</span><br><span class="line"><span class="keyword">from</span> PIL <span class="keyword">import</span> Image</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"><span class="keyword">import</span> pickle</span><br><span class="line"></span><br><span class="line">BASE_DIR = os.path.dirname(os.path.abspath(__file__))</span><br><span class="line">image_dir = os.path.join(BASE_DIR, <span class="string">&quot;images&quot;</span>)</span><br><span class="line"></span><br><span class="line">face_cascade = cv2.CascadeClassifier(<span class="string">&#x27;cascades/haarcascade_frontalface_default.xml&#x27;</span>)</span><br><span class="line">recognizer = cv2.face.LBPHFaceRecognizer_create()</span><br><span class="line"></span><br><span class="line">current_id = <span class="number">0</span></span><br><span class="line">label_ids = &#123;&#125;</span><br><span class="line">y_labels = []</span><br><span class="line">x_train = []</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> root, dirs, files <span class="keyword">in</span> os.walk(image_dir):</span><br><span class="line">    <span class="keyword">for</span> file <span class="keyword">in</span> files:</span><br><span class="line">        <span class="keyword">if</span> file.endswith(<span class="string">&quot;png&quot;</span>) <span class="keyword">or</span> file.endswith(<span class="string">&quot;jpg&quot;</span>):</span><br><span class="line">            path = os.path.join(root, file)</span><br><span class="line">            label = os.path.basename(root).replace(<span class="string">&quot; &quot;</span>, <span class="string">&quot; &quot;</span>) <span class="comment">#.upper()</span></span><br><span class="line">            <span class="comment"># print(label,path)</span></span><br><span class="line">            <span class="keyword">if</span> <span class="keyword">not</span> label <span class="keyword">in</span> label_ids:</span><br><span class="line">                label_ids[label] = current_id</span><br><span class="line">                current_id += <span class="number">1</span></span><br><span class="line">            id_ = label_ids[label]</span><br><span class="line">            <span class="comment"># print(label_ids )</span></span><br><span class="line">            <span class="comment"># y_labels.append(label)</span></span><br><span class="line">            <span class="comment"># x_train.append(path)</span></span><br><span class="line">            pil_image = Image.<span class="built_in">open</span>(path).convert(<span class="string">&quot;L&quot;</span>)</span><br><span class="line">            size = (<span class="number">512</span>,<span class="number">512</span>)</span><br><span class="line">            final_image = pil_image.resize(size, Image.ANTIALIAS)</span><br><span class="line">            image_array = np.array(pil_image, <span class="string">&quot;uint8&quot;</span>)</span><br><span class="line">            <span class="comment"># print(image_array)</span></span><br><span class="line">            faces = face_cascade.detectMultiScale(image_array, scaleFactor=<span class="number">1.5</span>, minNeighbors=<span class="number">5</span>)</span><br><span class="line">            <span class="keyword">for</span> (x,y,w,h) <span class="keyword">in</span> faces:</span><br><span class="line">                roi = image_array[y:y+h, x:x+w]</span><br><span class="line">                x_train.append(roi)</span><br><span class="line">                y_labels.append(id_)</span><br><span class="line"></span><br><span class="line"><span class="comment"># print(y_labels)</span></span><br><span class="line"><span class="comment"># print(x_train)</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">with</span> <span class="built_in">open</span>(<span class="string">&quot;labels.pickle&quot;</span>,<span class="string">&quot;wb&quot;</span>) <span class="keyword">as</span> f:</span><br><span class="line">    pickle.dump(label_ids, f)</span><br><span class="line"></span><br><span class="line">recognizer.train(x_train, np.array(y_labels))</span><br><span class="line">recognizer.save(<span class="string">&quot;trainer.yml&quot;</span>)</span><br></pre></td></tr></table></figure><h4 id="Source-Code">Source Code</h4><p>Here is the source code <a href="https://github.com/mrfoxie/OpenCV-Facial-Recognition">OpenCV Facial Recognition</a> on GitHub if you have any issues then you can ask there.</p>]]></content>
    
    
    <summary type="html">Face detection is a computer technology being used in a variety of applications that identifies human faces in digital images. Face detection also refers to the psychological process by which humans locate and attend to faces in a visual scene.</summary>
    
    
    
    <category term="AI" scheme="https://mistrysiddh.com/categories/ai/"/>
    
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="ubuntu" scheme="https://mistrysiddh.com/tags/ubuntu/"/>
    
    <category term="industrial automation" scheme="https://mistrysiddh.com/tags/industrial-automation/"/>
    
    <category term="information" scheme="https://mistrysiddh.com/tags/information/"/>
    
    <category term="robotics" scheme="https://mistrysiddh.com/tags/robotics/"/>
    
  </entry>
  
  <entry>
    <title>WSL Graphics</title>
    <link href="https://mistrysiddh.com/2021/06/19/WSLG/"/>
    <id>https://mistrysiddh.com/2021/06/19/WSLG/</id>
    <published>2021-06-19T04:29:27.000Z</published>
    <updated>2026-11-09T13:51:27.334Z</updated>
    
    <content type="html"><![CDATA[<h2 id="Recaps">Recaps</h2><p>In previous post we have seen how to install <a href="https://mistrysiddh.com/2021/06/15/WSL2Install/">Windows Subsystem Linux</a> in your windows 10, so in this we will see how to use <strong>GUI</strong> on your system without any kind of software or other utilities. The main purpose of using this is so that you can easily use both the windows and Linux apps together on single operating system, after you have installed this WSLG on your system it will look like this.</p><p><img src="/images/posts/WSLg_IntegratedDesktop.png" alt="WSLG"></p><p>Let’s start the installation process.</p><h2 id="Brief-Introduction">Brief Introduction</h2><p>WSLg is short for <em>Windows Subsystem for Linux GUI</em> and the purpose of the project is to enable support for running Linux GUI applications (X11 and Wayland) on Windows in a fully integrated desktop experience.</p><p>WSLg provides an integrated experience for developers, scientists or enthusiasts that prefer or need to run Windows on their PC but also need the ability to run tools or applications which works best, or exclusively, in a Linux environment. While users can accomplish this today using a multiple system setup, with individual PC dedicated to Windows and Linux, virtual machine hosting either Windows or Linux, or an XServer running on Windows and projected into WSL, WSLg provides a more integrated, user friendly and productive alternative.</p><p>WSLg strives to make Linux GUI applications feel native and natural to use on Windows. From integration into the Start Menu for launch to appearing in the task bar, alt-tab experience to enabling cut/paste across Windows and Linux applications, WSLg enables a seamless desktop experience and workflow leveraging Windows and Linux applications.</p><h2 id="Installation">Installation</h2><h3 id="Pre-requirements">Pre-requirements</h3><p>Before you begin installation of WSLG you have to check few thing on your system so that there is no error while installation. Here are the requirements:</p><ul class="contains-task-list"><li class="task-list-item"><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> <code>Windows 10 Insider Preview build 21362+</code> (required for now but in future it will be available for normal builds if you aren’t on this build then go to setup <a href="https://mistrysiddh.com/2021/06/15/WSL2Install/#installation-of-wsl-2">Windows Insider</a> and get latest versions of Insider Preview build)</li><li class="task-list-item"><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> Choose your GPU (if you have already install drivers then you can skip this steps)<ul class="contains-task-list"><li class="task-list-item"><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> <a href="https://community.amd.com/community/radeon-pro-graphics/blog/2020/06/17/announcing-amd-support-for-gpu-accelerated-machine-learning-training-on-windows-10">AMD GPU driver for WSL</a></li><li class="task-list-item"><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> <a href="https://downloadcenter.intel.com/download/29526">Intel GPU driver for WSL</a></li><li class="task-list-item"><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> <a href="https://developer.nvidia.com/cuda/wsl">NVIDIA GPU driver for WSL</a> (I have NVIDIA GeForce on my device so I have already installed it)</li></ul></li></ul><h3 id="Install-instructions">Install instructions</h3><p>I assume that you have installed WSL on your system but if you haven’t installed it yet then go to <a href="https://mistrysiddh.com/2021/06/15/WSL2Install/">WSL2 Installation</a> and install it. Moving further If you have an existing WSL installation without WSLg and want to update to the latest version of WSL which includes WSLg, run the command <code>wsl --update</code> from an elevated command prompt, and also download and install <a href="https://github.com/microsoft/wslg/releases/tag/v1.0.24">Linux GUI support</a> on your system so that the software requirement to run WSLg will be installed automatically.</p><p>Please note that WSLg is only compatible with WSL 2 and will not work for WSL distribution configured to work in WSL 1 mode. Verify that your Linux distro is configured for running in WSL 2 mode, if not switch to WSL 2. While you can continue to run Linux distro in WSL 1 mode after installing WSLg if you so desired, a distro configured to run in WSL 1 mode will not be able to communicate with WSLg and will not be able to run GUI applications.</p><p>You can list your currently installed distro and the version of WSL they are configured for using the following command from an elevated command prompt.</p><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wsl <span class="literal">--list</span> <span class="literal">-v</span></span><br></pre></td></tr></table></figure><p>If running in version 1 mode, switch to version 2. This can take a while.</p><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wsl <span class="literal">--set-version</span> _distro_name_ <span class="number">2</span></span><br></pre></td></tr></table></figure><p>Restart WSL by running this command from an elevated command prompt, make sure to save any pending work first:</p><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wsl <span class="literal">--shutdown</span></span><br></pre></td></tr></table></figure><h2 id="Updating-WSL-WSLg">Updating WSL + WSLg</h2><p>To update to the latest version of WSL and WSLg released for preview, simply run <code>wsl --update</code> from an elevated command prompt or powershell.</p><p>You’ll need to restart WSL for the changes to take effect. You can restart WSL by running <code>wsl --shutdown</code> from an elevated command prompt. If WSL was currently running, it will shutdown, make sure to first save any in progress work! WSL will be automatically restarted the next time you launch a WSL application or terminal.</p><h2 id="First-Launch">First Launch</h2><p>If you have installed the <code>Ubuntu</code> Linux distro per these instructions, you’ll find an <code>Ubuntu</code> icon in your start menu, launch it. This will launch the WSL 2 VM, launch the Ubuntu WSL distro in that VM and give you a terminal to interact with it. Voila! You’re running Linux on Windows!</p><p>If you would like to explore additional Linux distributions built for WSL, you can use the <code>wsl --list --online</code> command from an elevated command prompt to enumerate the list of available distributions for your system. You can have multiple Linux distributions installed within WSL and they will happily coexist side-by-side, so don’t be scared to experiment and try things out. Now let’s install and try some apps</p><h2 id="Install-and-run-GUI-apps">Install and run GUI apps</h2><p>If you want to get started with some GUI apps, you can run the following commands from your Linux terminal to download and install some popular applications. If you are using a different distribution than Ubuntu, it may be using a different package manager.</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br></pre></td><td class="code"><pre><span class="line">## Update all packages in your distro</span><br><span class="line">sudo apt update</span><br><span class="line"></span><br><span class="line">## Gedit</span><br><span class="line">sudo apt install gedit -y</span><br><span class="line"></span><br><span class="line">## GIMP</span><br><span class="line">sudo apt install gimp -y</span><br><span class="line"></span><br><span class="line">## Nautilus</span><br><span class="line">sudo apt install nautilus -y</span><br><span class="line"></span><br><span class="line">## VLC</span><br><span class="line">sudo apt install vlc -y</span><br><span class="line"></span><br><span class="line">## X11 apps</span><br><span class="line">sudo apt install x11-apps -y</span><br><span class="line"></span><br><span class="line">## Google Chrome</span><br><span class="line">cd /tmp</span><br><span class="line">sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb</span><br><span class="line">sudo dpkg -i google-chrome-stable_current_amd64.deb </span><br><span class="line">sudo apt install --fix-broken -y</span><br><span class="line">sudo dpkg -i google-chrome-stable_current_amd64.deb</span><br><span class="line"></span><br><span class="line">## Microsoft Teams</span><br><span class="line">cd /tmp</span><br><span class="line">sudo curl -L -o &quot;./teams.deb&quot; &quot;https://teams.microsoft.com/downloads/desktopurl?env=production&amp;plat=linux&amp;arch=x64&amp;download=true&amp;linuxArchiveType=deb&quot;</span><br><span class="line">sudo apt install ./teams.deb -y</span><br><span class="line"></span><br><span class="line">## Microsoft Edge Browser</span><br><span class="line">sudo curl https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-dev/microsoft-edge-dev_91.0.852.0-1_amd64.deb -o /tmp/edge.deb</span><br><span class="line">sudo apt install /tmp/edge.deb -y</span><br></pre></td></tr></table></figure><p>Once these applications are installed, you’ll find them in your start menu under the distro name. For example <code>Ubuntu -&gt; Microsoft Edge</code>. You can also launch these from your terminal window using the commands:</p><ul><li><code>xcalc</code>, <code>xclock</code>, <code>xeyes</code></li><li><code>gimp</code></li><li><code>gedit ~/.bashrc</code></li><li><code>nautilus</code></li><li><code>vlc</code></li><li><code>google-chrome</code></li><li><code>teams</code></li><li><code>microsoft-edge</code></li></ul><p><strong>Congrats you are done and ready to use GUI apps!</strong></p>]]></content>
    
    
    <summary type="html">WSLg is short for Windows Subsystem for Linux GUI and the purpose of the project is to enable support for running Linux GUI applications (X11 and Wayland) on Windows in a fully integrated desktop experience.</summary>
    
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/categories/linux/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="ubuntu" scheme="https://mistrysiddh.com/tags/ubuntu/"/>
    
    <category term="wsl" scheme="https://mistrysiddh.com/tags/wsl/"/>
    
    <category term="wsl2" scheme="https://mistrysiddh.com/tags/wsl2/"/>
    
  </entry>
  
  <entry>
    <title>WSL Install</title>
    <link href="https://mistrysiddh.com/2021/06/15/WSL2Install/"/>
    <id>https://mistrysiddh.com/2021/06/15/WSL2Install/</id>
    <published>2021-06-15T06:31:11.000Z</published>
    <updated>2026-07-24T14:33:54.391Z</updated>
    
    <content type="html"><![CDATA[<p><img src="/images/posts/wsl2.png" alt="WSL2"></p><h2 id="What-is-WSL">What is WSL?</h2><p>The Windows Subsystem for Linux lets developers(WSL) run a GNU/Linux environment – including most command-line tools, utilities, and applications – directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual-boot setup.<br>You can:</p><ul><li>Choose your favorite GNU/Linux distributions from the <a href="https://aka.ms/wslstore">Microsoft Store</a>.</li><li>Run common command-line tools such as grep, sed, awk, or other ELF-64 binaries.</li><li>Run Bash shell scripts and GNU/Linux command-line applications including:<ul><li>Tools: vim, emacs, tmux</li><li>Languages: NodeJS, Javascript, Python, Ruby, C/C++, C## &amp; F##, Rust, Go, etc.</li><li>Services: SSHD, MySQL, Apache, Lighttpd, MongoDB, PostgreSQL.</li></ul></li><li>Install additional software using your own GNU/Linux distribution package manager.</li><li>Invoke Windows applications using a Unix-like command-line shell.</li><li>Invoke GNU/Linux applications on Windows.</li></ul><h2 id="What-is-WSL-2">What is WSL 2?</h2><p>WSL 2 is a new version of the Windows Subsystem for Linux architecture that powers the Windows Subsystem for Linux to run ELF64 Linux binaries on Windows. Its primary goals are to increase file system performance, as well as adding full system call compatibility.</p><p>This new architecture changes how these Linux binaries interact with Windows and your computer’s hardware, but still provides the same user experience as in WSL 1 (the current widely available version).</p><p>Individual Linux distributions can be run with either the WSL 1 or WSL 2 architecture. Each distribution can be upgraded or downgraded at any time and you can run WSL 1 and WSL 2 distributions side by side. WSL 2 uses an entirely new architecture that benefits from running a real Linux kernel. Let’s see the comparison between <code>WSL 1</code> and <code>WSL 2</code></p><h2 id="Comparing-WSL-1-and-WSL-2">Comparing WSL 1 and WSL 2</h2><p>The primary difference and reasons for updating the Windows Subsystem for Linux from WSL 1 to WSL 2 are to:</p><ul><li>increase file system performance,</li><li>support full system call compatibility.<br>WSL 2 uses the latest and greatest in virtualization technology to run a Linux kernel inside of a lightweight utility virtual machine (VM). However, WSL 2 is not a traditional VM experience.</li></ul><h3 id="Comparing-features">Comparing features</h3><table><thead><tr><th>Feature</th><th>WSL 1</th><th>WSL 2</th></tr></thead><tbody><tr><td>Integration between Windows and Linux</td><td>✅</td><td>✅</td></tr><tr><td>Fast boot times</td><td>✅</td><td>✅</td></tr><tr><td>Small resource foot print compared to traditional Virtual Machines</td><td>✅</td><td>✅</td></tr><tr><td>Runs with current versions of VMware and VirtualBox</td><td>✅</td><td>✅</td></tr><tr><td>Managed VM</td><td>❌</td><td>✅</td></tr><tr><td>Full Linux Kernel</td><td>❌</td><td>✅</td></tr><tr><td>Full system call compatibility</td><td>❌</td><td>✅</td></tr><tr><td>Performance across OS file systems</td><td>✅</td><td>❌</td></tr></tbody></table><h2 id="Performance-across-OS-file-systems">Performance across OS file systems</h2><p>We recommend against working across operating systems with your files, unless you have a specific reason for doing so. For the fastest performance speed, store your files in the WSL file system if you are working in a Linux command line (Ubuntu, OpenSUSE, etc). If you’re working in a Windows command line (PowerShell, Command Prompt), store your files in the Windows file system.</p><p>For example, when storing your WSL project files:</p><ul><li>Use the Linux file system root directory: <code>\\wsl$\Ubuntu-18.04\home\&lt;user name&gt;\Project</code></li><li>Not the Windows file system root directory: <code>C:\Users\&lt;user name&gt;\Project</code></li></ul><p>All currently running distributions (<code>wsl -l</code>) are accessible via network connection. To get there run a command [WIN+R] (keyboard shortcut) or type in File Explorer address bar <code>\\wsl$</code> to find respective distribution names and access their root file systems.</p><p>You can also use windows commands inside WSL’s Linux <a href="https://en.wikipedia.org/wiki/Linux_console">Terminal</a>. Try opening a Linux distribution (ie Ubuntu), be sure that you are in the Linux home directory by entering this command: <code>cd ~</code>. Then open your Linux file system in File Explorer by entering <em>(don’t forget the period at the end)</em>: <code>powershell.exe /c start .</code></p><p>WSL 2 is only available in Windows 10, Version 1903, Build 18362 or higher. Check your Windows version by selecting the <strong>Windows logo key + R</strong>, type <strong>winver</strong>, select <strong>OK</strong>. (Or enter the <code>ver</code> command in Windows Command Prompt). You may need to <a href="ms-settings:windowsupdate">update to the latest Windows version</a>. For builds lower than 18362, WSL is not supported at all.</p><h2 id="Installation-of-WSL-2">Installation of WSL 2</h2><p>There are two options available for installing Windows Subsystem for Linux (WSL):</p><ul><li><p><strong><a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10#simplified-installation-for-windows-insiders">Simplified install</a></strong> <em>(preview release)</em>: <code>wsl --install</code></p><p>The <code>wsl --install</code> simplified install command requires that you join the <a href="https://insider.windows.com/getting-started">Windows Insiders Program</a> and install a preview build of Windows 10 (OS build 20262 or higher), but eliminates the need to follow the manual install steps. All you need to do is open a command window with administrator privileges and run <code>wsl --install</code>, after a restart you will be ready to use WSL.</p></li></ul><h3 id="Manual-Installation-Steps">Manual Installation Steps</h3><p>If you are not on a Windows Insiders build, the features required for WSL will need to be enabled manually following the steps below.</p><ul><li><h4 id="Step-1-Enable-the-Windows-Subsystem-for-Linux">Step 1 - Enable the Windows Subsystem for Linux</h4></li></ul><p>You must first enable the “Windows Subsystem for Linux” optional feature before installing any Linux distributions on Windows.</p><p>Open PowerShell as Administrator and run:</p><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">dism.exe /online /<span class="built_in">enable-feature</span> /featurename:Microsoft<span class="literal">-Windows-Subsystem-Linux</span> /all /norestart</span><br></pre></td></tr></table></figure><ul><li><h4 id="Step-2-Check-requirements-for-running-WSL-2">Step 2 - Check requirements for running WSL 2</h4></li></ul><p>To update to WSL 2, you must be running Windows 10.</p><ul><li>For x64 systems: <strong>Version 1903</strong> or higher, with <strong>Build 18362</strong> or higher.</li><li>For ARM64 systems: <strong>Version 2004</strong> or higher, with <strong>Build 19041</strong> or higher.</li><li>Builds lower than 18362 do not support WSL 2. Use the <a href="https://www.microsoft.com/software-download/windows10">Windows Update Assistant</a> to update your version of Windows.</li></ul><p>If you are running Windows 10 version 1903 or 1909, open “Settings” from your Windows menu, navigate to “Update &amp; Security” and select “Check for Updates”. Your Build number must be 18362.1049+ or 18363.1049+, with the minor build # over .1049. Read more: <a href="https://devblogs.microsoft.com/commandline/wsl-2-support-is-coming-to-windows-10-versions-1903-and-1909/">WSL 2 Support is coming to Windows 10 Versions 1903 and 1909</a>. See the <a href="https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#im-on-windows-10-version-1903-and-i-still-do-not-see-options-for-wsl-2">troubleshooting instructions</a>.</p><ul><li><h3 id="Step-3-Enable-Virtual-Machine-feature">Step 3 - Enable Virtual Machine feature</h3></li></ul><p>Before installing WSL 2, you must enable the <strong>Virtual Machine Platform</strong> optional feature. Your machine will require <a href="https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#error-0x80370102-the-virtual-machine-could-not-be-started-because-a-required-feature-is-not-installed">virtualization capabilities</a> to use this feature.</p><p>Open PowerShell as Administrator and run:</p><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">dism.exe /online /<span class="built_in">enable-feature</span> /featurename:VirtualMachinePlatform /all /norestart</span><br></pre></td></tr></table></figure><p><strong>Restart</strong> your machine to complete the WSL install and update to WSL 2.</p><ul><li><h3 id="Step-4-Download-the-Linux-kernel-update-package">Step 4 - Download the Linux kernel update package</h3></li></ul><p>Download the latest package:</p><ul><li><a href="https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi">WSL2 Linux kernel update package for x64 machines</a></li></ul><p>If you’re using an ARM64 machine, please download the <a href="https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_arm64.msi">ARM64 package</a> instead. If you’re not sure what kind of machine you have, open Command Prompt or PowerShell and enter: <code>systeminfo | find &quot;System Type&quot;</code>. <strong>Caveat:</strong> On non-English Windows versions, you might have to modify the search text, for example, in German it would be <code>systeminfo | find &quot;Systemtyp&quot;</code>.</p><ul><li><p>Run the update package downloaded in the previous step. (Double-click to run - you will be prompted for elevated permissions, select ‘yes’ to approve this installation.)</p></li><li><h4 id="Step-5-Set-WSL-2-as-your-default-version">Step 5 - Set WSL 2 as your default version</h4></li></ul><p>Open PowerShell and run this command to set WSL 2 as the default version when installing a new Linux distribution:</p><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wsl <span class="literal">--set-default-version</span> <span class="number">2</span></span><br></pre></td></tr></table></figure><ul><li><h4 id="Step-6-Install-your-Linux-distribution-of-choice">Step 6 - Install your Linux distribution of choice</h4></li></ul><ol><li>manual installation</li></ol><p>If you are on <code>Windows 10 Insider Preview build 21362+</code> then just type the following commands in powershell</p><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#this command will show you list of all distribution which is been supported by windows</span></span><br><span class="line">wsl <span class="literal">--list</span> <span class="literal">--online</span></span><br></pre></td></tr></table></figure><p>as soon as paste the above command you will get this message there</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">PS C:\Users\SIDDH&gt; wsl --list --online</span><br><span class="line">The following is a list of valid distributions that can be installed.</span><br><span class="line">Install using &#x27;wsl --install -d &lt;Distro&gt;&#x27;.</span><br><span class="line"></span><br><span class="line">NAME            FRIENDLY NAME</span><br><span class="line">Ubuntu          Ubuntu</span><br><span class="line">Debian          Debian GNU/Linux</span><br><span class="line">kali-linux      Kali Linux Rolling</span><br><span class="line">openSUSE-42     openSUSE Leap 42</span><br><span class="line">SLES-12         SUSE Linux Enterprise Server v12</span><br><span class="line">Ubuntu-16.04    Ubuntu 16.04 LTS</span><br><span class="line">Ubuntu-18.04    Ubuntu 18.04 LTS</span><br><span class="line">Ubuntu-20.04    Ubuntu 20.04 LTS</span><br></pre></td></tr></table></figure><p>you can choose any of the distro you want to install in your system say for example if you want to install Ubuntu then just past the following command</p><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wsl <span class="literal">--install</span> <span class="literal">-d</span> ubuntu</span><br></pre></td></tr></table></figure><p>and it will start installing into your system after completion it will ask you for a username and password set those two parameters and you will be able to use Ubuntu in your system without dual-boot</p><p><img src="https://docs.microsoft.com/en-us/windows/wsl/media/ubuntuinstall.png" alt="Ubuntu Install"></p><ol start="2"><li>Open the <a href="https://aka.ms/wslstore">Microsoft Store</a> and select your favorite Linux distribution.</li></ol><p><img src="https://docs.microsoft.com/en-us/windows/wsl/media/store.png" alt="Microsoft Store"></p><p>The following links will open the Microsoft store page for each distribution:</p><ul><li><p><a href="https://www.microsoft.com/store/apps/9N9TNGVNDL3Q">Ubuntu 18.04 LTS</a></p></li><li><p><a href="https://www.microsoft.com/store/apps/9n6svws3rx71">Ubuntu 20.04 LTS</a></p></li><li><p><a href="https://www.microsoft.com/store/apps/9NJFZK00FGKV">openSUSE Leap 15.1</a></p></li><li><p><a href="https://www.microsoft.com/store/apps/9MZ3D1TRP8T1">SUSE Linux Enterprise Server 12 SP5</a></p></li><li><p><a href="https://www.microsoft.com/store/apps/9PN498VPMF3Z">SUSE Linux Enterprise Server 15 SP1</a></p></li><li><p><a href="https://www.microsoft.com/store/apps/9PKR34TNCV07">Kali Linux</a></p></li><li><p><a href="https://www.microsoft.com/store/apps/9MSVKQC78PK6">Debian GNU/Linux</a></p></li><li><p><a href="https://www.microsoft.com/store/apps/9n6gdm4k2hnc">Fedora Remix for WSL</a></p></li><li><p><a href="https://www.microsoft.com/store/apps/9NV1GV1PXZ6P">Pengwin</a></p></li><li><p><a href="https://www.microsoft.com/store/apps/9N8LP0X93VCP">Pengwin Enterprise</a></p></li><li><p><a href="https://www.microsoft.com/store/apps/9p804crf0395">Alpine WSL</a></p></li><li><h4 id="Install-Windows-Terminal-optional">Install Windows Terminal (optional)</h4></li></ul><p>Windows Terminal enables multiple tabs (quickly switch between multiple Linux command lines, Windows Command Prompt, PowerShell, Azure CLI, etc), create custom key bindings (shortcut keys for opening or closing tabs, copy+paste, etc.), use the search feature, and custom themes (color schemes, font styles and sizes, background image/blur/transparency).</p><p><a href="https://docs.microsoft.com/en-us/windows/terminal/get-started">Install Windows Terminal</a>.</p><p><img src="https://docs.microsoft.com/en-us/windows/wsl/media/terminal.png" alt="Windows Terminal"></p><p>Now you can use linux as well as windows at a same time. In next post we will be seeing how to GUI app in WSL2.</p>]]></content>
    
    
    <summary type="html">The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual-boot setup.</summary>
    
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/categories/linux/"/>
    
    
    <category term="Linux" scheme="https://mistrysiddh.com/tags/Linux/"/>
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="ubuntu" scheme="https://mistrysiddh.com/tags/ubuntu/"/>
    
    <category term="wsl" scheme="https://mistrysiddh.com/tags/wsl/"/>
    
    <category term="wsl2" scheme="https://mistrysiddh.com/tags/wsl2/"/>
    
  </entry>
  
  <entry>
    <title>Nanotechnology</title>
    <link href="https://mistrysiddh.com/2021/04/20/Nanotechnology/"/>
    <id>https://mistrysiddh.com/2021/04/20/Nanotechnology/</id>
    <published>2021-04-20T15:13:49.000Z</published>
    <updated>2026-07-24T14:33:54.389Z</updated>
    
    <content type="html"><![CDATA[<h2 id="What-is-Nanotechnology">What is Nanotechnology?</h2><p><img src="/images/posts/nanotechnology.jpg" alt="NanoTechnology"></p><p>Nanotechnology is science, engineering, and technology conducted at the nanoscale, which is about 1 to 100 nanometers. Nanoscience and nanotechnology are the study and application of extremely small things and can be used across all the other science fields, such as chemistry, biology, physics, materials science, and engineering. It is the leading technology in the world where all the material are been made on the nanoscale level, you must have not been noticed that <code>Microcontroller</code> which we are using in our circuits and much more applications are been made up to the nanoscale level which is called <code>VLSI</code> Very Large Scale Integration. Nanotechnology is also called nanotech.</p><h2 id="Origins">Origins</h2><p><sup>Wikipidia</sup> The concepts that seeded nanotechnology were first discussed in 1959 by renowned physicist <code>Richard Feynman</code> in his talk <code>There's Plenty of Room at the Bottom</code>, in which he described the possibility of synthesis via direct manipulation of atoms.</p><p>The term <code>Nanotechnology</code> was first used by <code>Norio Taniguchi</code> in <code>1974</code>, though it was not widely known. Inspired by Feynman’s concepts, <code>K. Eric Drexler</code> used the term <code>nanotechnology</code> in his 1986 book <a href="https://www.pdfdrive.com/engines-of-creation-20-the-coming-era-of-nanotechnology-e158355030.html">Engines of Creation: The Comming Era of Nanotechnology</a> which proposed the idea of a nanoscale “assembler” which would be able to build a copy of itself and the items of arbitrary complexity with atomic control. It’s also been said that nanotechnology will be able to perform AI level operation which will help to eradicate those diseases which humans can’t remove it, say for example <code>AIDS</code>, <code>Radioactive materials</code> from the body, also this <code>CoronaVirus</code> from current pandemic year.</p><h3 id="Fundamental-Concepts">Fundamental Concepts</h3><p>Nanotechnology is the engineering of functional systems at the molecular scale. This covers both current work and concepts that are more advanced. In its original sense, nanotechnology refers to the projected ability to construct items from the bottom up, using techniques and tools being developed today to make complete, high performance products.</p><p>One nanometer (nm) is one billionth, or 10−9, of a meter. By comparison, typical carbon-carbon bond lengths, or the spacing between these atoms in a molecule, are in the range 0.12–0.15 nm, and a DNA double-helix has a diameter around 2 nm. On the other hand, the smallest cellular life-forms, the bacteria of the genus Mycoplasma, are around 200 nm in length. By convention, nanotechnology is taken as the scale range 1 to 100 nm following the definition used by the National Nanotechnology Initiative in the US. The lower limit is set by the size of atoms (hydrogen has the smallest atoms, which are approximately a quarter of a nm kinetic diameter) since nanotechnology must build its devices from atoms and molecules. The upper limit is more or less arbitrary but is around the size below which phenomena not observed in larger structures start to become apparent and can be made use of in the nano device.[26] These new phenomena make nanotechnology distinct from devices which are merely miniaturised versions of an equivalent macroscopic device; such devices are on a larger scale and come under the description of microtechnology.[27]</p><p>To put that scale in another context, the comparative size of a nanometer to a meter is the same as that of a marble to the size of the earth.[28] Or another way of putting it: a nanometer is the amount an average man’s beard grows in the time it takes him to raise the razor to his face.[28]</p><p>Two main approaches are used in nanotechnology. In the “bottom-up” approach, materials and devices are built from molecular components which assemble themselves chemically by principles of molecular recognition.[29] In the “top-down” approach, nano-objects are constructed from larger entities without atomic-level control.[30]</p><p>Areas of physics such as nanoelectronics, nanomechanics, nanophotonics and nanoionics have evolved during the last few decades to provide a basic scientific foundation of nanotechnology.</p><h3 id="Current-research">Current research</h3><h4 id="Nanomaterials">Nanomaterials</h4><p>The nanomaterials field includes subfields which develop or study materials having unique properties arising from their nanoscale dimensions.</p><ul><li>Interface and colloid science has given rise to many materials which may be useful in nanotechnology, such as carbon nanotubes and other fullerenes, and various nanoparticles and nanorods. Nanomaterials with fast ion transport are related also to nanoionics and nanoelectronics.</li><li>Nanoscale materials can also be used for bulk applications; most present commercial applications of nanotechnology are of this flavor.</li><li>Progress has been made in using these materials for medical applications; see Nanomedicine.</li><li>Nanoscale materials such as nanopillars are sometimes used in solar cells which combats the cost of traditional silicon solar cells</li><li>Development of applications incorporating semiconductor nanoparticles to be used in the next generation of products, such as display technology, lighting, solar cells and biological imaging; see quantum dots.</li><li>Recent application of nanomaterials include a range of biomedical applications, such as tissue engineering, drug delivery, antibacterials and biosensors.</li></ul><h3 id="Research-and-development">Research and development</h3><p>Because of the variety of potential applications (including industrial and military), governments have invested billions of dollars in nanotechnology research. Prior to 2012, the USA invested $3.7 billion using its National Nanotechnology Initiative, the European Union invested $1.2 billion, and Japan invested $750 million. Over sixty countries created nanotechnology research and development (R&amp;D) programs between 2001 and 2004. In 2012, the US and EU each invested $2.1 billion on nanotechnology research, followed by Japan with $1.2 billion. Global investment reached $7.9 billion in 2012. Government funding was exceeded by corporate R&amp;D spending on nanotechnology research, which was $10 billion in 2012. The largest corporate R&amp;D spenders were from the US, Japan and Germany which accounted for a combined $7.1 billion.</p><table><thead><tr><th>Rank</th><th>Organization</th><th>Country</th><th>First Patents</th></tr></thead><tbody><tr><td>1</td><td>Samsung Electronics</td><td>South Korea</td><td>2578</td></tr><tr><td>2</td><td>Nippon Steel &amp; Sumitomo Metal</td><td>Japan</td><td>1490</td></tr><tr><td>3</td><td>IBM</td><td>United States</td><td>1360</td></tr><tr><td>4</td><td>Toshiba</td><td>Japan</td><td>1298</td></tr><tr><td>5</td><td>Canon Inc.</td><td>Japan</td><td>1162</td></tr><tr><td>6</td><td>Hitachi</td><td>Japan</td><td>1100</td></tr><tr><td>7</td><td>University of California, Berkeley</td><td>United States</td><td>1055</td></tr><tr><td>8</td><td>Panasonic</td><td>Japan</td><td>1047</td></tr><tr><td>9</td><td>Hewlett-Packard</td><td>United States</td><td>880</td></tr><tr><td>10</td><td>TDK</td><td>Japan</td><td>839</td></tr></tbody></table>]]></content>
    
    
    <summary type="html">Nanotechnology, also shortened to nanotech, is the use of matter on an atomic, molecular, and supramolecular scale for industrial purposes. The earliest, widespread description of nanotechnology referred to the particular technological goal of precisely manipulating atoms and molecules for fabrication of macroscale products, also now referred to as molecular nanotechnology.</summary>
    
    
    
    <category term="Automation" scheme="https://mistrysiddh.com/categories/automation/"/>
    
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="industrial automation" scheme="https://mistrysiddh.com/tags/industrial-automation/"/>
    
    <category term="robotics" scheme="https://mistrysiddh.com/tags/robotics/"/>
    
  </entry>
  
  <entry>
    <title>Robotics</title>
    <link href="https://mistrysiddh.com/2021/04/13/Robotics/"/>
    <id>https://mistrysiddh.com/2021/04/13/Robotics/</id>
    <published>2021-04-13T09:32:14.000Z</published>
    <updated>2026-07-24T14:33:54.390Z</updated>
    
    <content type="html"><![CDATA[<p><img src="/images/posts/robotics.jpg" alt="Robotics"></p><h2 id="Robotics">Robotics</h2><p>Robotics is the intersection of science, engineering and technology that produces machines, called robots, that substitute for (or replicate) human actions. As you have seen in the movie such as I robot, wall-e, Transformer etc. where robots are been there. As time passes technology also evolves not also that it gets smatter and smatter also.</p><h3 id="What-is-a-Robot">What is a Robot?</h3><p><img src="/images/posts/robotic-arm.jpg" alt="Robotic Arm"><br>A robot is the product of the robotics field, where programmable machines are built that can assist humans or mimic human actions. Robots were originally built to handle monotonous tasks (like building cars on an assembly line), but have since expanded well beyond their initial uses to perform tasks like fighting fires, cleaning homes and assisting with incredibly intricate surgeries. Each robot has a differing level of autonomy, ranging from human-controlled bots that carry out tasks that a human has full control over to fully-autonomous bots that perform tasks without any external influences.</p><h3 id="Characteristics">Characteristics</h3><p><img src="/images/posts/robot.jpg" alt="Robot Characteristics"></p><ol><li>Robots all consist of some sort of mechanical construction. The mechanical aspect of a robot helps it complete tasks in the environment for which it’s designed. For example, the Mars 2020 Rover’s wheels are individually motorized and made of titanium tubing that help it firmly grip the harsh terrain of the red planet.</li><li>Robots need electrical components that control and power the machinery. Essentially, an electric current (a battery, for example) is needed to power a large majority of robots.</li><li>Robots contain at least some level of computer programming. Without a set of code telling it what to do, a robot would just be another piece of simple machinery. Inserting a program into a robot gives it the ability to know when and how to carry out a task.</li></ol><p>Robots all consist of some sort of mechanical construction. The mechanical aspect of a robot helps it complete tasks in the environment for which it’s designed. For example, the Mars 2020 Rover’s wheels are individually motorized and made of titanium tubing that help it firmly grip the harsh terrain of the red planet.<br>Robots need electrical components that control and power the machinery. Essentially, an electric current (a battery, for example) is needed to power a large majority of robots.<br>Robots contain at least some level of computer programming. Without a set of code telling it what to do, a robot would just be another piece of simple machinery. Inserting a program into a robot gives it the ability to know when and how to carry out a task.</p><h3 id="Utilization-of-Robotics">Utilization of Robotics</h3><p>According to the International Federation of Robotics, 1.3 million industrial robots will be in use by 2018. Robotics continues to emerge as a large and influential market.</p><p>The following five industries are utilizing this new technology to boost efficiency and convenience for both businesses and consumers.</p><h4 id="1-Health-Care">1. Health Care</h4><p><img src="/images/posts/surgical-robot.jpg" alt="Surgical Robot"><br>Advances in robotics have the potential to change a wide variety of health care practices, such as surgery, rehabilitation, therapy, patient companionship, and everyday activities. Robotic instruments used in health care are not designed to take over the duties of health care professionals, but rather to make their work easier.</p><p>The da Vinci Surgical System, for example, utilizes the hand movements of the operating surgeon to control tiny, precise instruments inside the patient’s body. This allows for minimally invasive procedures in surgeries such as cardiac, colorectal, gynecologic, head and neck, thoracic, and urologic.</p><p>For patients who have suffered strokes or spinal cord injuries, or who are paralyzed, robotic devices such as exoskeletons have the ability to assist and guide them during rehabilitation. In addition, robotic lifting machines can help nurses lift patients who are elderly or immobile. Companion and therapeutic robots such as Paro can also comfort patients with mental health issues with a system of sensors, microphones, and cameras.</p><h4 id="2-Agriculture">2. Agriculture</h4><p><img src="/images/posts/farm-robots.jpg" alt="Farm Robots"><br>To help increase productivity while lowering overall costs, the agriculture industry has been actively working to adopt different forms of robotic technology. Farmers have already been using tractors and harvesters that are self-guided by GPS. Recently, there has been a rise in the experimental use of autonomous systems that automate operations like pruning, thinning, mowing, spraying, and weed removal. Sensor technology is also being utilized to manage pests and diseases that affect crops.</p><h4 id="3-Food-Preparation">3. Food Preparation</h4><p><img src="/images/posts/food-robots.jpg" alt="Food line robot"><br>One of the more extravagant advancements in robot technology will soon be available in the kitchen. Automated and intelligent robots — such as those invented by Moley Robotics — will be able to prepare and cook hundreds of meals in a home kitchen. This robotic chef will be controlled via a smartphone, and once the controller chooses a recipe and arranges pre-packaged containers of cut and prepared ingredients, the robot will be able to cook the predetermined meal quickly and efficiently. Moley Robotics is also developing a consumer-friendly version of a robot kitchen, which will include a built-in smart dishwasher and refrigerator.</p><h4 id="4-Manufacturing">4. Manufacturing</h4><p><img src="/images/posts/industrial-robot.jpg" alt="Manufacturing"><br>Robotics are being used in many aspects of manufacturing to help increase productivity and efficiency while lowering production costs. Similar to the health care industry, many robots in manufacturing collaborate with workers to perform repetitive, monotonous, or intricate tasks under the worker’s guidance and control. With these machines, precision is valued more than speed, as is the ability to be reprogrammed for specific tasks of different sizes and complexities. Robotic manufacturing technology is also becoming safer to operate. Cameras, sensors, and automatic shut-off capabilities enable robots to sense and stay clear of humans in the workplace.</p><h4 id="5-Military">5. Military</h4><p><img src="/images/posts/ArmyGroundRobot.jpg" alt="Army Ground Robot"><br>In the military and public safety sectors, robotic technology is being applied in many areas. One highly visible area involves unmanned drones. These machines can be used for surveillance and support operations on the battlefield. Military drones flying over areas of war and conflict, in hostage situations, and for natural and manmade disasters are able to assess danger levels and provide soldiers and first responders with real-time information. Drones are revolutionizing disaster response since they can access hazardous areas with greater speed and precision without placing human responders in harm’s way.</p><p>Robotic devices are already establishing a wide presence in several commercial industries. As robotic technologies become more affordable, they will soon be available in various forms for consumers as well, with the ability to impact our lives in countless ways.</p><h3 id="Pros-Cons">Pros &amp;&amp; Cons</h3><h4 id="Pros">Pros</h4><ol><li><p>The first and the foremost advantage of having robots in workplaces is their cost. Robots are much cheaper than humans and their cost is now decreasing.</p></li><li><p>It’s a fact that we cannot compare human abilities with robots but robotic capabilities are now growing quickly. For example, if you run an essay writing service, you can use robots to perform every kind of research related to any subject.</p></li><li><p>Because robots are more active and don’t get tired like humans, the collaboration between humans and robots is reducing absenteeism. The pace of human cannot increase hence robots are helping humans.</p></li><li><p>Robots are more precise than humans; they don’t tremble or shake as human hands. Robots have smaller and versatile moving parts which help them in performing tasks with more accuracy than humans.</p></li><li><p>There is no doubt that robots are significantly stronger and faster than humans.</p></li><li><p>Robots come in any shape and size, depending upon the need of the task.</p></li><li><p>Robots can work anywhere in any environmental condition whether it is space, underwater, in extreme heat or wind etc. Robots can be used everywhere where human safety is a huge concern.</p></li><li><p>Robots are programmed by a human; they cannot say no to anything and can be used for any dangerous and unwanted work where humans may deny to offer their services. For example, many robotic probes have been sent into space but have never returned.</p></li><li><p>Robots in warfare are saving more lives and have now proven to be very successful.</p></li><li><p>Robots are now being used in the chemical industry and can, for example deal with chemical spills in a nuclear plant, which would otherwise pose a major health concern.</p></li><li><p>The best thing about robots is that they never get tired and can literally work on certain tasks 24 x 7. The human brain gets tired if it’s working continuously but robots never get tired of what they are programmed to do and they can work on certain tasks error free.</p></li></ol><h4 id="Cons">Cons</h4><ol><li><p>Where robots are increasing the efficiency in many businesses, they are also increasing the unemployment rate. Because of robots, human labour is no longer required in many factories and manufacturing plants.</p></li><li><p>Robots can certainly handle their prescribed tasks, but they typically cannot handle unexpected situations.</p></li><li><p>The ROI of your business may suffer if your operation relies on too many robots. They have higher expenses than humans, so at the end of the day you may not always achieve the desired ROI.</p></li><li><p>Robots may have AI but they are certainly not as intelligent as humans. They can never improve their jobs outside the pre-defined programming because they simply cannot think for themselves.</p></li><li><p>Robots installed in workplaces still require manual labour attached to them. Training those employees on how to work with the robots definitely has a cost attached to it.</p></li><li><p>Robots have no sense of emotions or conscience. They lack empathy and this is one major disadvantage of having an emotionless workplace.</p></li><li><p>Robots operate on the basis of information fed to them through a chip. If one thing goes wrong the entire company bears the loss.</p></li></ol><p>Where a robot saves times, on the other hand it can also result in a lag. It is, after all, a machine so you cannot expect too much from them. If a robot malfunctions, you need extra time to fix it, which would require reprogramming.</p><p>If ultimately robots would do all the work, and the humans will just sit and monitor them, health hazards will increase rapidly. Obesity will be on top of the list.</p><p>So there are advantages, but there are disadvantages as well. It is the twenty first century and we cannot work without machines.</p><p>Humans are still considered far more efficient than robots when it comes to decision making powers, handling difficult situations, brainstorming, and generally bringing a sense of emotion and empathy into a workplace.</p>]]></content>
    
    
    <summary type="html">Robotics is the intersection of science, engineering and technology that produces machines, called robots, that substitute for (or replicate) human actions.  WALL-E. These over-exaggerated, humanoid concepts of robots usually seem like a caricature of the real thing...or are they more forward thinking than we realize? Robots are gaining intellectual and mechanical capabilities that don’t put the possibility of a R2-D2-like machine out of reach in the future.</summary>
    
    
    
    <category term="Automation" scheme="https://mistrysiddh.com/categories/automation/"/>
    
    
    <category term="technology" scheme="https://mistrysiddh.com/tags/technology/"/>
    
    <category term="industrial automation" scheme="https://mistrysiddh.com/tags/industrial-automation/"/>
    
    <category term="robotics" scheme="https://mistrysiddh.com/tags/robotics/"/>
    
    <category term="factory automation" scheme="https://mistrysiddh.com/tags/factory-automation/"/>
    
  </entry>
  
</feed>
