RHEL_WSL_cheat-sheet-cover

Red Hat Enterprise Linux in Windows Subsystem for Linux cheat sheet

English

Download Cheat sheet

About

Ready to run Red Hat Enterprise Linux (RHEL) directly on your Windows machine? RHEL 8, 9, and 10 are now available for Windows Subsystem for Linux (WSL), both as ready-to-run images and through the Red Hat Image Builder service.  This cheat sheet gives you quick access to the essential commands and configurations for RHEL on WSL. Skip the complexities of virtual machines and start developing Linux applications faster.

What’s inside:

  • WSL management: Install, import, and manage RHEL distributions from the Windows command line.
  • Essential Linux commands: Master everyday tasks like navigating directories, handling files, and remote logins.
  • RHEL package management: Update, install, remove, search, and manage packages with dnf commands.
  • Service management: Configure systemd for automated service control.
  • WSL performance tuning: Optimize memory, CPU, and disk usage with .wslconfig.
  • Networking: Understand and manage network configurations between Windows and RHEL.
  • File system interaction: Access files between Windows and RHEL environments.
  • Troubleshooting tips: Diagnose and resolve common issues with practical commands.

With Red Hat Developer cheat sheets, you get essential information right at your fingertips so you can work faster and smarter. Easily learn new technologies and coding concepts and quickly find the answers you need.

Excerpt

WSL basic management (PowerShell/CMD)

Run the following commands in PowerShell or Windows Command Prompt (CMD) on your Windows host.

Task

Command 

Install WSL

wsl --install –no-distribution

Import the specified RHEL image as a new distribution

wsl --import RHEL C:\WSL\RHEL\ Downloads\rhel_image.tar.gz

List installed distributions with details (WSL version, state)

wsl -l -v

Set RHEL as the specified distribution as the default for wsl.exe commands

wsl -s RHEL

Launch into RHEL

wsl -d RHEL

 

Related Cheat sheets