<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ajay Ratnam</title>
    <description>The latest articles on DEV Community by Ajay Ratnam (@ajratnam).</description>
    <link>https://dev.to/ajratnam</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F728206%2F27dc4a31-ea34-4ced-a938-fbacb8a445d9.jpeg</url>
      <title>DEV Community: Ajay Ratnam</title>
      <link>https://dev.to/ajratnam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ajratnam"/>
    <language>en</language>
    <item>
      <title>Windows Subsystem For Linux</title>
      <dc:creator>Ajay Ratnam</dc:creator>
      <pubDate>Sat, 10 Dec 2022 18:28:10 +0000</pubDate>
      <link>https://dev.to/ajratnam/windows-subsystem-for-linux-5eo6</link>
      <guid>https://dev.to/ajratnam/windows-subsystem-for-linux-5eo6</guid>
      <description>&lt;h2&gt;
  
  
  Windows
&lt;/h2&gt;

&lt;p&gt;There are different types of &lt;strong&gt;Operating Systems (OS)&lt;/strong&gt;, however the most popular and commonly used OS after android is &lt;strong&gt;Windows&lt;/strong&gt;. Windows dominates the industry because of its &lt;strong&gt;simplicity&lt;/strong&gt;, &lt;strong&gt;user-friendly&lt;/strong&gt; nature and its modern &lt;strong&gt;Graphical User Interface (GUI)&lt;/strong&gt;. This makes it more &lt;strong&gt;versatile&lt;/strong&gt; and powerful because it is packed with a ton of &lt;strong&gt;preinstalled&lt;/strong&gt; tools that helps the users in their day-to-day activities. It has everything that an average user would do. But with all its salient features, it comes with a price and since windows is the most dominating OS in the global market, many hackers try to find &lt;strong&gt;vulnerabilities&lt;/strong&gt; and try to &lt;strong&gt;exploit&lt;/strong&gt; them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Linux
&lt;/h2&gt;

&lt;p&gt;Other than windows there exists another OS called &lt;strong&gt;Linux&lt;/strong&gt;. Linux is an &lt;strong&gt;Open-Source OS&lt;/strong&gt; meaning that the entire code for the kernel is available online and it can be viewed and installed for &lt;strong&gt;free&lt;/strong&gt;. Additionally, there is a wide community that contributes towards its &lt;strong&gt;development&lt;/strong&gt;, &lt;strong&gt;testing&lt;/strong&gt; and &lt;strong&gt;debugging&lt;/strong&gt;. So that any vulnerabilities are fixed as soon as they are released. Moreover, Linux is just like a &lt;strong&gt;Do It Yourself (DIY)&lt;/strong&gt; kit. When one say’s they use Linux, they just don’t go and directly use Linux, they use a customized version of it, or what it is commonly referred as &lt;strong&gt;distro&lt;/strong&gt; or &lt;strong&gt;distribution&lt;/strong&gt; that is built upon the Linux kernel.&lt;/p&gt;

&lt;h3&gt;
  
  
  Different distributions of Linux
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8XDHpP-N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6leunjk5h6sob5g5hejm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8XDHpP-N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6leunjk5h6sob5g5hejm.png" alt="The different distributions of Linux, each is made for its own purpose." width="880" height="266"&gt;&lt;/a&gt;&lt;/p&gt;
Fig. 1. The different distributions of Linux, each is made for its own purpose.&lt;br&gt;





&lt;p&gt;There are many distros made for different purposes, examples are &lt;strong&gt;Ubuntu&lt;/strong&gt; which has similarities and is user friendly as windows, &lt;strong&gt;Kali&lt;/strong&gt; which is made for software penetration and discovering vulnerabilities and &lt;strong&gt;Arch&lt;/strong&gt; which is like the DIY distro where anything can practically be customized within it. Linux is mostly developer oriented, because of all the tools it provides and less bloating software which is not required and would otherwise hinder user productivity. But the downside of Linux is, it is &lt;strong&gt;tough&lt;/strong&gt; to find and install software that one can easily install on windows and sometimes there may not even be a Linux port for that application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Windows and Linux together
&lt;/h2&gt;

&lt;p&gt;Linux system uses very less resources and comes with a bunch of &lt;strong&gt;developer tools&lt;/strong&gt; hence providing a great developer experience. Windows have a large set of &lt;strong&gt;applications&lt;/strong&gt; many of which cannot work on Linux, so if there is a need of both systems instead of buying a new machine it can be done in a few ways.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Dual-Boot (Multi-Boot)
&lt;/h3&gt;

&lt;p&gt;Dual Boot is a method that allows the system to &lt;strong&gt;boot&lt;/strong&gt; into two operating systems that is installed on the system. This allows to run both the operating systems without deleting either one and having the need to use a new machine. If any OS gets infected the files in the other will be unharmed unless it was mounted with write access. This is the best method in order to experience the &lt;strong&gt;full functionality&lt;/strong&gt; of the OS. The problem with Dual Boot, is that only one OS can be run at a time, so in order to use any application from the other OS one has shut down and boot into that OS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Virtual Machine (VM)
&lt;/h3&gt;

&lt;p&gt;Virtual Machine’s use a concept called &lt;strong&gt;virtualization&lt;/strong&gt; which was a big step in the industry. Virtualization is the process of &lt;strong&gt;simulating&lt;/strong&gt; a &lt;strong&gt;physical component&lt;/strong&gt; such as hard disk, operating system and so many others, into a &lt;strong&gt;virtual&lt;/strong&gt; version of it. VM’s help to run or rather simulate an entire OS upon the actual host OS. That means if a user runs a Linux VM, they can also use their windows application &lt;strong&gt;parallelly&lt;/strong&gt;. This is something dual boot isn’t able to do. The VM works by running in an isolated environment created by the &lt;strong&gt;Hypervisor&lt;/strong&gt;, which means it should always request access for storage and memory from the host system and in order to transfer files across the systems, a &lt;strong&gt;hosted file server&lt;/strong&gt; must be created.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  WSL (Windows Subsystem for Linux)
&lt;/h3&gt;

&lt;p&gt;WSL the integrated VM, solves the drawbacks of the other two methods. WSL is a feature that enables the functionality to run a Linux system &lt;strong&gt;directly&lt;/strong&gt; on the windows environment. In comparison to a full-fledged VM, WSL has very &lt;strong&gt;little overhead&lt;/strong&gt; and starts up within seconds. It comes inbuilt within Windows and created was by Microsoft.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A traditional VM can be slow to boot up, will consume a lot of resources, cannot easily share files between the host and VM and some configuration must be done to setup and manage it.&lt;br&gt;
In comparison to a full-fledged VM, WSL it runs using a &lt;strong&gt;lightweight&lt;/strong&gt; virtual machine, it has a very &lt;strong&gt;fast boot time&lt;/strong&gt;, a &lt;strong&gt;very small resource footprint&lt;/strong&gt; and there is no need to setup or manage the virtual machine. &lt;/p&gt;

&lt;h2&gt;
  
  
  Integration of Windows and Linux
&lt;/h2&gt;

&lt;p&gt;WSL comes with a &lt;strong&gt;seamless integration&lt;/strong&gt; with both the Windows and Linux environments. Via WSL, the Windows filesystem can be accessed within Linux and the Linux filesystem from windows and also commands from one OS can be executed in the other.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mzN_v2ww--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4xxp6ie26x1i5cxuvle6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mzN_v2ww--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4xxp6ie26x1i5cxuvle6.png" alt="Using Linux commands within Windows using the project Windows Bash" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;
Fig. 2. Using Linux commands within Windows (using the project &lt;a href="https://github.com/ajratnam/windowsBash"&gt;Windows Bash&lt;/a&gt;)&lt;br&gt;





&lt;p&gt;It also significantly improves the performance of containerization software’s like docker. Technologies like &lt;strong&gt;docker engine&lt;/strong&gt; can now run Linux Containers can run &lt;strong&gt;natively&lt;/strong&gt; without &lt;strong&gt;emulation&lt;/strong&gt; and using the help of WSL, it can perform a cold boot within seconds which offers a massive &lt;strong&gt;performance boost&lt;/strong&gt;.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Hope for the future
&lt;/h2&gt;

&lt;p&gt;Initially WSL was just a compatibly layer between Windows and Linux and the &lt;strong&gt;File I/O&lt;/strong&gt; speeds were very slow, but since the release of WSL2 it had grown to become more popular. The difference between the two versions is way more than a simple version update, the entire process of running the kernel was entirely &lt;strong&gt;reworked&lt;/strong&gt; and is now almost 20 times better.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cross Working Applications
&lt;/h3&gt;

&lt;p&gt;Since the introduction of &lt;strong&gt;WSLg (WSL GUI)&lt;/strong&gt; within WSL2, it is now possible to run &lt;strong&gt;graphical&lt;/strong&gt; Linux apps within windows. Before in WSL1 an external server had to be setup in order run GUI apps. &lt;br&gt;
By using WSL, it is possible to use &lt;strong&gt;existing&lt;/strong&gt; applications on windows to edit or run files within Linux instead of reinstalling them and vice-versa.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y9VreT7---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eby3wbh3w3sfjxefqpwn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y9VreT7---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eby3wbh3w3sfjxefqpwn.png" alt="Using Windows application to edit a Linux file in Windows Terminal" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;
Fig. 3. Using Windows application to edit a Linux file in Windows Terminal.&lt;br&gt;





&lt;h2&gt;
  
  
  Installation of WSL
&lt;/h2&gt;

&lt;p&gt;To install WSL, there used to be a lot of steps but through the progress in software now it can be installed with just one command inside command prompt &lt;code&gt;wsl --install&lt;/code&gt;. Yes, that’s it!! That command automatically now downloads WSL2 with WSLg support and an Ubuntu distro. By default, it downloads Ubuntu, but other distros can be also specified using the command &lt;code&gt;wsl --install -d &amp;lt;distro&amp;gt;&lt;/code&gt; ex-&lt;code&gt;wsl --install -d ubuntu&lt;/code&gt;, the list of available distros can be found on the Microsoft Store.&lt;/p&gt;
&lt;br&gt;



&lt;p&gt;If the command doesn’t work that’s maybe because the wsl version is outdated. It can be updated using the &lt;code&gt;wsl --update&lt;/code&gt; command. &lt;/p&gt;
&lt;br&gt;



&lt;p&gt;The first launch of the subsystem will take quite an amount of time but the subsequent will happen within seconds. &lt;/p&gt;
&lt;br&gt;



&lt;p&gt;A new app called &lt;strong&gt;Ubuntu&lt;/strong&gt; will be installed which is the one used to launch and operate the subsystem. It is recommended to use the &lt;strong&gt;pre-installed&lt;/strong&gt; application called &lt;strong&gt;Windows Terminal&lt;/strong&gt; which is a modern replacement for command prompt, by installing WSL it automatically creates a profile for Ubuntu inside windows terminal. &lt;/p&gt;
&lt;br&gt;



&lt;p&gt;Also, WSL makes it so that the entire Linux subsystem’s file system can be &lt;strong&gt;accessed directly&lt;/strong&gt; from file explorer. Which is maybe preferably better than viewing and modifying from the command line for some people.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zcuI9lfW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p14iiih8aufb9v3rybw0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zcuI9lfW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p14iiih8aufb9v3rybw0.png" alt="Accessing the Linux filesystem as if it was part of the native windows environment" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;
Fig. 4. Accessing the Linux filesystem as if it was part of the native windows environment.&lt;br&gt;





&lt;p&gt;Now the Windows Subsystem for Linux has been installed on the system and can be used to run and explore Linux commands.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;WSL is a tool for running Linux and is not a replacement for running VM’s. It just is a &lt;strong&gt;lightweight adaptation&lt;/strong&gt;, which is highly integrated with windows and &lt;strong&gt;highly optimized&lt;/strong&gt; to use only minimal overhead. A full-fledged VM can do more things than what WSL can and as such a real Linux operating system can do much more than what a VM can but they all come with their own downsides.&lt;/p&gt;
&lt;br&gt;



&lt;p&gt;Also, there is a new subsystem for android (&lt;strong&gt;WSA&lt;/strong&gt;) introduced in windows 11 which is a bit &lt;strong&gt;unstable&lt;/strong&gt; right now. It allows to run android apps natively from windows without any emulator. These subsystems &lt;strong&gt;inspire&lt;/strong&gt; developers to make &lt;strong&gt;cross-platform&lt;/strong&gt; interconnected applications. This technology isn’t something revolutionary as of now, but there may be hope for it to be the foundation of something new.&lt;/p&gt;

&lt;p&gt;I thank everyone who took the time to read my article and hope got inspiration to start using WSL.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>linux</category>
      <category>productivity</category>
      <category>wsl</category>
    </item>
    <item>
      <title>My First Participation in Hacktoberfest (2021)</title>
      <dc:creator>Ajay Ratnam</dc:creator>
      <pubDate>Tue, 19 Oct 2021 15:42:06 +0000</pubDate>
      <link>https://dev.to/ajratnam/my-first-participation-in-hacktoberfest-2021-4c0k</link>
      <guid>https://dev.to/ajratnam/my-first-participation-in-hacktoberfest-2021-4c0k</guid>
      <description>&lt;h2&gt;
  
  
  👋 Introduction
&lt;/h2&gt;

&lt;p&gt;Hi there, My name is &lt;strong&gt;Ajay&lt;/strong&gt;. I am currently a &lt;strong&gt;Higher Secondary School&lt;/strong&gt; 🏫 student, studying at &lt;strong&gt;Bangalore&lt;/strong&gt;. I like to &lt;strong&gt;code&lt;/strong&gt; 👨‍💻. I primarily use &lt;strong&gt;Python&lt;/strong&gt; as my language of preference to code. Occasionally, I help others in their projects and I quickly &lt;strong&gt;adjust&lt;/strong&gt; to their code style. I am a &lt;strong&gt;quick&lt;/strong&gt; and &lt;strong&gt;adaptive&lt;/strong&gt; learner. 😎&lt;/p&gt;

&lt;p&gt;In this blog I would like to &lt;strong&gt;Enthusiastically&lt;/strong&gt; share my experience about my &lt;strong&gt;First Hacktoberfest&lt;/strong&gt;. 🤩&lt;/p&gt;

&lt;h2&gt;
  
  
  🎃 About Hacktoberfest
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hacktoberfest&lt;/strong&gt; is a month-long 🗓️ event in October, run by &lt;strong&gt;Digital Ocean&lt;/strong&gt; partnered with &lt;strong&gt;GitHub&lt;/strong&gt; and other companies to support the philosophy of &lt;strong&gt;Open Source Software&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anyone&lt;/strong&gt; can take part and participate in &lt;strong&gt;Hacktoberfest&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The requirement for completing the event is to be one among the first &lt;strong&gt;50 thousand&lt;/strong&gt; 🧠 people to successfully make &lt;strong&gt;4 valid Pull Requests&lt;/strong&gt;, to any repository(s) hosted in &lt;strong&gt;GitHub&lt;/strong&gt; or &lt;strong&gt;Gitlab&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;This year for successfully completing the event you get a &lt;strong&gt;Limited Edition&lt;/strong&gt; T-Shirt, and a &lt;strong&gt;Developer Badge&lt;/strong&gt;. 💸&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enough about Hacktoberfest, let me share my &lt;strong&gt;experience&lt;/strong&gt; in my &lt;strong&gt;First Hacktoberfest&lt;/strong&gt;. 😅&lt;/p&gt;

&lt;h2&gt;
  
  
  🥳 My Experience
&lt;/h2&gt;

&lt;p&gt;When I first noticed hacktoberfest at the time I was unaware of what is &lt;strong&gt;Open Source&lt;/strong&gt; and how much impact they had on technology 🤔, also at that time, I wasn't much experienced as a &lt;strong&gt;coder&lt;/strong&gt; and was new to &lt;strong&gt;Version Control&lt;/strong&gt; and &lt;strong&gt;GitHub&lt;/strong&gt;. 😣&lt;/p&gt;

&lt;p&gt;But now things have &lt;strong&gt;changed&lt;/strong&gt; 😎, I have worked on &lt;strong&gt;many&lt;/strong&gt; Projects and I am &lt;strong&gt;well versed&lt;/strong&gt; with how GitHub works.&lt;/p&gt;

&lt;p&gt;During this event, I had &lt;strong&gt;fun&lt;/strong&gt; contributing to many projects. I was also &lt;strong&gt;appreciated&lt;/strong&gt; by my family and my friends 😊. But even after &lt;strong&gt;preparing&lt;/strong&gt; myself for this event, I was still a bit &lt;strong&gt;hesitant&lt;/strong&gt; at the start 😓.&lt;/p&gt;

&lt;p&gt;Initially all the repositories seemed way out of my league, but as they say &lt;strong&gt;&lt;code&gt;"Don't judge a book by its cover"&lt;/code&gt;&lt;/strong&gt;, when I had a look into the &lt;strong&gt;issues&lt;/strong&gt; and the &lt;strong&gt;code&lt;/strong&gt;, they weren't actually tough as they seemed 😆. After finishing my &lt;strong&gt;4 PR's&lt;/strong&gt;, I didn't stop there, I contributed to a &lt;strong&gt;few more&lt;/strong&gt; and I will &lt;strong&gt;continue&lt;/strong&gt; to do so.&lt;/p&gt;

&lt;p&gt;Although majority of my contribution were &lt;strong&gt;"code related"&lt;/strong&gt; there were also a few in the other category, like &lt;strong&gt;fixing typos&lt;/strong&gt; 😉.&lt;/p&gt;

&lt;p&gt;So what advice I have for first timers like me is that, &lt;strong&gt;"Contribution"&lt;/strong&gt; towards an &lt;strong&gt;Open Source Software&lt;/strong&gt; does not involve only &lt;strong&gt;writing code&lt;/strong&gt;, &lt;strong&gt;implementing&lt;/strong&gt; new features, &lt;strong&gt;finding bugs&lt;/strong&gt; 🪲&lt;strong&gt;, writing tests&lt;/strong&gt;..., but it can also be something &lt;strong&gt;very simple&lt;/strong&gt; such as &lt;strong&gt;fixing grammatical errors&lt;/strong&gt;, &lt;strong&gt;writing blogs&lt;/strong&gt; 📝 about the product, helping in &lt;strong&gt;translation&lt;/strong&gt; and &lt;strong&gt;promoting&lt;/strong&gt; the product.&lt;/p&gt;

&lt;p&gt;Now since I &lt;strong&gt;understand&lt;/strong&gt; more about open source, I will still &lt;strong&gt;continue&lt;/strong&gt; to contribute to &lt;strong&gt;Open Source Software&lt;/strong&gt; regardless whether the event stops or continues. 🤘&lt;/p&gt;

&lt;h2&gt;
  
  
  👏 Final Words
&lt;/h2&gt;

&lt;p&gt;I give my &lt;strong&gt;thanks&lt;/strong&gt; to all the companies that hosted this event. I had a lot of fun and &lt;strong&gt;learnt&lt;/strong&gt; new stuff 😀 during this event. I am very much &lt;strong&gt;looking forward&lt;/strong&gt; to this event in the upcoming years.&lt;/p&gt;

&lt;p&gt;And lastly, I really &lt;strong&gt;appreciate&lt;/strong&gt; all the people who took their time to read my entire blog 🙏.&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>programming</category>
      <category>github</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
