
Linux-like aliases and project launchers for Windows PowerShell. Keep your muscle memory from Linux/macOS while working on Windows.
If you switch between Linux/macOS and Windows, you constantly type rm -rf, touch, grep -r, ll and get errors. This profile makes PowerShell behave like a Unix shell for the commands that matter most.
# Clone
git clone https://github.com/martinbaud/powershell-profile.git
# Copy to your profile location
Copy-Item .\powershell-profile\Microsoft.PowerShell_profile.ps1 $PROFILE -Force
# Reload
. $PROFILE
| Command |
Description |
rm <path> |
Remove file |
rm -r <path> |
Remove directory recursively |
rm -rf <path> |
Force remove, no errors |
touch <file> |
Create file or update timestamp |
mkdirp <path> |
mkdir -p (create nested dirs) |
| Command |
Description |
ll |
ls -la (list all, detailed) |
pwd |
Print working directory (built-in) |
| Command |
Description |
grep <pattern> <file> |
Search in file |
grep -r <pattern> [path] |
Search recursively |
grep -i <pattern> <file> |
Case-insensitive search |
<cmd> | grep <pattern> |
Filter pipe output |
which <cmd> |
Find command location |
| Command |
Description |
head [-n 20] <file> |
First N lines (default 10) |
tail [-n 20] <file> |
Last N lines (default 10) |
catn <file> |
cat -n with line numbers |
| Command |
Description |
df |
Disk usage per drive |
export VAR=value |
Set environment variable (bash-style) |
aliases # Show all available commands
The profile includes a section for custom project launchers. Edit the bottom of the file to add your own:
function myproject { Push-Location "$HOME\Desktop\dev\myproject"; npm run dev; Pop-Location }
Then restart PowerShell.
- PowerShell 5.1 (Windows built-in): fully supported
- PowerShell 7+ (cross-platform): fully supported
- Windows Terminal: recommended for best experience
MIT