您应该知道的基本windows cmd命令

命令提示符暗淡的界面是您访问高级Windows工具的门户。我们向您展示了可以让您访问它们的基本CMD命令。...

对大多数人来说,命令提示符是Windows操作系统的一个有点可怕的装饰。界面是黑色的,暗淡的,没有太多的帮助。与Windows界面的其他部分相比,它似乎是空的。尽管命令提示符给人的第一印象不太好,但它是Windows系统中最强大的工具之一。

Command Prompt with flexing artm

从复杂的自动化到网络配置,命令提示符都很有用。它在界面上所缺少的不仅仅是在有效性上所弥补的。如果您不知道从何处开始熟练掌握命令提示符,还有什么地方比从这里开始更好呢!

cmd命令

虽然大多数人会立即寻找最佳和最有用的命令,但它有助于掩盖不同参数的含义。熟练使用命令提示符不仅要有一个命令词典,还要了解每个参数的含义以及如何将不同的参数组合起来以达到预期的效果。

下面是典型Windows命令中使用的大多数命令的综合列表。你可以在这里下载PDF版本。向下滚动到下面的基本命令列表,以获得可立即使用的命令列表。

007Ys3FFgy1h1onk62tptj30a10e7t9x

a--b

ASSOC - Displays or modifies file extension associati***. ATTRIB - Displays or changes file attributes. BREAK - Sets or clears extended CTRL+C checking. BCDBOOT - Used to copy critical files to the system partition and to crate a new system BCD store. BCDEDIT - Sets properties in boot database to control boot loading.

c级

CACLS - Shows or changes access control lists (ACLs) of files. CALL - Calls a batch program from another. CD - Shows the name of or changes to a current directory. CHCP - Displays or sets the active code page number. CHDIR - Displays the name of or changes to the current directory. CHKDSK - Checks a disk and displays a status report. CHKNTFS - Displays or modifies the checking of disk at boot time. CHOICE - Batch file command that allows users to select from a set of opti***. CIPHER - Displays or alters the encryption of directories (files) on NTFS partiti***. CLIP - Redirects output off another command to the Windows clipboard. CLS - Clears the screen. CMD - Starts a new instance of the Windows command interpreter. CMDKEY - Creates, lists, and deletes stored user names and passwords or credentials. COLOR - Sets the default c***ole colors. COMP - Compares the contents of two files or sets of files byte-by-byte. COMPACT - Displays or alters the compression of files on NTSF partiti***. CONVERT - Converts FAT volumes to NTFS. You cannot convert the current drive. COPY - Copies one of more files to another location.

d级

DATE - Displays or sets the date. DEFRAG - Disk defragment accessory. DEL - Deletes one or more files. DIR - Displays a list of files and sub-directories in a directory. DISKCOMP - Compares the contents of two floppy disks. DISKCOPY - Copies the contents of one floppy disk to another. DISKPART - Displays or configures Disk Partition properties. DOSKEY - Edits command lines, recalls Windows commands, and creates macros. DRIVERQUERY - Displays current device driver status and properties.

电子

ECHO - Displays messages, or turns commands echoing on or off. ENDLOCAL - Ends localization of environment changes in a batch file. ERASE - Deletes one of more files. EXIT - Quits and closes the command shell. EXPAND - Expands compressed files.

f级

FC - Compares two files or sets of files, and displays the differences between them. FIND - Searches for a text string in a file or files. FINDSTR - Searches for strings in files. FOR - Runs a specified command for each item in a set. FORFILES - Selects files in a folder for batch processing. FORMAT - Formats a disc for use with Windows. FSUTIL - Displays or configures the file system properties. FTYPE - Displays or modifies file types used in file extensi*** associati***.

g——我

GOTO - Directs the Windows command interpreter to a labeled line in a batch program. GPRESULT - Displays Group Policy Information for machine or user. GRAFTABL - Enables Windows to display an extended character set in graphics mode. HELP - Provides help information for Windows commands. ICACLS - Display, modify, backup, or restore ACLs for files and directories. IF - Performs conditional processing in batch programs. IPCONFIG - Displays all current TCP/IP network configuration values.

l—m型

LABEL - Creates, changes, or deletes the volume label of a disk. MD - Creates a directory. MKDIR - Creates a directory. MKLINK - Creates Symbolic Links and Hard Links. MODE - Configures a system device. MORE - Displays output one screen at a time. MOVE - Moves one or more files from one directory to another directory.

o—p型

OPENFILES - Queries, displays, or disconnects open files or files opened by network users. PATH - Displays or sets a search path for executable files. PAUSE - Suspends processing of a batch file. POPD - Restores the previous value of the current directory saved by PUSHD. PRINT - Prints a text file. PROMPT - Changes the Windows command prompt. PUSHD - Saves the current directory then changes it.

RD - Removes a directory. RECOVER - Recovers readable information from a bad or defective disk. REM - Designates comments (remarks) in batch files. REN - Renames a file or files. RENAME - Renames a file or files. REPLACE - Replaces files. RMDIR - Removes a directory. ROBOCOPY - Advanced utility to copy files and directory trees.

s码

SET - Displays, sets, or removes environment variables for current session. SETLOCAL - Begins localization of environment changes in a batch file. SETX - Sets environment variables. SC - Displays or configures services (background processes). SCHTASKS - Schedules commands and programs to run on a computer. SHIFT - Shifts the position of replaceable parameters in batch files. SHUTDOWN - Allows proper local or remote shutdown of machine. SORT - Sorts input. START - Starts a separate window to run a specified programs or command. SUBST - Associates a path with a drive letter. SYSTEMINFO - Displays machine specific properties and configuration.

t型

TAKEOWN - Allows an administrator to take ownership of a file. TASKLIST - Displays all currently running tasks including services. TASKKILL - Kill running process or applicati***. TIME - Displays or sets the system time. TIMEOUT - Pauses the command processor for the specified number of seconds. TITLE - Sets the window title for a CMD.EXE session. TREE - Graphically displays the directory structure of a drove or path. TYPE - Displays the contents of a text file.

v—x型

VER - Displays the Windows version. VERIFY - Tells Windows whether or verify that your files are written correctly to a disk. VOL - Displays a disk volume label and serial number. VSSADMIN - Volume Shadow Copy Service administration tool. WHERE - Displays the locati*** of files that match a search pattern. WMIC - Displays WMI information inside interactive command shell. XCOPY - Copies files and directory trees.

注意:要完全访问命令提示符,必须以管理员身份运行提示符。管理员权限允许用户访问无法访问的命令。

007Ys3FFgy1h1onk6yaxhj30im08tq3p

要激活管理员模式,请打开“开始”菜单,键入cmd,右键单击cmd程序,然后选择“以管理员身份运行”。在Windows10中,您也可以右键单击“开始”按钮并选择“命令提示符(Admin)”。

基本命令列表

CMD命令有数千个,每个命令都有自己的操作。

[命令]/?

以上命令为用户提供了给定特定命令的更多信息。这是最重要的,仅仅因为它允许用户在不依赖第三方资源的情况下理解命令。

007Ys3FFgy1h1onk7jal7j30im0dc3zp

sfc/scannow公司

修复关键的系统文件而不需要重新安装操作系统。

最好在安全模式下运行此命令,因为任何立即出现的操作系统问题都可能危及完整的修复。

007Ys3FFgy1h1onk8807dj30im0dc3yr

奇克德斯克

修复文件系统错误、坏扇区,并恢复可读信息。运行chkdsk命令有两种方法。

  • chkdsk/F—运行chkdsk并修复文件系统错误。
  • chkdsk/R—修复错误,定位坏扇区,并从这些坏错误中恢复信息。比/F更全面的扫描。

007Ys3FFgy1h1onk8sa8pj30im0dcmxj

平,路径平,tracert

Ping和pathping(一种更全面的Ping形式)将回送或显示发送到特定网站或从特定网站发送的数据包。Pathping和tracert一起,将显示到所需域的每一个路由器(或跃点)的IP地址。

007Ys3FFgy1h1onk9bgqlj30im0dc0u3

powercfg公司

默认情况下,某些电源配置(如休眠模式)在默认情况下处于关闭状态。休眠模式,而不是关闭电脑的电源,将保存你的电脑的最后状态(程序,窗口等),并启动更快。要启用或禁用,请使用以下命令:

  • powercfg/hibernate on—打开hibernate模式,可通过默认的Windows电源选项访问。
  • powercfg/hibernate off—关闭休眠模式。

007Ys3FFgy1h1onka15r1j30im0dcwen

驱动程序查询。。。>[文件名]

虽然我们大多数人都不知道我们的PC驱动程序的头尾,但有时会出现驱动程序问题。这可能与性能延迟一样小,也可能与稳定的BSODs一样大。

虽然driverquery并没有带来立竿见影的优势,但它确实提供了PC驱动程序信息的概述,以便全面解决硬件和软件问题。

  • driverquery——显示已安装驱动程序的分类列表。
  • driverquery/FO TABLE、LIST或CSV—以表格、列表或excel电子表格的形式显示驱动程序。

如果添加&gt[文件名.csv]到原始参数--driverquery/FO CSV>驱动器查询.csv例如,命令提示符将获取通过driverquery显示的信息并将其输出到Excel工作表。默认情况下,该文件将定向到Windows32文件夹。

007Ys3FFgy1h1onkalzb9j30im0dcwgg

ipconfig/release、renew、flushdns

有时,网络问题可能通过错误的IP地址或损坏的DNS(****器)文件发生。要解决此问题,请按顺序输入以下命令:

  • ipconfig/release—释放您的IP地址。
  • ipconfig/renew—替换您以前的IP地址(并且比其他两个地址花费更长的时间)。
  • ipconfig/flushdns——删除先前配置的DNS列表,允许以前不可用的网站再次加载。

最好只在你有网络问题的时候这样做。更具体地说,当你连接到互联网,但某些网站将无法工作。

007Ys3FFgy1h1onkb7m05j30im0dc75b

命令你的提示!

命令提示符并不是为了迷惑你而**的怪兽。这是一个简单的功能,塞满了有用的工具,几乎可以控制你电脑的每一个方面。我们只触及了命令提示符为你准备的表面,所以开始学习吧!

你还想学什么命令?请在下面的评论中告诉我们!

图片来源:Roman Marvel和Brian Goff viaShutterstock.com网站

  • 发表于 2021-03-15 18:07
  • 阅读 ( 324 )
  • 分类:IT

你可能感兴趣的文章

如何在windows10中掌握命令提示符

... 如果你有你自己的建议分享,一定要让我们知道在下面的评论部分。 ...

  • 发布于 2021-03-13 05:35
  • 阅读 ( 227 )

5个旧的windows功能microsoft还不能注销

你知道Windows10隐藏了几个古老的功能吗?你可能认为没有人再使用像传真这样过时的功能了,但是微软继续在Windows中使用这些工具。 ...

  • 发布于 2021-03-14 04:46
  • 阅读 ( 233 )

如何找出你有什么主板

... 主板信息应该在基板**商、基板产品和基板版本旁边指定。如果字段表示信息不可用,则应该使用本文中的其他主板检查方法之一。 ...

  • 发布于 2021-03-19 18:19
  • 阅读 ( 189 )

如何在mac上复制和粘贴

想知道如何在你的新Mac上复制和粘贴吗?毕竟,这是一个基本的行动,你必须每天使用。幸运的是,这个动作迅速而无痛,你很快就会掌握窍门。 ...

  • 发布于 2021-03-20 10:54
  • 阅读 ( 236 )

终极spotify键盘快捷键备忘单

...个狂热的听众,将这些键盘快捷键整合到你的日常生活中应该可以帮助你从Spotify中获得更多的乐趣。 ...

  • 发布于 2021-03-21 19:09
  • 阅读 ( 572 )

windows用户使用mac的快速指南

...更全面的概述,请查看我们完整的macOS初学者指南。您还应该下载并打印我们的macOS备忘单,以方便快捷键参考。 ...

  • 发布于 2021-03-22 16:29
  • 阅读 ( 271 )

您必须知道的15个windows命令提示符(cmd)命令

... 这里我们介绍每个Windows用户必须知道的基本命令。 ...

  • 发布于 2021-03-22 17:39
  • 阅读 ( 540 )

iphone备忘单:你应该知道的每一个ios快捷方式

你使用iOS的次数越多,你就越习惯于它节省时间的技巧——而且你也就越认为它们是理所当然的。这就是为什么我们**了一个备忘单,它将帮助您熟悉iPhone和iPad的基于触摸和基于键盘的快捷键。 ...

  • 发布于 2021-03-23 18:34
  • 阅读 ( 237 )

mac相当于默认的windows软件

... 新手应该知道有些混乱的剪切和粘贴方式。首先,您需要用Cmd+C复制文件,然后使用Move操作。移动的快捷键是Cmd+Shift+V。您也可以在右键单击后通过按住Option来访问它,上下文...

  • 发布于 2021-03-24 23:44
  • 阅读 ( 219 )

什么是windows中的psexec?它做什么?

...更深入地了解并熟悉用于执行PsExec操作的语法和命令,您应该了解有关Windows命令行界面的更多信息。 ...

  • 发布于 2021-03-27 03:01
  • 阅读 ( 380 )