Skip to content

LinuxLoveWindows is a PowerShell module designed to bridge the gap between Linux and Windows. It allows users to import Linux commands into their PowerShell sessions, enabling seamless interoperability between Windows Subsystem for Linux (WSL) and PowerShell. ๐Ÿš€

License

Notifications You must be signed in to change notification settings

cdhtlr/LinuxLoveWindows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Linux ๐Ÿ’˜ Windows

Thumbnail

LinuxLoveWindows is a PowerShell module that helps you save and load commands from your Windows Subsystem for Linux (WSL) environment into your PowerShell session.

Features

  • Imports Linux commands into PowerShell.
  • Loads previously saved Linux commands automatically on module import.

Demo

Demo

๐Ÿ“ฝ๏ธOpen YouTube to watch the full demo in Bahasa Indonesia

Requirements

  • Windows with WSL installed.
  • PowerShell 6.0 or newer.
  • WslInterop PowerShell module installed.

Installation

Use this command

Install-Module -Name LinuxLoveWindows

or download this repository to PowerShell module location (e.g., C:\Program Files\PowerShell\6\Modules\).

Usage

  1. Open PowerShell.
  2. Edit your PowerShell profile by running:
    notepad $Profile
  3. Add the following line:
    #Uncomment the line below to ensure all Linux commands are imported and replace equivalent Windows commands when doing 'Import-Linux'.
    #$env:LINUX_CMD="all"
    Import-Module LinuxLoveWindows
  4. Save and close the profile file.
  5. Restart PowerShell, then call the function:
    Import-Linux
    It will import commands that are not present in Windows unless accompanied by an environment variable. You can import all commands to the current PowerShell session with 'Import-Linux -all'.

This function will collect a list of commands from Linux, filter them, and import each command into your PowerShell session.

Note

  • Ensure your WSL environment is properly set up and accessible from PowerShell.
  • To remove a command from autoload, manually delete it from the imported_linux_commands.txt in your Windows user home directory.

About

LinuxLoveWindows is a PowerShell module designed to bridge the gap between Linux and Windows. It allows users to import Linux commands into their PowerShell sessions, enabling seamless interoperability between Windows Subsystem for Linux (WSL) and PowerShell. ๐Ÿš€

Topics

Resources

License

Stars

Watchers

Forks