windows - 命令大全 cmd - systeminfo linux equivalent
访问量: 463
type nul > a, linux: touch a
type linux: cat a.txt
echo linux: echo
mkdir linux: mkdir
删除文件: del linux: rm
rd或者removedir /s /q <your_folder> , linux: rm -rf
windows 没有 linux: tail
cd , 或者直接 cd linux: pwd
%TEMP% 或者 %TMP%, linux: /tmp
systeminfo 查询系统信息 linux: cat /etc/*release*
hostname 主机名
DESKTOP-GG23M21
net user 查看用户信息 linux: who
netstat
一般是 netstat -ano , a: all, n: port number, o: ownership netstat -ano 列出自己的所有进程:port
可以与 find 同用
netstat -ano | find "3389" linux: lsof -i:3389
wmic : windows management instrumentation windows管理工具
wmic os: (特别宽)
BootDevice BuildNumber BuildType Caption CodeSet CountryCode CreationClassName CSCreationClassName CSDVersion CSName CurrentTimeZone DataExecutionPrevention_32BitApplications DataExecutionPrevention_Available DataExecutionPrevention_Drivers DataExecutionPrevention_SupportPolicy Debug Description Distributed EncryptionLevel ForegroundApplicationBoost FreePhysicalMemory FreeSpaceInPagingFiles FreeVirtualMemory InstallDate LargeSystemCache LastBootUpTime LocalDateTime Locale Manufacturer MaxNumberOfProcesses MaxProcessMemorySize MUILanguages Name NumberOfLicensedUsers NumberOfProcesses NumberOfUsers OperatingSystemSKU Organization OSArchitecture OSLanguage OSProductSuite OSType OtherTypeDescription PAEEnabled PlusProductID PlusVersionNumber PortableOperatingSystem Primary ProductType RegisteredUser SerialNumber ServicePackMajorVersion ServicePackMinorVersion SizeStoredInPagingFiles Status SuiteMask SystemDevice SystemDirectory SystemDrive TotalSwapSpaceSize TotalVirtualMemorySize TotalVisibleMemorySize Version WindowsDirectory \Device\HarddiskVolume3 19044 Multiprocessor Free Microsoft Windows 10 רҵ 936 86 Win32_OperatingSystem Win32_ComputerSystem DESKTOP-GG23M21 480 TRUE TRUE TRUE 2 FALSE FALSE 256 2 34393932 9358680 14988932 20220514133931.000000+480 20230111200052.500000+480 20230119074755.074000+480 0804 Microsoft Corporation 4294967295 137438953344 {"zh-CN"} Microsoft Windows 10 רҵ|C:\Windows|\Device\Harddisk1\Partition3 681 2 48 64 λ 2052 256 18 FALSE TRUE 1 siwei 00330-80000-00000-AA958 0 0 11091744 OK 272 \Device\HarddiskVolume5 C:\Windows\system32 C: 77306560 66214816 10.0.19044 C:\Windows
wmic os get caption 获得系统名
wmic qfe 获得补丁情况
wmic product 列出所有安装的软件
wmic product get name, version 列出安装软件的 name, version
whoami , echo %username% 当前用户信息 linux: who
wmic service list brief (注意不能分开否则报错)列出服务列表 类似 linux: ps -ef , service目录
wmic process 列出所有进程 linux: ps -ef
wmic process list
wmic process list brief 简明的列出所有进程
也可以使用tasklist 来查看
使用taskkill /F /PID 334455 来结束进程 等同于 kill -9
也可以使用 taskkill /f /im pproxy.exe 来根据名称来杀掉进程。
/f 表示强制
/im = 名称。 image name?
/pid 进程id
tasklist | findstr 等同于 ps -ef | grep xx
pipe command