<?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: Prabhat Shrestha</title>
    <description>The latest articles on DEV Community by Prabhat Shrestha (@prastha).</description>
    <link>https://dev.to/prastha</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%2F1297666%2F66e97fc1-6807-419c-b121-8af0f13dc915.png</url>
      <title>DEV Community: Prabhat Shrestha</title>
      <link>https://dev.to/prastha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prastha"/>
    <language>en</language>
    <item>
      <title>Install MinGW-w64 on Windows 11</title>
      <dc:creator>Prabhat Shrestha</dc:creator>
      <pubDate>Tue, 04 Nov 2025 03:06:08 +0000</pubDate>
      <link>https://dev.to/prastha/install-mingw-w64-on-windows-11-2025-november-acg</link>
      <guid>https://dev.to/prastha/install-mingw-w64-on-windows-11-2025-november-acg</guid>
      <description>&lt;h2&gt;
  
  
  AT First
&lt;/h2&gt;

&lt;p&gt;When I usually program in C++, I use Visual Studio Community. It’s free for personal use, and I really like that you can set breakpoints with the F9 key and press F5 to automatically build and run your program. Visual Studio Community is an extremely convenient and powerful IDE, but if you want to use it commercially with a team, you need a paid license. If you absolutely want to create commercial programs for free, you can use MinGW-w64, CMake, and Visual Studio Code as an alternative to Visual Studio Community.&lt;br&gt;
As for MinGW-w64, the installation method tends to change from time to time, so I’d like to write down the method I tried this time as a memo ON 2025 November.&lt;/p&gt;
&lt;h2&gt;
  
  
  Download
&lt;/h2&gt;

&lt;p&gt;Download the MinGW-w64 from the following site:&lt;br&gt;
&lt;a href="https://www.mingw-w64.org" rel="noopener noreferrer"&gt;https://www.mingw-w64.org&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqziquv7tblc97ugjcysw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqziquv7tblc97ugjcysw.png" alt=" " width="800" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe5eu3qbtppvk6q6tuu29.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe5eu3qbtppvk6q6tuu29.png" alt=" " width="800" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It seems that clicking on w64devkit will take you to the github site.&lt;br&gt;
&lt;a href="https://github.com/skeeto/w64devkit" rel="noopener noreferrer"&gt;https://github.com/skeeto/w64devkit&lt;/a&gt;&lt;br&gt;
Installation file can be downloaded from the “Releases” section in the lower right corner.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffz4xw7niu90hhdt1mqei.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffz4xw7niu90hhdt1mqei.png" alt=" " width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdvttfk2y8gym2wx5qufd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdvttfk2y8gym2wx5qufd.png" alt=" " width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7hr7xni16hcei0fqhan8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7hr7xni16hcei0fqhan8.png" alt=" " width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Launch the installer (Double click on downloaded exe file), will be asked where to install it. Enter the name of the folder you want to install.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F03a9fbm2qgmaarpmelu5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F03a9fbm2qgmaarpmelu5.png" alt=" " width="386" height="137"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Replace "C:\Tools" to your own location in the whole content. You can use the same location.&lt;/strong&gt;&lt;br&gt;
In my case, MinGW-w64 is installed in "C:\Tools\w64devkit" &lt;/p&gt;
&lt;h2&gt;
  
  
  Adding a Path for an Environment Variable
&lt;/h2&gt;

&lt;p&gt;To compile C++ from the "Command Prompt", MinGW-w64 directory should be added to the path of the environment variable.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Press &lt;strong&gt;Windows + R&lt;/strong&gt;, type &lt;strong&gt;sysdm.cpl&lt;/strong&gt;, and press &lt;strong&gt;Enter&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the System Properties window, click on &lt;strong&gt;Advanced&lt;/strong&gt; tab -&amp;gt; &lt;strong&gt;Environment Variables&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under the “System variables” section, find and select &lt;strong&gt;Path&lt;/strong&gt;, then click &lt;strong&gt;Edit&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;New&lt;/strong&gt;, then paste the following path: &lt;br&gt;
Your &lt;br&gt;
C:\Tools\w64devkit\bin&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;OK&lt;/strong&gt; on all open windows to save the changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Restart PC.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Installation Verify
&lt;/h2&gt;

&lt;p&gt;Open command prompt and run g++ --version&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;c:\Users\Username&amp;gt;g++ --version
g++ (GCC) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;## Run Code&lt;br&gt;
Save the following Sample Code to hello.cpp in a folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;
int main() {
    std::cout &amp;lt;&amp;lt; "Hello, World!\n";
    return 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write "cmd" on address bar of the folder and run following command to compile code.&lt;br&gt;
g++ hello.cpp -o hello.exe&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;c:\Users\Username&amp;gt;g++ hello.cpp -o hello.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the program&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;c:\Users\Username&amp;gt;hello
Hello, World!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;End. Thank you for reading.&lt;/p&gt;




&lt;p&gt;Created on : 2025/11/04&lt;br&gt;
Last updated on : 2025/11/09&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>mingw</category>
    </item>
    <item>
      <title>Java Spring basic contents and components.</title>
      <dc:creator>Prabhat Shrestha</dc:creator>
      <pubDate>Fri, 03 Jan 2025 12:15:24 +0000</pubDate>
      <link>https://dev.to/prastha/java-spring-basic-contents-and-components-1mio</link>
      <guid>https://dev.to/prastha/java-spring-basic-contents-and-components-1mio</guid>
      <description>&lt;h1&gt;
  
  
  Java Spring Basic Contents
&lt;/h1&gt;

&lt;p&gt;Java Spring is a comprehensive framework for building enterprise-level applications in Java. Below is a breakdown of its basic contents and components:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. &lt;strong&gt;Core Concepts&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inversion of Control (IoC)&lt;/strong&gt;: This is the fundamental principle of Spring. It refers to the Spring container managing the lifecycle and configuration of beans (objects).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependency Injection (DI)&lt;/strong&gt;: A design pattern used to implement IoC. Spring automatically injects dependencies into beans rather than having beans create dependencies themselves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Beans&lt;/strong&gt;: Objects managed by the Spring IoC container. They are configured in XML files or annotated classes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. &lt;strong&gt;Spring Container&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ApplicationContext&lt;/strong&gt;: The main interface for accessing the Spring IoC container. It holds and manages beans and their lifecycle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BeanFactory&lt;/strong&gt;: The basic container in Spring that can be used for simple scenarios but is generally replaced by ApplicationContext for more advanced features.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. &lt;strong&gt;Spring Modules&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Spring framework is divided into several modules to address different concerns in application development:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Spring Core&lt;/strong&gt;: Contains core features such as IoC and DI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring AOP (Aspect-Oriented Programming)&lt;/strong&gt;: Adds aspects (cross-cutting concerns like logging or security) to Spring-based applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Data&lt;/strong&gt;: Provides data access frameworks, including JDBC and ORM (Object-Relational Mapping) integration (e.g., Hibernate).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Web&lt;/strong&gt;: Supports web development (Servlet-based, Spring MVC, WebFlux, etc.).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Web MVC&lt;/strong&gt;: A model-view-controller framework for building web applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Security&lt;/strong&gt;: A powerful and customizable authentication and access control framework.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Batch&lt;/strong&gt;: A framework for batch processing and managing large-scale jobs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Boot&lt;/strong&gt;: Simplifies application configuration and deployment, allowing for rapid application development with embedded servers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. &lt;strong&gt;Spring Boot&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Auto-Configuration&lt;/strong&gt;: Automatically configures the Spring application based on the libraries on the classpath, reducing the need for manual configuration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standalone Applications&lt;/strong&gt;: Supports building stand-alone applications with embedded web servers (like Tomcat, Jetty).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Initializr&lt;/strong&gt;: A web-based tool to bootstrap new Spring Boot projects with dependencies and configurations.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. &lt;strong&gt;Spring MVC&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DispatcherServlet&lt;/strong&gt;: The central servlet that routes HTTP requests to appropriate controllers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Controllers&lt;/strong&gt;: Handle HTTP requests and return appropriate responses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Views&lt;/strong&gt;: Represent the model (e.g., JSP, Thymeleaf).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model&lt;/strong&gt;: Represents the data structure passed between controllers and views.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Annotations&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@Controller&lt;/code&gt;: Marks a class as a Spring MVC controller.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@RequestMapping&lt;/code&gt;: Maps web requests to handler methods of MVC controllers.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@GetMapping&lt;/code&gt;, &lt;code&gt;@PostMapping&lt;/code&gt;, etc.: Specialized annotations for different HTTP methods.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. &lt;strong&gt;Spring Data&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JPA (Java Persistence API)&lt;/strong&gt;: For object-relational mapping.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Data Repositories&lt;/strong&gt;: Provides convenient methods for data access and persistence management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MongoDB, Redis, and other NoSQL Databases&lt;/strong&gt;: Spring Data also supports integration with various databases like MongoDB, Cassandra, and more.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. &lt;strong&gt;Spring AOP (Aspect-Oriented Programming)&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Aspect&lt;/strong&gt;: A module that allows separation of cross-cutting concerns (e.g., logging, transaction management) from the main business logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Advice&lt;/strong&gt;: The action to be taken at a specific point in the program (e.g., before or after method execution).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JoinPoint&lt;/strong&gt;: A point in the execution flow where advice can be applied (e.g., method execution).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AspectJ&lt;/strong&gt;: A popular framework for AOP that can be integrated with Spring.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  8. &lt;strong&gt;Spring Security&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Authentication&lt;/strong&gt;: Identifying the user (login process).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authorization&lt;/strong&gt;: Granting or denying access based on roles and privileges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSRF Protection&lt;/strong&gt;: Protection against Cross-Site Request Forgery attacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OAuth2 and JWT&lt;/strong&gt;: For modern security protocols, used in REST APIs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  9. &lt;strong&gt;Spring Testing&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Spring TestContext Framework&lt;/strong&gt;: Provides support for testing Spring components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JUnit and Mockito&lt;/strong&gt;: Commonly used testing frameworks in Spring.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;@SpringBootTest&lt;/strong&gt;: An annotation that simplifies integration testing in Spring Boot applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  10. &lt;strong&gt;Spring Profiles&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Profiles&lt;/strong&gt;: Allow for different configurations for different environments (e.g., development, production).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a class="mentioned-user" href="https://dev.to/profile"&gt;@profile&lt;/a&gt; Annotation&lt;/strong&gt;: Used to define beans that should be loaded based on the active profile.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  11. &lt;strong&gt;Spring Integration&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Message Queues&lt;/strong&gt;: Integrates with messaging systems like JMS, Kafka, and RabbitMQ.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File Transfers&lt;/strong&gt;: Integrates with file-based systems, including FTP, SFTP, and others.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Services&lt;/strong&gt;: Supports SOAP and RESTful web services.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  12. &lt;strong&gt;Spring Cloud&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Microservices Support&lt;/strong&gt;: Spring Cloud provides a set of tools for building cloud-native microservices, including configuration management, service discovery, and circuit breakers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Cloud Netflix&lt;/strong&gt;: Integration with Netflix OSS components like Eureka, Ribbon, Hystrix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Cloud Config&lt;/strong&gt;: A central configuration server for distributed systems.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Spring is a versatile framework used in building robust, scalable, and maintainable Java applications. The basic components—IoC, DI, Spring MVC, and Spring Boot—are the foundation of any Spring-based project, but the framework’s ecosystem also offers deep integrations for everything from security to cloud-native application development.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Install Ubuntu on WSL 2</title>
      <dc:creator>Prabhat Shrestha</dc:creator>
      <pubDate>Mon, 30 Sep 2024 00:01:17 +0000</pubDate>
      <link>https://dev.to/prastha/install-ubuntu-on-wsl-2-3fei</link>
      <guid>https://dev.to/prastha/install-ubuntu-on-wsl-2-3fei</guid>
      <description>&lt;p&gt;WSL2 (Windows Subsystem for Linux 2) is a compatibility layer allowing users to run a full Linux kernel and native Linux applications on Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install WSL command
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Run PowerShell or Command Prompt as &lt;strong&gt;administrator&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the “wsl —install” command to install. This will install default version of WSL.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;wsl &lt;span class="nt"&gt;--install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Restart PC&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check wsl Installation&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;wsl &lt;span class="nt"&gt;--version&lt;/span&gt;
WSL version: 2.2.4.0
....
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check installed Ubuntu with command “wsl --list --verbose” (or wsl -l -v).&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;wsl &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt;
  NAME                   STATE           VERSION
  Ubuntu                 Stopped         2
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter Ubuntu Distribution.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;wsl &lt;span class="nt"&gt;-d&lt;/span&gt; Ubuntu
root@DESKTOP-FMBB4IH:/mnt/c/WINDOWS/system32#
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check the installed Ubuntu version.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@DESKTOP-FMBB4IH:/mnt/c/WINDOWS/system32#lsb_release &lt;span class="nt"&gt;-a&lt;/span&gt;
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Change the installed default Linux distribution
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To check the version of default Linux distribution&lt;/p&gt;

&lt;p&gt;Check the above “Install WSL command” procedure numbers 5, 6, and 7.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check available distribution name using command wsl --list --online(wsl -l -o).&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;wsl &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt;
Install using &lt;span class="s1"&gt;'wsl.exe --install &amp;lt;Distro&amp;gt;'&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;

NAME                            FRIENDLY NAME
Ubuntu                          Ubuntu
Debian                          Debian GNU/Linux
kali-linux                      Kali Linux Rolling
Ubuntu-18.04                    Ubuntu 18.04 LTS
Ubuntu-20.04                    Ubuntu 20.04 LTS
Ubuntu-22.04                    Ubuntu 22.04 LTS
Ubuntu-24.04                    Ubuntu 24.04 LTS
OracleLinux_7_9                 Oracle Linux 7.9
OracleLinux_8_7                 Oracle Linux 8.7
OracleLinux_9_1                 Oracle Linux 9.1
openSUSE-Leap-15.6              openSUSE Leap 15.6
SUSE-Linux-Enterprise-15-SP5    SUSE Linux Enterprise 15 SP5
SUSE-Linux-Enterprise-15-SP6    SUSE Linux Enterprise 15 SP6
openSUSE-Tumbleweed             openSUSE Tumbleweed
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To change the installed default Linux distribution to Ubuntu-22.04.&lt;/p&gt;

&lt;p&gt;Syntax: wsl --install -d &amp;lt;Distribution Name&amp;gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;wsl &lt;span class="nt"&gt;--install&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; Ubuntu-24.04
Installing: Ubuntu 24.04 LTS
Ubuntu 24.04 LTS has been installed.
Launching Ubuntu 24.04 LTS...
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username:
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Enter username and password 2 times when prompted.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Changed distribution is ready to use.&lt;/p&gt;

&lt;p&gt;Check the above “Install WSL command” procedure numbers 5, 6, and 7.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To enter the distribution&lt;/p&gt;

&lt;p&gt;Just after installation or changing the distribution, the distribution is opened. To open the distribution from next time, enter the following command:&lt;/p&gt;

&lt;p&gt;Syntax: wsl -d &amp;lt;Distribution Name&amp;gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;wsl &lt;span class="nt"&gt;-d&lt;/span&gt; Ubuntu-24.04
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To exit the distribution&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To uninstall the distribution&lt;/p&gt;

&lt;p&gt;Syntax: wsl —unregister &amp;lt;Distribution Name&amp;gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;wsl &lt;span class="nt"&gt;--unregister&lt;/span&gt; Ubuntu-24.04
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Reference
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/windows/wsl/" rel="noopener noreferrer"&gt;Windows Subsystem for Linux Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>wsl</category>
      <category>wsl2</category>
      <category>powershell</category>
    </item>
  </channel>
</rss>
