Linux User Survival Guide for Windows 11

Microsoft DevBlog: Windows Command Line.

Move Off-Screen Window Back On-Screen

  1. press and hold the shift key
  2. right click on the off-screen window's taskbar icon
  3. release the shift key
  4. select Move on the pop-up menu
  5. use arrow keys to move the window where you want

Software Installation

Install software with Windows Package Manager (aka WinGet) and record the computer setup with WinGet configuration.

# list all installed packages
winget.exe list
# search packages
winget.exe search
# install a package
winget.exe install
# unistall a package
winget.exe uninstall

WinGet Configuration

The canonical configuration file name is configuration.dsc.yaml.

winget.exe configure show <FILE>
winget.exe configure validate <FILE>
winget.exe configure test --accept-configuration-agreements <FILE>

Start Elevated Windows Terminal

Elevated means the program is running as Administrator.

Run the following command in non-elevated PowerShell:

PS> Start-Process -Verb RunAs wt.exe

And UAC (User Account Control) consent prompt is triggered.

Handy sudo function:

function sudo {
    param(
        [Parameter(Mandatory=$true)][string]$path
    )
    Start-Process -Verb RunAs $path
}

Run in PowerShell:

PS> sudo wt.exe

Terminal

Windows Terminal is the modern goto terminal program in Windows.

Turn Windows Features On/Off With DISM

Deployment Image Serving and Management (DISM.exe) is a command line tool and PowerShell module that can be used to configure Windows features.

DISM needs to be run in an elevated PowerShell.

With DISM Command Line Tool

See Enable or Disable Windows Features Using DISM.

# list features
Dism.exe /online /Get-Features
# get details of the feature
Dism.exe /online /Get-FeatureInfo /FeatureName:<FEATURENAME>
# enable the feature
Dism.exe /online /Enable-Feature /FeatureName:<FEATURENAME>
# disable the feature
Dism.exe /online /Disable-Feature /FeatureName:<FEATURENAME>

With PowerShell DISM Module

See DISM PowerShell Module.

# list features
Get-WindowsOptionalFeature -Online
# get details of the feature
Get-WindowsOptionalFeature -Online -FeatureName:<FEATURENAME>
# enable the feature
Enable-WindowsOptionalFeature -Online -FeatureName:<FEATURENAME>
# disable the feature
Disable-WindowsOptionalFeature -Online -FeatureName:<FEATURENAME>

Windows Subystem for Linux (WSL)

Run a GNU/Linux environment directly on Windows, unmodified.

Windows Version

Find out Windows version:

systeminfo.exe | findstr.exe -b -c:"OS Name" -b -c:"OS Version"

Page Metadata

Source: win11.md Created: 2023-10-25T08:29:03+03:00 Changed: 2024-09-17T10:45:04+03:00