Skip to content

martinbaud/powershell-profile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PowerShell Profile

License

Linux-like aliases and project launchers for Windows PowerShell. Keep your muscle memory from Linux/macOS while working on Windows.

Why?

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.

Installation

# 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

Aliases

File operations

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)

Navigation & listing

Command Description
ll ls -la (list all, detailed)
pwd Print working directory (built-in)

Search & read

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

File content

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

System

Command Description
df Disk usage per drive
export VAR=value Set environment variable (bash-style)

Help

aliases    # Show all available commands

Project Launchers

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 }

Uninstall

Remove-Item $PROFILE

Then restart PowerShell.

Compatibility

  • PowerShell 5.1 (Windows built-in): fully supported
  • PowerShell 7+ (cross-platform): fully supported
  • Windows Terminal: recommended for best experience

License

MIT

About

Linux-like aliases and project launchers for Windows PowerShell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors