Linux转Windows必看,PowerSehll 100个命令对照表
“从Linux切换到Windows,第一反应是:xx命令在Windows里是啥?”
如果你和我一样,之前天天和Linux终端打交道,突然要用PowerShell,肯定满脑子问号。别慌,今天给你整理了一份超全对照表,按功能分类,看完你就懂了。

文件操作类
| | |
|---|
ls | Get-ChildItem | |
cp | Copy-Item | |
mv | Move-Item | |
rm | Remove-Item | |
cat | Get-Content | |
touch | New-Item | |
mkdir | New-Item -ItemType Directory | |
pwd | Get-Location | |
基本一样,但最好还是熟悉一下 PowerShell 的命名方式。
文本处理类
| | |
|---|
grep | Select-String | |
awk | awk | |
sed | sed | |
head | Select-Object -First | |
tail | Select-Object -Last | |
wc | (Get-Content).Count | |
sort | Sort-Object | |
uniq | Sort-Object -Unique | |
目录切换类
| | |
|---|
cd | Set-Location | |
cd .. | cd .. | |
cd ~ | cd ~ | |
cd - | Pop-Location | |
系统信息类
| | |
|---|
uname -a | Get-ComputerInfo | |
whoami | $env:USERNAME | |
df | Get-PSDrive | |
free | Get-CimInstance Win32_OperatingSystem | |
top | Get-Process | Sort-Object CPU | |
ps | Get-Process | |
env | Get-ChildItem Env: | |
hostname | hostname | |
uptime | (Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime | |
网络类
| | |
|---|
ping | Test-Connection | |
curl | Invoke-WebRequest | |
wget | Invoke-WebRequest | |
ifconfig/ip | Get-NetIPConfiguration | |
netstat | Get-NetTCPConnection | |
ssh | ssh | |
scp | scp | |
进程管理类
| | |
|---|
kill | Stop-Process | |
killall | Stop-Process -Name | |
ps aux | Get-Process | |
nohup | Start-Process -WindowStyle Hidden | |
权限管理类
| | |
|---|
chmod | icacls | |
chown | Takeown | |
chgrp | icacls | |
sudo | Start-Process -Verb RunAs | |
压缩解压类
| | |
|---|
tar | tar | |
zip | Compress-Archive | |
unzip | Expand-Archive | |
gzip | gzip | |
查找搜索类
| | |
|---|
find | Get-ChildItem -Recurse | |
locate | Get-ChildItem -Recurse | |
which | Get-Command | |
where | Get-Command | |
软件包管理类
| | |
|---|
apt-get | winget | |
yum | winget | |
dpkg | Get-Package | |

其他常用类
| | |
|---|
echo | Write-Output | |
date | Get-Date | |
alias | Get-Alias | |
history | Get-History | |
man | Get-Help | |
clear | Clear-Host | |
exit | exit | |
看到这里,是不是已经开始了解 PowerShell 的命名套路了。刚开始可能不习惯,用两天就真香了。
✅ 点赞 + 在看,转发给需要的朋友!
你还有哪些命令找不到对应的?在评论区聊聊,我告诉你。