天天看點

最全的Windows系統指令總結,值得收藏

作者:碼蜂窩科技
最全的Windows系統指令總結,值得收藏

Windows作業系統大概有280多個系統指令(cmd)。本文從以下10個方面對Windows系統指令進行了分類總結。

  • 網絡管理
  • 程序
  • 目錄
  • 硬碟管理
  • 檔案指令
  • 檔案壓縮
  • 使用者群組
  • 系統管理
  • 硬體資訊
  • 安裝包
最全的Windows系統指令總結,值得收藏

網絡管理

指令 說明
arp [option] [address] 顯示/修改ARP緩存
getmac <options> 顯示mac位址
hostname 顯示主機名
ipconfig <options> 顯示TCP/IP配置資訊
net <subcmd> <options> 網絡管理工具
netstat <options> 檢視網絡監聽狀況
nslookup <host> <cmd> <options> DNS查詢
ping <options> <host> 檢查網絡連接配接
route <options> <cmd> <value> 顯示/修改路由表
telnet <cmd> <options> telnet用戶端端口
tracert <options> <dest> 跟蹤網絡跳轉路徑

程序

指令 說明
taskkill <options> <task/proc> 結束任務或程序
tasklist <options> 顯示運作的任務

目錄

指令 說明

md <path>

mkdir <path>

建立目錄

rd <path>

rmdir <path>

删除目錄

ren <old_name> <new_name>

rename <old_name> <new_name>

重命名檔案或目錄
robocopy <src> <dest> <file> <options> Robust拷貝
tree <options> <path> 樹形結構顯示目錄内容

硬碟管理

指令 說明
defrag <volume> <options> 碎片整理
label <option> 顯示/修改/删除盤符标簽
mountvol <path> <volume> 顯示/建立/移除盤符挂載點
vol <drive> 顯示驅動盤driver的标簽及序号

檔案指令

指令 說明
assoc .<ext>=<filetype> 顯示/修改檔案擴充名與檔案類型的關聯
ftype <filetype>=<open cmd> 顯示/修改檔案類型與打開程式的關聯
attrib <+/-> <attribute> 顯示/修改檔案的屬性(隻讀/系統/歸檔/隐藏)
cd <dir> 切換目錄
move <options> <src> <dst> 移動/重命名檔案或目錄

copy <options> <src> <dst>

xcopy <src> <dst> <options>

拷貝檔案或目錄

del <options> <files>

erase <options> <files>

删除檔案
dir <path> <options> 列出指定目錄下的内容
cipher <option> <file/dir> 顯示/修改 NTFS 卷上的目錄和檔案的加密
comp <file1> <file2> <options> 比較任意類型檔案file1和file2的内容
fc <options> <file1> <file2> 比較二進制或Ascii文本類型的檔案file1和file2
find <string> <file> 在檔案中搜尋字元串string
findstr <string> <file> 在檔案中搜尋字元串string,支援正則查找
more <file> 分頁顯示檔案内容
sort <file> 排序檔案内容行
type <file> 顯示檔案内容
where <options> <location> <file> 在指定location搜尋file

檔案壓縮

指令 說明
compact <options> <file> 壓縮檔案或目錄

使用者群組

指令 說明
whoami 顯示目前使用者
takeown <options> <file> 改變檔案屬主為Administrator

系統管理

指令 說明
bcdboot <path> 設定系統啟動菜單或修複啟動分區
chkdsk <volume> <options> 檢測檔案系統
<cmd> | clip 将cmd執行結果,輸出到剪切闆
cls 清空螢幕
cmd <option> <command> 執行新的CMD指令
color <background> <font> 改變背景和字型顔色
date <options> 顯示/修改目前日期
time <options> 顯示/修改目前時間
echo <message> 列印資訊
exit <options> 退出指令行
help <cmd> 檢視cmd使用說明
mklink <options> <link> <target> 建立符号硬連結
path <location> 顯示/增加PATH變量
mstc <options> <file> 打開遠端桌面視窗
schtasks /<subcmd> 排程任務
set <variable>=<value> 顯示/設定/移除Env變量
shutdown <options> 關機/重新開機
start <title> <options> 啟動新的cmd視窗
timeout /t <seconds> 暫停CMD
tzutil <options> 顯示/修改時區

硬體資訊

指令 說明
driverquery <options> 顯示已安裝的裝置驅動
msinfo32 <options> 打開系統資訊視窗
powercfg <options> <arguments> 顯示/改變電源計劃
systeminfo <options> 顯示系統資訊
ver 顯示作業系統版本

安裝包

指令 說明
msiexec <options> <pkg_path> 運作windows installer
最全的Windows系統指令總結,值得收藏
本文以10個分類對Windows常見的指令進行分類總結;喜歡請點贊收藏,更多分享見下期~

繼續閱讀