Unix Command | PowerShell Equivalent | Description |
---|---|---|
pwd |
Get-Location or $PWD |
Print working directory |
ls |
Get-ChildItem or dir |
List directory contents |
cd |
Set-Location or cd |
Change directory |
mkdir |
New-Item -ItemType Directory or mkdir |
Create a new directory |
touch |
New-Item -ItemType File |
Create a new file |
rm |
Remove-Item or del |
Remove a file |
rm -r |
Remove-Item -Recurse |
Remove a directory and its contents |
cp |
Copy-Item or copy |
Copy a file |
mv |
Move-Item or move |
Move or rename a file |
cat |
Get-Content or type |
Display file contents |
grep |
Select-String |
Search for patterns in text |
chmod |
icacls |
Change file permissions (more complex in Windows) |
nano or vim |
notepad or code |
Edit a file (PowerShell ISE or VS Code are better alternatives) |
echo |
Write-Output or echo |
Print to standard output |
> (redirect) |
> (works the same) |
Redirect output to a file |
ps |
Get-Process |
List running processes |
kill |
Stop-Process |
Terminate a process |
which |
Get-Command |
Locate a program or command |
export |
$env:VARIABLE = "value" |
Set environment variables |
man |
Get-Help |
Display command documentation |
clear |
Clear-Host or cls |
Clear the console screen |
Last active
July 16, 2024 22:12
-
-
Save knowsuchagency/0c0a9c700711487f623d6498604a2f38 to your computer and use it in GitHub Desktop.
nix to powershell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment