Windows#


Table of Contents#


App

UI

macOS

Windows

File Manager

GUI

Finder

File Explorer

Shell/CLI

TUI

Zsh, Bash, PowerShell

PowerShell, Git Bash, Command Prompt

Terminal

GUI

Terminal.app

Windows Terminal

Text Editor

GUI

TextEdit

Notepad


Keyboard Shortcuts#

Keyboard shortcuts in Windows

Shortcut

Graphical

Action

Ctrl-Right

⌃→

Jump to the last/rightmost column

Ctrl-Left

⌃←

Jump to the first/leftmost column

Ctrl-Up

⌃↑

Jump to the first/topmost row

Ctrl-Down

⌃↓

Jump to the last/bottommost row

Ctrl-z

⌃z

Undo

Ctrl-s

⌃s

Save

Ctrl-c

⌃c

Copy

Ctrl-v

⌃v

Paste

Ctrl-f

⌃f

Search

Ctrl-a

⌃a

Select All


Documentation#

Windows help & learning

Windows Client#

Windows client documentation for IT Pros

Windows Server#

Windows Server documentation

Windows Terminal#

https://www.commandlinewizardry.com/post/windows-terminal-one-screen-to-rule-them-all

https://learn.microsoft.com/en-us/windows/terminal/

Git for Windows#

“Parts of Git are implemented in shell script, and Git for Windows runs those scripts via MSYS2’s POSIX emulation layer, which in turn is based on the Cygwin POSIX emulation layer.”

https://www.commandlinewizardry.com/post/how-to-add-git-bash-to-windows-terminal

C:\Program Files\Git\bin\bash.exe
C:\Program Files\Git\mingw64\share\git\git-for-windows.ico
C:\cygwin64\Cygwin.bat
C:\cygwin64\Cygwin.ico

“In recent years, the bash shell and Linux commands have become ubiquitous. By using Git Bash or Cygwin, you can easily access these capabilities from the Windows environment. For even more capability, you can install the Windows Subsystem for Linux, which gives you the ability to run full versions of Linux operating systems and access the capabilities directly from the Windows Command Prompt and PowerShell.” (Cybersecurity Ops with Bash)

“You can also use zsh under Windows by installing Cygwin, which provides a UNIX-like environment for programmes — given the weakness of the standard Windows command interpreter, this is a good thing to do. There are ports of older versions of zsh to Windows which run natively, i.e. without a UNIX environment, although these have a slightly different behaviour in some respects and I won’t talk about them further.” https://zsh.sourceforge.io/Guide/zshguide01.html#l1


File System#

The native graphical file explorer application on Windows is File Explorer.

C:\
├── AppData
├── PerfLogs
├── 'Program Files'
├── 'Program Files (x86)'
├── ProgramData
├── Recovery
├── System
├── System32
├── SysWOW64
├── Users
│   ├── Public
│   └── USERNAME
│       ├── Desktop
│       ├── Documents
│       ├── Downloads
│       └── OneDrive
├── Windows
└── WinSxS
C:\Users\<user>\Anaconda3\
GitBash
MongoDB
PostgreSQL

Environment Variables

  • %%DATE

  • %OS%

  • %ProgramFiles%

  • %ProgramFiles(x86)%

  • %USERNAME%


Package Management#

  • [ h ][ g ][ w ] Chocolatey

  • [ h ][ g ][ w ] Scoop

  • [ h ][ g ][ w ] Windows Package Manager

  • [ h ] winstall

winget install sysinternals --accept-package-agreements
winget install --id=MHNexus.HxD -e

Bash#

~/.bashrc#

alias cls='clear'          # DOS-ish     for clear
alias copy='cp'            # DOS-ish     for cp
alias del='rm'             # DOS-ish     for rm
alias dir='ls'             # DOS-ish     for ls
alias ipconfig='ifconfig'  # Windows-ish for ifconfig
alias md='mkdir'           # DOS-ish     for mkdir
alias move='mv'            # DOS-ish     for mv
alias rd='rmdir'           # DOS-ish     for rmdir
alias ren='mv'             # DOS-ish     for mv/rename
alias tracert='traceroute' # DOS-ish for traceroute

Security, Privacy, & Telemetry#

C:\Windows\System32\drivers\etc\
127.0.0.1    localhost
::1          localhost
127.0.0.1    data.microsoft.com
127.0.0.1    msftconnecttest.com
127.0.0.1    azureedge.net
127.0.0.1    activity.windows.com
127.0.0.1    bingapis.com
127.0.0.1    msedge.net
127.0.0.1    assets.msn.com
127.0.0.1    scorecardresearch.com
127.0.0.1    edge.microsoft.com
127.0.0.1    data.msn.com

https://www.itechtics.com/disable-telemetry-data-collection-windows-10/

Microsoft Compatibility Telemetry (CompatTelRunner.exe)


Resources#

  • [ d ] Software Restriction Policies Technical Overview

  • [ h ][ g ][ w ] Chocolatey

  • [ h ][ g ][ w ] Cygwin

  • [ h ][ g ][ w ] Mintty

  • [ h ][ g ][ w ] MSYS2

  • [ h ][ g ][ w ] Pacman

  • [ h ][ g ][ w ] Scoop

  • [ h ][ g ][ w ] Windows Command Prompt (cmd.exe)

  • [ h ][ g ][ w ] Windows Package Manager (winget)

  • [ h ][ g ][ w ] WSL Windows Subsystem for Linux

Scoop vs Chocolatey vs Winget

Scoop vs Cygwin vs MSYS

Security

  • [ h ] Abuse.ch

  • [ h ] Bitdefender

  • [ h ] Comodo

  • [ h ][ w ] HxD

  • [ h ] Kaspersky

  • [ h ] Malwarebytes

  • [ h ] PeStudio

  • [ h ] PortMaster

  • [ h ] Sysinternals

    • [ d ] Autoruns

  • [ h ] Virus Total

Privacy

  • [ g ] MajorPrivacy

  • [ h ] O&O ShutUp10++

  • [ g ] PrivateWin10

  • [ g ] Privatezilla

  • [ g ] Sophia Script

  • [ h ] Ultimate Windows Tweaker

  • [ g ] WindowsSpyBlocker

YouTube#

David Bombal

  • [ y ] 06-02-2023. “Windows Pentest Tutorial (Active Directory Game Over!)”.

NetworkChuck

  • [ y ] 06-30-2023. “how to HACK a password // Windows Edition”.

  • [ y ] 06-28-2023. “you NEED to learn Windows RIGHT NOW!!”.

The PC Security Channel

  • [ y ] 02-23-2024. “How to never accidentally run Malware: Must Have Windows Tweaks”.

  • [ y ] 01-06-2024. “Malware beats Windows Defender: How you get hacked”.

  • [ y ] 11-24-2023. “Stop Windows Spying with one click Firewall”.

  • [ y ] 10-20-2023. “Windows Defender vs Top 100 Malware Sites”.

  • [ y ] 09-16-2023. “Stop Windows Spying with hosts file”.

  • [ y ] 05-28-2023. “How to use Windows Firewall to block Hackers and Malware”.

  • [ y ] 02-28-2023. “Stop Windows Spying”.

  • [ y ] 01-29-2023. “Has Windows become Spyware?”.

  • [ y ] 04-13-2022. “Free Security Tools Everyone Should Use”.

Rob Braxman Tech

  • [ y ] 10-25-2023. “Why an Antivirus Does Nothing for You”.

ThioJoe

  • [ y ] 03-30-2024. “17 Computer Tips You’ll WISH You Knew Sooner”.

  • [ y ] 10-09-2021. “Finding Hidden Startup Programs in Windows: Ultimate Guide”.

Windows IT Pro

  • [ y ] 02-08-2022. “Sysinternals: Autoruns deep dive (demo) | Startup, Boot, Login, Apps, Windows | Microsoft”.

  • [ y ] 02-08-2022. “Sysinternals: ProcDump deep dive (demo) | Command line, CPU, crash dump, Windows | Microsoft”.

more

  • [ y ] 10-19-2023. Britec09. “How to Check if Someone is Remotely Accessing Your Computer”.

  • [ y ] 02-14-2023. “Is Windows Defender Enough To Stay Protected”.

  • [ y ] 02-03-2024. stacksmasher. “Breaking Bitlocker - Bypassing the Windows Disk Encryption”.

  • [ y ] 02-02-2024. Titus Tech Talk. “Changing Windows Desktop to Tile NEW Programs”.


Texts#

  • Russinovich, Mark & Aaron Margosis. Troubleshooting with the Windows Sysinternals Tools: Guidance from the tools’ creator.


Terms#

  • [ w ] Compatibility Layer

  • [ w ] Disk Operating System (DOS)

  • [ w ] DOS MZ Executable (.exe)

  • [ w ] Dynamic-Link Library (DLL)

  • [ w ] DLL Hell

  • [ w ] MinGW

  • [ w ] MS-DOS

  • [ w ] Notepad

  • [ w ] Portable Executable (PE) (.exe)

  • [ w ] PuTTY

  • [ w ] Shim

  • [ w ] System Information

  • [ w ] Task Manager

  • [ w ] WinDbg

  • [ w ] Windows

  • [ w ] Windows 11

  • [ w ] Windows API

  • [ w ] Windows Command Prompt (cmd.exe)

  • [ w ] Windows Console

  • [ w ] Windows File Explorer

  • [ w ] Windows Installer

  • [ w ] Windows Registry - a hierarchical database that stores settings and other data that is critical to the operation of Windows and apps

  • [ w ] Windows Template Library (WTL)

  • [ w ] Windows Terminal


Notes#

Slashes in Windows path names


  • [ h ] Cygwin

  • [ h ][ g ] Mintty

  • [ h ][ g ] MSYS2

  • [ h ] Oh My Posh

    • [ d ] Installation - Windows

    • [ d ] Installation - Fonts

    • [ d ] Installation - Customize

    • [ d ] Segments - Python

  • [ d ] Pacman

  • [ h ] Scoop

  • [ d ] Windows Sybsystem for Linux (WSL)

Parallels

  • [ p ] Windows 11 Installed Successfully

  • [ d ] Activate Windows 11 after installation in Parallels Desktop

  • [ d ] Limitations of running Windows 11 on Apple silicon Mac computers in Parallels Desktop for Mac

  • [ d ] What is Coherence? Information about Coherence View mode

  • [ d ] Full Screen view mode in Parallels Desktop for Mac

  • [ d ] Use Mac user files in Windows


PowerShell#

Scoop#

PS> Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
PS> irm get.scoop.sh | iex
Initializing...
Downloading ...
Creating shim...
Adding ~\scoop\shims to your path.
Scoop was installed successfully!
Type 'scoop help' for instructions.

bat#

PS> scoop install main/bat
Installing 'bat' (0.23.0) [64bit] from main bucket
bat-v0.23.0-x86_64-pc-windows-msvc.zip (2.8 MB) [=================================================================================] 100%
Checking hash of bat-v0.23.0-x86_64-pc-windows-msvc.zip ... ok.
Extracting bat-v0.23.0-x86_64-pc-windows-msvc.zip ... done.
Linking ~\scoop\apps\bat\current => ~\scoop\apps\bat\0.23.0
Creating shim for 'bat'.
'bat' (0.23.0) was installed successfully!
'bat' suggests installing 'less'

lsd#

PS> scoop install main/lsd
Installing 'lsd' (0.23.1) [64bit] from main bucket
lsd-0.23.1-x86_64-pc-windows-msvc.zip (980.6 KB) [================================================================================] 100%
Checking hash of lsd-0.23.1-x86_64-pc-windows-msvc.zip ... ok.
Extracting lsd-0.23.1-x86_64-pc-windows-msvc.zip ... done.
Linking ~\scoop\apps\lsd\current => ~\scoop\apps\lsd\0.23.1
Creating shim for 'lsd'.
'lsd' (0.23.1) was installed successfully!
'lsd' suggests installing 'extras/vcredist2022'.

tre#

PS> scoop install main/tre-command
Installing 'tre-command' (0.4.0) [64bit] from main bucket
tre-v0.4.0-x86_64-pc-windows-msvc.zip (667.5 KB) [================================================================================] 100%
Checking hash of tre-v0.4.0-x86_64-pc-windows-msvc.zip ... ok.
Extracting tre-v0.4.0-x86_64-pc-windows-msvc.zip ... done.
Linking ~\scoop\apps\tre-command\current => ~\scoop\apps\tre-command\0.4.0
Creating shim for 'tre'.
'tre-command' (0.4.0) was installed successfully!
'tre-command' suggests installing 'extras/vcredist2022'.

Oh My Posh#

PS> winget install JanDeDobbeleer.OhMyPosh -s winget
PS> oh-my-posh font install
PS> oh-my-posh config export --config $POSH_THEMES_PATH/jandedobbeleer.omp.json --output ~/.mytheme.omp.json
PS> oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/jandedobbeleer.omp.json" | Invoke-Expression
$ vim .bashrc
eval "$(oh-my-posh init bash --config $HOME/.mytheme.omp.json)"
#eval "$(oh-my-posh init bash)" # default
$ vim .mytheme.omp.json
{
  "type": "python",
  "style": "powerline",
  "powerline_symbol": "\ue0b0",
  "foreground": "#111111",
  "background": "#FFDE57",
  "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}",
  "properties": {
    "display_default": true,
    "display_mode": "environment",
    "fetch_version": true,
    "fetch_virtual_env": true,
    "home_enabled": true
  }
}

Git Bash#

$ uname -o
Msys

Conda#

$ conda init
no change     C:\Users\df\anaconda3\Scripts\conda.exe
no change     C:\Users\df\anaconda3\Scripts\conda-env.exe
no change     C:\Users\df\anaconda3\Scripts\conda-script.py
no change     C:\Users\df\anaconda3\Scripts\conda-env-script.py
no change     C:\Users\df\anaconda3\condabin\conda.bat
no change     C:\Users\df\anaconda3\Library\bin\conda.bat
no change     C:\Users\df\anaconda3\condabin\_conda_activate.bat
no change     C:\Users\df\anaconda3\condabin\rename_tmp.bat
no change     C:\Users\df\anaconda3\condabin\conda_auto_activate.bat
no change     C:\Users\df\anaconda3\condabin\conda_hook.bat
no change     C:\Users\df\anaconda3\Scripts\activate.bat
no change     C:\Users\df\anaconda3\condabin\activate.bat
no change     C:\Users\df\anaconda3\condabin\deactivate.bat
modified      C:\Users\df\anaconda3\Scripts\activate
modified      C:\Users\df\anaconda3\Scripts\deactivate
modified      C:\Users\df\anaconda3\etc\profile.d\conda.sh
modified      C:\Users\df\anaconda3\etc\fish\conf.d\conda.fish
no change     C:\Users\df\anaconda3\shell\condabin\Conda.psm1
modified      C:\Users\df\anaconda3\shell\condabin\conda-hook.ps1
no change     C:\Users\df\anaconda3\Lib\site-packages\xontrib\conda.xsh
modified      C:\Users\df\anaconda3\etc\profile.d\conda.csh
modified      \\Mac\Home\Documents\WindowsPowerShell\profile.ps1
modified      HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

==> For changes to take effect, close and re-open your current shell. <==
$ conda init bash
no change     C:\Users\df\anaconda3\Scripts\conda.exe
no change     C:\Users\df\anaconda3\Scripts\conda-env.exe
no change     C:\Users\df\anaconda3\Scripts\conda-script.py
no change     C:\Users\df\anaconda3\Scripts\conda-env-script.py
no change     C:\Users\df\anaconda3\condabin\conda.bat
no change     C:\Users\df\anaconda3\Library\bin\conda.bat
no change     C:\Users\df\anaconda3\condabin\_conda_activate.bat
no change     C:\Users\df\anaconda3\condabin\rename_tmp.bat
no change     C:\Users\df\anaconda3\condabin\conda_auto_activate.bat
no change     C:\Users\df\anaconda3\condabin\conda_hook.bat
no change     C:\Users\df\anaconda3\Scripts\activate.bat
no change     C:\Users\df\anaconda3\condabin\activate.bat
no change     C:\Users\df\anaconda3\condabin\deactivate.bat
no change     C:\Users\df\anaconda3\Scripts\activate
no change     C:\Users\df\anaconda3\Scripts\deactivate
no change     C:\Users\df\anaconda3\etc\profile.d\conda.sh
no change     C:\Users\df\anaconda3\etc\fish\conf.d\conda.fish
no change     C:\Users\df\anaconda3\shell\condabin\Conda.psm1
no change     C:\Users\df\anaconda3\shell\condabin\conda-hook.ps1
no change     C:\Users\df\anaconda3\Lib\site-packages\xontrib\conda.xsh
no change     C:\Users\df\anaconda3\etc\profile.d\conda.csh
modified      C:\Users\df\.bash_profile

==> For changes to take effect, close and re-open your current shell. <==
conda update  -n base -c defaults conda &&
conda install -n base conda-libmamba-solver &&
conda config --set solver libmamba &&
conda config --add channels conda-forge &&
conda config --set channel_priority strict

VS Code

settings.json

  • %APPDATA%\Code\User\settings.json