In our earlier chapter, we covered some Linux basics, and the other half was about RHEL in the enterprise world. Let's turn to the other side-nearly practical: putting RHEL in your Windows environment using Windows Subsystem for Linux 2 (WSL 2).
đ Why Use RHEL on WSL 2?
- â Integration! Run RHEL side by side with the Windows application without altering hard disk partitions, dual-boots, or separately maintained virtual machines.
- âĄDevelopment Efficiency: Developers can build Linux applications on Windows for a more efficient workflow since they are accustomed to working between both environments.
- đŠ Access RHEL Tools: One can take advantage of RHEL's powerful package management system and enterprise-grade tools on the Windows system.
đ Installing RHEL on WSL 2
1ïžâŁ Enable WSL and Set Version to 2:
Open PowerShell as Administrator and execute:
wsl --install
wsl --set-default-version 2
2ïžâŁ Download the RHEL WSL Image:
View the Red Hat Customer Portal, navigate to the Downloads section, and pick up the RHEL WSL image (usually a .tar file).
You can sig up for Red Hat account if you don't have it already , it is free for developer . RHEL Account
3ïžâŁImport the RHEL Image into WSL:
Run in PowerShell:
wsl --import RHEL C:\WSL\RHEL C:\Path\To\Downloaded\RedHat.tar --version 2
4ïžâŁ Start RHEL:
Launch your instance of RHEL with:
wsl -d RHEL
5ïžâŁ Register and Update RHEL:
After entering the RHEL environment:
sudo subscription-manager register --username <your-username> --password <your-password>
sudo subscription-manager attach --auto
sudo dnf update -y
đŻBenefits of This Setup
đ Unified Environment: Develop, test, and deploy Linux applications without leaving your Windows workspace.
đResource-efficient: WSL 2, as a lightweight virtualization solution, consumes considerably fewer resources than a traditional virtual machine.
âĄProductivity boost: Quickly switch back and forth between Windows and Linux tools for better productivity in all development and administrative needs.
linux-os.net
By deploying RHEL to Windows via WSL 2, you get to enjoy enterprise Linux without the hassle of managing two systems.
** Svensk version â Swedish version below
**
Red Hat Unwrapped #2: Att Köra RHEL pÄ Windows med WSL 2
VĂ€lkommen tillbaka till Red Hat Unwrapped-serien! I första kapitlet utforskade vi Linux-grunder och RHELs roll i företagsvĂ€rlden. Nu gĂ„r vi frĂ„n teori till praktik â genom att integrera RHEL direkt i din Windows-miljö med Windows Subsystem for Linux 2 (WSL 2).
đ Varför AnvĂ€nda RHEL pĂ„ WSL 2?
â Sömlös Integration: Kör RHEL sida vid sida med dina Windows-appar utan att behöva Ă€ndra partitioner, dubbla uppstarter eller separata virtuella maskiner.
⥠Effektiv Utveckling: Bygg och testa Linux-applikationer direkt pÄ Windows för ett smidigare arbetsflöde, perfekt för utvecklare som vÀxlar mellan miljöer.
đŠ Ă tkomst till Enterprise-verktyg: AnvĂ€nd RHEL:s kraftfulla paketstyrning och verktyg av företagsklass direkt pĂ„ din Windows-dator.
đ Hur Man Installerar RHEL pĂ„ WSL 2
1ïžâŁ Aktivera WSL 2
Ăppna PowerShell som administratör.
Kör följande kommandon:
wsl --install
wsl --set-default-version 2
2ïžâŁ Ladda ner RHEL WSL Image
Besök Red Hat Customer Portal.
GÄ till nedladdningssektionen och hÀmta RHEL WSL-bilden (vanligtvis en .tar-fil).
3ïžâŁ Importera RHEL Image till WSL
wsl --import RHEL C:\WSL\RHEL C:\Path\To\Downloaded\RedHat.tar --version 2
4ïžâŁ Starta Din RHEL-instans
wsl -d RHEL
5ïžâŁ Registrera och Uppdatera RHEL
Inuti RHEL-miljön, kör:
sudo subscription-manager register --username --password
sudo subscription-manager attach --auto
sudo dnf update -y
đŻ Varför Denna Setup Ă€r UtmĂ€rkt
đ Enhetligt Arbetsflöde: Utveckla, testa och distribuera Linux-applikationer utan att lĂ€mna din Windows-miljö.
đ LĂ€tt och Snabb: WSL 2 anvĂ€nder mindre systemresurser Ă€n en fullstĂ€ndig virtuell maskin.
⥠Ăkad Produktivitet: VĂ€xla sömlöst mellan Windows- och Linux-verktyg.
Genom att installera RHEL pÄ WSL 2 kombinerar du kraften hos företags-Linux med flexibiliteten hos Windows. HÄll utkik efter fler inlÀgg i Red Hat Unwrapped-serien!
Top comments (1)
Previously, you could only use no-cost RHEL for personal use, but a no-cost subscription is now available allowing you to use it for work. I wrote a blog about the new RHEL for Business Developers subscription and it looks like it was published today: developers.redhat.com/articles/202...