Полезные команды для командной строки в windows 7 x64

Командная строка позволяет более эффективно использовать компьютер и производить более точную настройку системы. Для этих целей применяются специальные команды.

Содержание

  • Перечень основных команд
    • Запуск системных утилит
    • Работа с файлами и папками
    • Работа с текстовыми файлами
    • Работа с учетными записями
    • Работа с процессами
    • Работа в сети
    • Другие команды
  • Вопросы и ответы

Интерпретатор командной строки в Windows 7

В Windows 7 существуют такие операции, которые невозможно или затруднительно выполнить через обычный графический интерфейс, но их реально осуществить через интерфейс «Командной строки» при помощи интерпретатора CMD.EXE. Рассмотрим основные команды, которые могут применять пользователи при использовании указанного инструмента.

Читайте также:
Основные команды Linux в «Терминале»
Запуск «Командной строки» в Windows 7

Перечень основных команд

С помощью команд в «Командной строке» запускаются различные утилиты и выполняются определенные операции. Зачастую основное командное выражение используется вместе с рядом атрибутов, которые записываются через косую черту (/). Именно эти атрибуты инициируют выполнение конкретных операций.

Мы не ставим перед собой цель описать абсолютно все команды, применяемые при использовании инструмента CMD.EXE. Для этого пришлось бы написать не одну статью. Мы же постараемся уместить на одной странице информацию о наиболее полезных и популярных командных выражениях, разбив их на группы.

Запуск системных утилит

Прежде всего, рассмотрим выражения, которые отвечают за запуск важных системных утилит.

CHKDSK – запускает утилиту Check Disk, которая выполняет проверку жестких дисков компьютера на ошибки. Данное командное выражение можно вводить с дополнительными атрибутами, которые, в свою очередь, запускают выполнение определенных операций:

  • /f – восстановление диска в случае обнаружения логических ошибок;
  • /r – восстановление секторов накопителя в случае обнаружения физических повреждений;
  • /x – отключение указанного жесткого диска;
  • /scan – сканирование на упреждение;
  • C:, D:, E: … — указание логических дисков для сканирования;
  • /? – вызов справки о работе утилиты Check Disk.

Запуск утилиты Check Disk с атрибутами через интерфейс командной строки в Windows 7

SFC – запуск утилиты проверки целостности системных файлов Windows. Данное командное выражение чаще всего используется с атрибутом /scannow. Оно запускает инструмент, который проверяет файлы ОС на соответствие стандартам. В случае повреждений, при наличии установочного диска существует возможность восстановления целостности системных объектов.

Запуск утилиты sfc через интерфейс командной строки в Windows 7

Работа с файлами и папками

Следующая группа выражений предназначена для работы с файлами и папками.

APPEND – открытие файлов в указанной пользователем папке в том виде, как если бы они находились в требуемом каталоге. Обязательным условием является указание пути к папке, к которой будет применено действие. Запись производится по следующему шаблону:

append [;] [[диск компьютера:]путь[;...]]

При использовании данной команды можно применять следующие атрибуты:

  • /e – запись полного списка файлов;
  • /? – запуск справки.

Применение команды APPEND с атрибутами через интерфейс командной строки в Windows 7

Lumpics.ru

ATTRIB – команда предназначена для изменения атрибутов файлов или папок. Так же, как и в предыдущем случае, обязательным условием является ввод вместе с командным выражением полного пути к обрабатываемому объекту. Для установки атрибутов используются следующие ключи:

  • h – скрытый;
  • s – системный;
  • r – только для чтения;
  • a – архивный.

Для того чтобы применить или отключить атрибут, перед ключом соответственно ставится знак «+» или «-».

Применение команды ATTRIB через интерфейс командной строки в Windows 7

COPY – применяется для копирования файлов и каталогов из одной директории в другую. При использовании команды обязательно указание полного пути объекта копирования и папки, в которую оно будет производиться. С данным командным выражением можно использовать следующие атрибуты:

  • /v – проверка корректности копирования;
  • /z – копирование объектов из сети;
  • /y – перезапись конечного объекта при совпадении имен без подтверждения;
  • /? – активация справки.

Применение команды COPY с атрибутами через интерфейс командной строки в Windows 7

DEL – удаление файлов из указанной директории. Командное выражение предусматривает возможность использования ряда атрибутов:

  • /p – включение запроса подтверждения удаления перед манипуляцией с каждым объектом;
  • /q – отключение запроса при удалении;
  • /s – удаление объектов в каталогах и подкаталогах;
  • /a: — удаление объектов с указанными атрибутами, которые назначаются при помощи тех же ключей, что и при использовании команды ATTRIB.

Применение команды DEL с атрибутами через интерфейс командной строки в Windows 7

RD – является аналогом предыдущего командного выражения, но удаляет не файлы, а папки в указанной директории. При использовании можно применять те же самые атрибуты.

Применение команды RD с атрибутами через интерфейс командной строки в Windows 7

DIR – выводит список всех подкаталогов и файлов, которые расположены в указанной директории. Вместе с основным выражением применяются такие атрибуты:

  • /q – получение информации о владельце файла;
  • /s – отображение перечня файлов из указанного каталога;
  • /w – вывод списка в несколько колонок;
  • /o – сортировка перечня выводимых объектов (e – по расширению; n – по имени; d – по дате; s – по размеру);
  • /d – отображение списка в несколько колонок с сортировкой по этим колонкам;
  • /b – отображение исключительно имен файлов;
  • /a – отображение объектов с определенными атрибутами, для указания которых используются те же ключи, что и при использовании команды ATTRIB.

Применение команды DIR с атрибутами через интерфейс командной строки в Windows 7

REN – используется для переименования каталогов и файлов. В качестве аргументов к данной команде указывается путь к объекту и его новое название. Например, для переименования файла file.txt, который расположен в папке «Folder», находящейся в корневой директории диска D, в файл file2.txt, нужно ввести следующее выражение:

REN D:folderfile.txt file2.txt

Применение команды REN с атрибутами через интерфейс командной строки в Windows 7

MD – предназначена для создания новой папки. В синтаксисе команды обязательно следует указать диск, на котором будет располагаться новый каталог, и директорию его размещения в том случае, если он является вложенным. Например, для создания каталога folderN, который расположен в директории folder на диске E, следует ввести такое выражение:

md E:folderfolderN

Применение команды MD через интерфейс командной строки в Windows 7

Работа с текстовыми файлами

Следующий блок команд предназначен для работы с текстом.

TYPE – отображает на экране содержимое текстовых файлов. Обязательными аргументом данной команды является полный путь к объекту, текст в котором следует просмотреть. Например, для просмотра содержимого файла file.txt, находящегося в папке «Folder» на диске D, требуется ввести следующее командное выражение:

TYPE D:folderfile.txt

Применение команды TYPE через интерфейс командной строки в Windows 7

PRINT – распечатка содержимого текстового файла. Синтаксис данной команды аналогичен предыдущему, но вместо вывода текста на экран производится его распечатка.

Применение команды PRINT через интерфейс командной строки в Windows 7

FIND – производит поиск текстовой строки в файлах. Вместе с этой командой обязательно указывается путь к объекту, в котором выполняется поиск, а также название искомой строки, заключенное в кавычки. Кроме того, вместе с данным выражением применяются следующие атрибуты:

  • /c – выводится общее количество строк, содержащих искомое выражение;
  • /v – вывод строк, которые не содержат искомое выражение;
  • /I – поиск без учета регистра.

Применение команды FIND с атрибутами через интерфейс командной строки в Windows 7

Работа с учетными записями

С помощью командной строки можно просматривать информацию о пользователях системы и управлять ими.

FINGER – отображение информации о зарегистрированных в операционной системе пользователях. Обязательным аргументом данной команды является имя юзера, о котором требуется получить данные. Кроме того, можно использовать атрибут /i. В этом случае вывод информации будет производиться в списочном варианте.

Применение команды FINGER с атрибутами через интерфейс командной строки в Windows 7

TSCON – выполняет присоединение сеанса пользователя к сеансу терминала. При использовании данной команды обязательно требуется указать ID сеанса или его имя, а также пароль того юзера, которому он принадлежит. Пароль следует указывать после атрибута /PASSWORD.

Применение команды TSON с атрибутами через интерфейс командной строки в Windows 7

Работа с процессами

Следующий блок команд предназначен для управления процессами на компьютере.

QPROCESS – предоставление данных о запущенных процессах на ПК. Среди выводимой информации будет представлено наименование процесса, имя пользователя, его запустившего, название сеанса, ID и PID.

Применение команды QPROCESS через интерфейс командной строки в Windows 7

TASKKILL – используется для завершения процессов. Обязательным аргументом является наименование элемента, который нужно остановить. Он указывается после атрибута /IM. Также можно произвести завершение не по имени, а по идентификатору процесса. В этом случае используется атрибут /PID.

Применение команды TASKKILL с атрибутами через интерфейс командной строки в Windows 7

Работа в сети

С помощью командной строки существует возможность управлять различными действиями в сети.

GETMAC – запускает отображение MAC-адреса подключенной к компьютеру сетевой карты. В случае наличия нескольких адаптеров отображаются все их адреса.

Применение команды GETMAC через интерфейс командной строки в Windows 7

NETSH – инициирует запуск одноименной утилиты, с помощью которой производится демонстрация информации о параметрах сети и их изменение. Данная команда, ввиду своей очень широкой функциональности, имеет огромное количество атрибутов, каждый из которых отвечает за выполнение определенной задачи. Для получения подробной информации о них можно воспользоваться справкой, применив следующее командное выражение:

netsh /?

Запуск справки для команды netsh через интерфейс командной строки в Windows 7

NETSTAT – отображение статистической информации о сетевых подключениях.

Применение команды NETSTAT через интерфейс командной строки в Windows 7

Другие команды

Также существует ряд других командных выражений, применяемых при использовании CMD.EXE, которые нельзя выделить в отдельные группы.

TIME – просмотр и установка системного времени ПК. При вводе данного командного выражения происходит вывод на экран текущего времени, которое в самой нижней строке можно изменить на любое другое.

Применение команды TIME через интерфейс командной строки в Windows 7

DATE – команда по синтаксису полностью аналогична предыдущей, но применяется не для вывода и изменения времени, а для запуска данных процедур в отношении даты.

Применение команды DATE через интерфейс командной строки в Windows 7

SHUTDOWN – выключает компьютер. Данное выражение можно использовать, как локально, так и удаленно.

Применение команды SHUTDOWN через интерфейс командной строки в Windows 7

BREAK – отключение или запуск режима обработки сочетания кнопок Ctrl+C.

Применение команды BREAK через интерфейс командной строки в Windows 7

ECHO – выводит текстовые сообщения и применяется для переключения режимов их отображения.

Применение команды ECHO через интерфейс командной строки в Windows 7

Это далеко не полный список всех команд, которые применяются при использовании интерфейса CMD.EXE. Тем не менее мы попытались раскрыть наименования, а также вкратце описать синтаксис и основные функции самых востребованных из них, для удобства разбив на группы по назначению.

Command Description Append The append command can be used by programs to open files in another directory as if they were located in the current directory. The append command is not available in 64-bit versions of Windows 7. Arp The arp command is used to display or change entries in the ARP cache. Assoc The assoc command is used to display or change the file type associated with a particular file extension. At The at command is used to schedule commands and other programs to run at a specific date and time. Attrib The attrib command is used to change the attributes of a single file or a directory. Auditpol The auditpol command is used to display or change audit policies. Bcdboot The bcdboot command is used to copy boot files to the system partition and to create a new system BCD store. Bcdedit The bcdedit command is used to view or make changes to Boot Configuration Data. Bdehdcfg The bdehdcfg command is ed to prepare a hard drive for BitLocker Drive Encryption. Bitsadmin The bitsadmin command is used to create, manage, and monitor download and upload jobs. While the bitsadmin command is available in Windows 7, it is being phased out. The BITS PowerShell cmdlets should be used instead. Bootcfg The bootcfg command is used to build, modify, or view the contents of the boot.ini file, a hidden file that is used to identify in what folder, on which partition, and on which hard drive Windows is located. Bootcfg is available in Windows 7 but it serves no real value since boot.ini is not used in these operating systems. The bcdedit command should be used instead. Bootsect The bootsect command is used to configure the master boot code to one compatible with BOOTMGR (Windows 7) or NTLDR (Windows XP and earlier). The bootsect command is only from the Command Prompt available in System Recovery Options. Break The break command sets or clears extended CTRL+C checking on DOS systems. The break command is available in Windows 7 to provide compatibility with MS-DOS files but it has no effect in Windows itself. Cacls The cacls command is used to display or change access control lists of files. The cacls command is being phased out in favor of the icacls command, which should be used instead. Call The call command is used to run a script or batch program from within another script or batch program. The call command has no effect outside of a script or batch file. In other words, running the call command at the Command Prompt or MS-DOS prompt will do nothing. Cd The cd command is the shorthand version of the chdir command. Certreq The certreq command is used to perform various certification authority (CA) certificate functions. Certutil The certutil command is used to dump and display certification authority (CA) configuration information in addition to other CA functions. Change The change command changes various terminal server settings like install modes, COM port mappings, and logons. Chcp The chcp command displays or configures the active code page number. Chdir The chdir command is used to display the drive letter and folder that you are currently in. Chdir can also be used to change the drive and/or directory that you want to work in. Chglogon The chglogon command enables, disables, or drains terminal server session logins. Executing the chglogon command is the same as executing change logon. Chgport The chgport command can be used to display or change COM port mappings for DOS compatibility. Executing the chgport command is the same as executing change port. Chgusr The chgusr command is used to change the install mode for the terminal server. Executing the chgusr command is the same as executing change user. Chkdsk The chkdsk command, often referred to as check disk, is used to identify and correct certain hard drive errors. Chkntfs The chkntfs command is used to configure or display the checking of the disk drive during the Windows boot process. Choice The choice command is used within a script or batch program to provide a list of choices and return the value of that choice to the program. Cipher The cipher command shows or changes the encryption status of files and folders on NTFS partitions. Clip The clip command is used to redirect the output from any command to the clipboard in Windows. Cls The cls command clears the screen of all previously entered commands and other text. Cmd The cmd command starts a new instance of the cmd.exe command interpreter. Cmdkey The cmdkey command is used to show, create, and remove stored user names and passwords. Cmstp The cmstp command installs or uninstalls a Connection Manager service profile. Color The color command is used to change the colors of the text and background within the Command Prompt window. Command The command command starts a new instance of the command.com command interpreter. The command command is not available in 64-bit versions of Windows 7. Comp The comp command is used to compare the contents of two files or sets of files. Compact The compact command is used to show or change the compression state of files and directories on NTFS partitions. Convert The convert command is used to convert FAT or FAT32 formatted volumes to the NTFS format. Copy The copy command does simply that — it copies one or more files from one location to another. The xcopy command is considered to be a more «powerful» version of the copy command. Cscript The cscript command is used to execute scripts via Microsoft Script Host. The cscript command is most popularly used to manage printers from the command line using scripts like prncnfg.vbs, prndrvr.vbs, prnmngr.vbs, and others. Date The date command is used to show or change the current date. Debug The debug command starts Debug, a command line application used to test and edit programs. The debug command is not available in 64-bit versions of Windows 7. Defrag The defrag command is used to defragment a drive you specify. The defrag command is the command line version of Microsoft’s Disk Defragmenter. Del The del command is used to delete one or more files. The del command is the same as the erase command. Diantz The diantz command is used to losslessly compress one or more files. The diantz command is sometimes called Cabinet Maker. The diantz command is the same as the makecab command. Dir The dir command is used to display a list of files and folders contained inside the folder that you are currently working in. The dir command also displays other important information like the hard drive’s serial number, the total number of files listed, their combined size, the total amount of free space left on the drive, and more. Diskcomp The diskcomp command is used to compare the contents of two floppy disks. Diskcopy The diskcopy command is used to copy the entire contents of one floppy disk to another. Diskpart The diskpart command is used to create, manage, and delete hard drive partitions. Diskperf The diskperf command is used to manage disk performance counters remotely. Diskraid The diskraid command starts the DiskRAID tool which is used to manage and configure RAID arrays. Dism The dism command starts the Deployment Image Servicing and Management tool (DISM). The DISM tool is used to manage features in Windows images. Dispdiag The dispdiag command is used to output a log of information about the display system. Djoin The djoin command is used to create a new computer account in a domain. Doskey The doskey command is used to edit command lines, create macros, and recall previously entered commands. Dosx The dosx command is used to start DOS Protected Mode Interface (DPMI), a special mode designed to give MS-DOS applications access to more than the normally allowed 640 KB. The dosx command is not available in 64-bit versions of Windows 7. The dosx command and DPMI is only available in Windows 7 to support older MS-DOS programs. Driverquery The driverquery command is used to show a list of all installed drivers. Echo The echo command is used to show messages, most commonly from within script or batch files. The echo command can also be used to turn the echoing feature on or off. Edit The edit command starts the MS-DOS Editor tool which is used to create and modify text files. The edit command is not available in 64-bit versions of Windows 7. Edlin The edlin command starts the Edlin tool which is used to create and modify text files from the command line. The edlin command is not available in 64-bit versions of Windows 7. Endlocal The endlocal command is used to end the localization of environment changes inside a batch or script file. Erase The erase command is used to delete one or more files. The erase command is the same as the del command. Esentutl The esentutl command is used to manage Extensible Storage Engine databases. Eventcreate The eventcreate command is used to create a custom event in an event log. Exe2bin The exe2bin command is used to convert a file of the EXE file type (executable file) to a binary file. The exe2bin command is not available in any 64-bit version of Windows 7. Exit The exit command is used to end the cmd.exe (Windows) or command.com (MS-DOS) session that you’re currently working in. Expand The expand command is used to extract the files and folders contained in Microsoft Cabinet (CAB) files. Extrac32 The extrac32 command is used to extract the files and folders contained in Microsoft Cabinet (CAB) files. The extrac32 command is actually a CAB extraction program for use by Internet Explorer but can be used to extract any Microsoft Cabinet file. Use the expand command instead of the extrac32 command if possible. Fastopen The fastopen command is used to add a program’s hard drive location to a special list stored in memory, potentially improving the program’s launch time by removing the need for MS-DOS to locate the application on the drive. The fastopen command is not available in 64-bit versions of Windows 7. Fastopen is only available in Windows 7 to support older MS-DOS files. Fc The fc command is used to compare two individual or sets of files and then show the differences between them. Find The find command is used to search for a specified text string in one or more files. Findstr The findstr command is used to find text string patterns in one or more files. Finger The finger command is used to return information about one or more users on a remote computer that’s running the Finger service. Fltmc The fltmc command is used to load, unload, list, and otherwise manage Filter drivers. For The for command is used to run a specified command for each file in a set of files. The for command is most often used within a batch or script file. Forfiles The forfiles command selects one or more files to execute a specified command on. The forfiles command is most often used within a batch or script file. Format The format command is used to format a drive in the file system that you specify. Drive formatting is also available from Disk Management. Fsutil The fsutil command is used to perform various FAT and NTFS file system tasks like managing reparse points and sparse files, dismounting a volume, and extending a volume. Ftp The ftp command can used to transfer files to and from another computer. The remote computer must be operating as an FTP server. Ftype The ftype command is used to define a default program to open a specified file type. Getmac The getmac command is used to display the media access control (MAC) address of all the network controllers on a system. Goto The goto command is used in a batch or script file to direct the command process to a labeled line in the script. Gpresult The gpresult command is used to display Group Policy settings. Gpupdate The gpupdate command is used to update Group Policy settings. Graftabl The graftabl command is used to enable the ability of Windows to display an extended character set in graphics mode. The graftabl command is not available in 64-bit versions of Windows 7. Graphics The graphics command is used to load a program that can print graphics. The graphics command is not available in 64-bit versions of Windows 7. Help The help command provides more detailed information on any of the other Command Prompt or MS-DOS commands. Hostname The hostname command displays the name of the current host. Hwrcomp The hwrcomp command is used to compile custom dictionaries for handwriting recognition. Hwrreg The hwrreg command is used to install a previously compiled custom dictionary for handwriting recognition. Icacls The icacls command is used to display or change access control lists of files. The icacls command is an updated version of the cacls command. If The if command is used to perform conditional functions in a batch file. Ipconfig The ipconfig command is used to display detailed IP information for each network adapter utilizing TCP/IP. The ipconfig command can also be used to release and renew IP addresses on systems configured to receive them via a DHCP server. Irftp The irftp command is used to transmit files over an infrared link. Iscsicli The iscsicli command starts the Microsoft iSCSI Initiator, used to manage iSCSI. Kb16 The kb16 command is used to support MS-DOS files that need to configure a keyboard for a specific language. The kb16 command is not available in 64-bit versions of Windows 7. The kb16 command only exists to support older MS-DOS files. Klist The klist command is used to list Kerberos service tickets. The klist command can also be used to purge Kerberos tickets. Ksetup The ksetup command is used to configure connections to a Kerberos server. Ktmutil The ktmutil command starts the Kernel Transaction Manager utility. Label The label command is used to manage the volume label of a disk. Loadfix The loadfix command is used to load the specified program in the first 64K of memory and then runs the program. The loadfix command is not available in 64-bit versions of Windows 7. Lodctr The lodctr command is used to update registry values related to performance counters. Logman The logman command is used to create and manage Event Trace Session and Performance logs. The logman command also supports many functions of Performance Monitor. Logoff The logoff command is used to terminate a session. Lpq The lpq command displays the status of a print queue on a computer running Line Printer Daemon (LPD). The lpq command is not available by default in Windows 7 but can be enabled by turning on the LPD Print Service and LPR Port Monitor features from Programs and Features in Control Panel. Lpr The lpr command is used to send a file to a computer running Line Printer Daemon (LPD). The lpr command is not available by default in Windows 7 but can be enabled by turning on the LPD Print Service and LPR Port Monitor features from Programs and Features in Control Panel. Makecab The makecab command is used to losslessly compress one or more files. The makecab command is sometimes called Cabinet Maker. The makecab command is the same as the diantz command. Manage-bde The manage-bde command is used to configure BitLocker Drive Encryption from the command line. Md The md command is the shorthand version of the mkdir command. Mem The mem command shows information about used and free memory areas and programs that are currently loaded into memory in the MS-DOS subsystem. The mem command is not available in 64-bit versions of Windows 7. Mkdir The mkdir command is used to create a new folder. Mklink The mklink command is used to create a symbolic link. Mode The mode command is used to configure system devices, most often COM and LPT ports. Mofcomp   More The more command is used to display the information contained in a text file. The more command can also be used to paginate the results of any other Command Prompt or MS-DOS command. Mount The mount command is used to mount Network File System (NFS) network shares. The mount command is not available by default in Windows 7 but can be enabled by turning on the Services for NFS Windows feature from Programs and Features in Control Panel. Mountvol The mountvol command is used to display, create, or remove volume mount points. Move The move command is used to move one or files from one folder to another. The move command is also used to rename directories. Mrinfo The mrinfo command is used to provide information about a router’s interfaces and neighbors. Msg The msg command is used to send a message to a user. Msiexec The msiexec command is used to start Windows Installer, a tool used to install and configure software. Muiunattend The muiunattend command starts the Multilanguage User Interface unattended setup process. Nbtstat The nbtstat command is used to show TCP/IP information and other statistical information about a remote computer. Net The net command is used to display, configure, and correct a wide variety of network settings. Net1 The net1 command is used to display, configure, and correct a wide variety of network settings. The net command should be used instead of the net1 command. The net1 command was made available in Windows NT and Windows 2000 as a temporary fix for a Y2K issue that the net command had, which was corrected before the release of Windows XP. The net1 command remains in later versions of Windows only for compatibility with older programs and scripts that utilized the command. Netcfg The netcfg command is used to install the Windows Preinstallation Environment (WinPE), a lightweight version of Windows used to deploy workstations. Netsh The netsh command is used to start Network Shell, a command-line utility used to manage the network configuration of the local, or a remote, computer. Netstat The netstat command is most commonly used to display all open network connections and listening ports. Nfsadmin The nfsadmin command is used to manage Server for NFS or Client for NFS from the command line. The nfsadmin command is not available by default in Windows 7 but can be enabled by turning on the Services for NFS Windows feature from Programs and Features in Control Panel. The nfsadmin command is not available in Windows 8 because Service for UNIX (SFU) was discontinued. Nlsfunc The nlsfunc command is used to load information specific to a particular country or region. The nlsfunc command is not available in 64-bit versions of Windows 7. Nlsfunc is only available in Windows 7 to support older MS-DOS files. Nltest The nltest command is used to test secure channels between Windows computers in a domain and between domain controllers that are trusting other domains. Nslookup The nslookup is most commonly used to display the hostname of an entered IP address. The nslookup command queries your configured DNS server to discover the IP address. Ocsetup The ocsetup command starts the Windows Optional Component Setup tool, used to install additional Windows features. Openfiles The openfiles command is used to display and disconnect open files and folders on a system. Path The path command is used to display or set a specific path available to executable files. Pathping The pathping command functions much like the tracert command but will also report information about network latency and loss at each hop. Pause The pause command is used within a batch or script file to pause the processing of the file. When the pause command is used, a «Press any key to continue…» message displays in the command window. Ping The ping command sends an Internet Control Message Protocol (ICMP) Echo Request message to a specified remote computer to verify IP-level connectivity. Pkgmgr The pkgmgr command is used to start the Windows Package Manager from the Command Prompt. Package Manager installs, uninstalls, configures, and updates features and packages for Windows. Pnpunattend The pnpunattend command is used to automate the installation of hardware device drivers. Pnputil The pnputil command is used to start the Microsoft PnP Utility, a tool used to install a Plug and Play device from the command line. Popd The popd command is used to change the current directory to the one most recently stored by the pushd command. The popd command is most often utilized from within a batch or script file. Powercfg The powercfg command is used to manage the Windows power management settings from the command line. Print The print command is used to print a specified text file to a specified printing device. Prompt The prompt command is used to customize the appearance of the prompt text in Command Prompt or MS-DOS. Pushd The pushd command is used to store a directory for use, most commonly from within a batch or script program. Qappsrv The qappsrv command is used to display all Remote Desktop Session Host servers available on the network. Qprocess The qprocess command is used to display information about running processes. Query The query command is used to display the status of a specified service. Quser The quser command is used to display information about users currently logged on to the system. Qwinsta The qwinsta command is used to display information about open Remote Desktop Sessions. Rasautou The rasautou command is used to manage Remote Access Dialer AutoDial addresses. Rasdial The rasdial command is used to start or end a network connection for a Microsoft client. Rcp The rcp command is used to copy files between a Windows computer and a system running the rshd daemon. The rcp command is not available by default in Windows 7 but can be enabled by turning on the Subsystem for UNIX-based Applications Windows feature from Programs and Features in Control Panel and then installing the Utilities and SDK for UNIX-based Applications available here. Rd The rd command is the shorthand version of the rmdir command. Rdpsign The rdpsign command is used to sign a Remote Desktop Protocol (RDP) file. Reagentc The reagentc command is used to configure the Windows Recovery Environment (RE). Recover The recover command is used to recover readable data from a bad or defective disk. Reg The reg command is used to manage the Windows Registry from the command line. The reg command can perform common registry functions like adding registry keys, exporting the registry, etc. Regini The regini command is used to set or change registry permissions and registry values from the command line. Regsvr32 The regsvr32 command is used to register a DLL file as a command component in the Windows Registry. Relog The relog command is used to create new performance logs from data in existing performance logs. Rem The rem command is used to record comments or remarks in a batch or script file. Ren The ren command is the shorthand version of the rename command. Rename The rename command is used to change the name of the individual file that you specify. Repair-bde The repair-bde command is used to repair or decrypt a damaged drive that’s been encrypted using BitLocker. Replace The replace command is used to replace one or more files with one or more other files. Reset The reset command, executed as reset session, is used to reset the session subsystem software and hardware to known initial values. Rmdir The rmdir command is used to delete an existing or completely empty folder. Robocopy The robocopy command is used to copy files and directories from one location to another. This command is also called Robust File Copy. The robocopy command is superior to both the copy command and the xcopy command because robocopy supports many more options. Route The route command is used to manipulate network routing tables. Rpcinfo The rpcinfo command makes a remote procedure call (RPC) to an RPC server and reports what it finds. The rpcinfo command is not available by default in Windows 7 but can be enabled by turning on the Services for NFS Windows feature from Programs and Features in Control Panel. Rpcping The rpcping command is used to ping a server using RPC. Rsh The rsh command is used to run commands on remote computers running the rsh daemon. The rsh command is not available by default in Windows 7 but can be enabled by turning on the Subsystem for UNIX-based Applications Windows feature from Programs and Features in Control Panel and then installing the Utilities and SDK for UNIX-based Applications available here. Runas The runas command is used to execute a program using another user’s credentials. Rwinsta The rwinsta command is the shorthand version of the reset session command. Sc The sc command is used to configure information about services. The sc command communicates with the Service Control Manager. Schtasks The schtasks command is used to schedule specified programs or commands to run at certain times. The schtasks command can be used to create, delete, query, change, run, and end scheduled tasks. Sdbinst The sdbinst command is used to deploy customized SDB database files. Secedit The secedit command is used to configure and analyze system security by comparing the current security configuration to a template. Set The set command is used to display, enable, or disable environment variables in MS-DOS or from the Command Prompt. Setlocal The setlocal command is used to start the localization of environment changes inside a batch or script file. Setspn The setspn command is used to manage the Service Principal Names (SPN) for an Active Directory (AD) service account. Setver The setver command is used to set the MS-DOS version number that MS-DOS reports to a program. The setver command is not available in 64-bit versions of Windows 7. Setx The setx command is used to create or change environment variables in the user environment or the system environment. Sfc The sfc command is used to verify and replace important Windows system files. The sfc command is also referred to as System File Checker or Windows Resource Checker depending on the operating system. Shadow The shadow command is used to monitor another Remote Desktop Services session. Share The share command is used to install file locking and file sharing functions in MS-DOS. The share command is not available in 64-bit versions of Windows 7. Share is only available in Windows 7 to support older MS-DOS files. Shift The shift command is used to change the position of replaceable parameters in a batch or script file. Showmount The showmount command is used to display information about NFS mounted file systems. The showmount command is not available by default in Windows 7 but can be enabled by turning on the Services for NFS Windows feature from Programs and Features in Control Panel. Shutdown The shutdown command can be used to shut down, restart, or log off the current system or a remote computer. Sort The sort command is used to read data from a specified input, sort that data, and return the results of that sort to the Command Prompt screen, a file, or another output device. Start The start command is used to open a new command line window to run a specified program or command. The start command can also be used to start an application without creating a new window. Subst The subst command is used to associate a local path with a drive letter. The subst command is a lot like the net use command except a local path is used instead of a shared network path. Sxstrace The sxstrace command is used to start the WinSxs Tracing Utility, a programming diagnostic tool. Systeminfo The systeminfo command is used to display basic Windows configuration information for the local or a remote computer. Takeown The takedown command is used to regain access to a file that an administrator was denied access to when reassigning ownership of the file. Taskkill The taskkill command is used to terminate a running task. The taskkill command is the command line equivalent of ending a process in Task Manager in Windows. Tasklist Displays a list of applications, services, and the Process ID (PID) currently running on either a local or a remote computer. Tcmsetup The tcmsetup command is used to set up or disable the Telephony Application Programming Interface (TAPI) client. Telnet The telnet command is used to communicate with remote computers that use the Telnet protocol. The telnet command is not available by default in Windows 7 but can be enabled by turning on the Telnet Client Windows feature from Programs and Features in Control Panel. Tftp The tftp command is used to transfer files to and from a remote computer that’s running the Trivial File Transfer Protocol (TFTP) service or daemon. The tftp command is not available by default in Windows 7 but can be enabled by turning on the TFTP Client Windows feature from Programs and Features in Control Panel. Time The time command is used to show or change the current time. Timeout The timeout command is typically used in a batch or script file to provide a specified timeout value during a procedure. The timeout command can also be used to ignore keypresses. Title The title command is used to set the Command Prompt window title. Tlntadmn The tlntadmn command is used to administer a local or remote computer running Telnet Server. The tlntadmn command is not available by default in Windows 7 but can be enabled by turning on the Telnet Server Windows feature from Programs and Features in Control Panel. Tracerpt The tracerpt command is used to process event trace logs or real-time data from instrumented event trace providers. Tracert The tracert command sends Internet Control Message Protocol (ICMP) Echo Request messages to a specified remote computer with increasing Time to Live (TTL) field values and displays the IP address and hostname, if available, of the router interfaces between the source and destination. Tree The tree command is used to graphically display the folder structure of a specified drive or path. Tscon The tscon command is used to attach a user session to a Remote Desktop session. Tsdiscon The tsdiscon command is used to disconnect a Remote Desktop session. Tskill The tskill command is used to end the specified process. Type The type command is used to display the information contained in a text file. Typeperf The typerperf command displays performance data in the Command Prompt window or writes the data to a specified log file. Tzutil The tzutil command is used to display or configure the current system’s time zone. The tzutil command can also be used to enable or disable Daylight Saving Time adjustments. Umount The umount command is used to remove Network File System (NFS) mounted network shares. The umount command is not available by default in Windows 7 but can be enabled by turning on the Services for NFS Windows feature from Programs and Features in Control Panel. Unlodctr The unlodctr command removes Explain text and Performance counter names for a service or device driver from the Windows Registry. Vaultcmd The vaultcmd command is used to create, remove, and show stored credentials. Ver The ver command is used to display the current Windows or MS-DOS version number. Verify The verify command is used to enable or disable the ability of Command Prompt, or MS-DOS, to verify that files are written correctly to a disk. Vol The vol command shows the volume label and the serial number of a specified disk, assuming this information exists. Vssadmin The vssadmin command starts the Volume Shadow Copy Service administrative command line tool which displays current volume shadow copy backups and all installed shadow copy writers and providers. W32tm The w32tm command is used to diagnose issues with Windows Time. Waitfor The waitfor command is used to send or wait for a signal on a system. Wbadmin The wbadmin command is used to start and stop backup jobs, display details about a previous backup, list the items within a backup, and report on the status of a currently running backup. Wecutil The wecutil command is used to manage subscriptions to events that are forwarded from WS-Management supported computers. Wevtutil The wevtutil command starts the Windows Events Command Line Utility which is used to manage event logs and publishers. Where The where command is used to search for files that match a specified pattern. Whoami The whoami command is used to retrieve user name and group information on a network. Winmgmt The winmgmt command starts the command line version of WMI (Windows Management Instrumentation), a scripting tool in Windows. Winrm The winrm command is used to start the command line version of Windows Remote Management, used to manage secure communications with local and remote computers using web services. Winrs The winrs command is used to open a secure command window with a remote host. Winsat The winsat command starts the Windows System Assessment Tool, a program that assesses various features, attributes, and capabilities of a computer running Windows. Wmic The wmic command starts the Windows Management Instrumentation Command line (WMIC), a scripting interface that simplifies the use of Windows Management Instrumentation (WMI) and systems managed via WMI. Wsmanhttpconfig The wsmanhttpconfig command is used to manage aspects of the Windows Remote Management (WinRM) service. Xcopy The xcopy command can copy one or more files or directory trees from one location to another. The xcopy command is generally considered a more «powerful» version of the copy command though the robocopy command trumps even xcopy. A command by the name of xcopy32 existed in Windows 95 and Windows 98. To avoid a long and confusing explanation here, just know that no matter if you executed the xcopy command or the xcopy32 command, you were always executing the most updated version of the command. Xwizard The xwizard command, short for Extensible Wizard, is used to register data in Windows, often from a preconfigured XML file.
Command Description Append The append command can be used by programs to open files in another directory as if they were located in the current directory. The append command is not available in 64-bit versions of Windows 7. Arp The arp command is used to display or change entries in the ARP cache. Assoc The assoc command is used to display or change the file type associated with a particular file extension. At The at command is used to schedule commands and other programs to run at a specific date and time. Attrib The attrib command is used to change the attributes of a single file or a directory. Auditpol The auditpol command is used to display or change audit policies. Bcdboot The bcdboot command is used to copy boot files to the system partition and to create a new system BCD store. Bcdedit The bcdedit command is used to view or make changes to Boot Configuration Data. Bdehdcfg The bdehdcfg command is ed to prepare a hard drive for BitLocker Drive Encryption. Bitsadmin The bitsadmin command is used to create, manage, and monitor download and upload jobs. While the bitsadmin command is available in Windows 7, it is being phased out. The BITS PowerShell cmdlets should be used instead. Bootcfg The bootcfg command is used to build, modify, or view the contents of the boot.ini file, a hidden file that is used to identify in what folder, on which partition, and on which hard drive Windows is located. Bootcfg is available in Windows 7 but it serves no real value since boot.ini is not used in these operating systems. The bcdedit command should be used instead. Bootsect The bootsect command is used to configure the master boot code to one compatible with BOOTMGR (Windows 7) or NTLDR (Windows XP and earlier). The bootsect command is only from the Command Prompt available in System Recovery Options. Break The break command sets or clears extended CTRL+C checking on DOS systems. The break command is available in Windows 7 to provide compatibility with MS-DOS files but it has no effect in Windows itself. Cacls The cacls command is used to display or change access control lists of files. The cacls command is being phased out in favor of the icacls command, which should be used instead. Call The call command is used to run a script or batch program from within another script or batch program. The call command has no effect outside of a script or batch file. In other words, running the call command at the Command Prompt or MS-DOS prompt will do nothing. Cd The cd command is the shorthand version of the chdir command. Certreq The certreq command is used to perform various certification authority (CA) certificate functions. Certutil The certutil command is used to dump and display certification authority (CA) configuration information in addition to other CA functions. Change The change command changes various terminal server settings like install modes, COM port mappings, and logons. Chcp The chcp command displays or configures the active code page number. Chdir The chdir command is used to display the drive letter and folder that you are currently in. Chdir can also be used to change the drive and/or directory that you want to work in. Chglogon The chglogon command enables, disables, or drains terminal server session logins. Executing the chglogon command is the same as executing change logon. Chgport The chgport command can be used to display or change COM port mappings for DOS compatibility. Executing the chgport command is the same as executing change port. Chgusr The chgusr command is used to change the install mode for the terminal server. Executing the chgusr command is the same as executing change user. Chkdsk The chkdsk command, often referred to as check disk, is used to identify and correct certain hard drive errors. Chkntfs The chkntfs command is used to configure or display the checking of the disk drive during the Windows boot process. Choice The choice command is used within a script or batch program to provide a list of choices and return the value of that choice to the program. Cipher The cipher command shows or changes the encryption status of files and folders on NTFS partitions. Clip The clip command is used to redirect the output from any command to the clipboard in Windows. Cls The cls command clears the screen of all previously entered commands and other text. Cmd The cmd command starts a new instance of the cmd.exe command interpreter. Cmdkey The cmdkey command is used to show, create, and remove stored user names and passwords. Cmstp The cmstp command installs or uninstalls a Connection Manager service profile. Color The color command is used to change the colors of the text and background within the Command Prompt window. Command The command command starts a new instance of the command.com command interpreter. The command command is not available in 64-bit versions of Windows 7. Comp The comp command is used to compare the contents of two files or sets of files. Compact The compact command is used to show or change the compression state of files and directories on NTFS partitions. Convert The convert command is used to convert FAT or FAT32 formatted volumes to the NTFS format. Copy The copy command does simply that — it copies one or more files from one location to another. The xcopy command is considered to be a more «powerful» version of the copy command. Cscript The cscript command is used to execute scripts via Microsoft Script Host. The cscript command is most popularly used to manage printers from the command line using scripts like prncnfg.vbs, prndrvr.vbs, prnmngr.vbs, and others. Date The date command is used to show or change the current date. Debug The debug command starts Debug, a command line application used to test and edit programs. The debug command is not available in 64-bit versions of Windows 7. Defrag The defrag command is used to defragment a drive you specify. The defrag command is the command line version of Microsoft’s Disk Defragmenter. Del The del command is used to delete one or more files. The del command is the same as the erase command. Diantz The diantz command is used to losslessly compress one or more files. The diantz command is sometimes called Cabinet Maker. The diantz command is the same as the makecab command. Dir The dir command is used to display a list of files and folders contained inside the folder that you are currently working in. The dir command also displays other important information like the hard drive’s serial number, the total number of files listed, their combined size, the total amount of free space left on the drive, and more. Diskcomp The diskcomp command is used to compare the contents of two floppy disks. Diskcopy The diskcopy command is used to copy the entire contents of one floppy disk to another. Diskpart The diskpart command is used to create, manage, and delete hard drive partitions. Diskperf The diskperf command is used to manage disk performance counters remotely. Diskraid The diskraid command starts the DiskRAID tool which is used to manage and configure RAID arrays. Dism The dism command starts the Deployment Image Servicing and Management tool (DISM). The DISM tool is used to manage features in Windows images. Dispdiag The dispdiag command is used to output a log of information about the display system. Djoin The djoin command is used to create a new computer account in a domain. Doskey The doskey command is used to edit command lines, create macros, and recall previously entered commands. Dosx The dosx command is used to start DOS Protected Mode Interface (DPMI), a special mode designed to give MS-DOS applications access to more than the normally allowed 640 KB. The dosx command is not available in 64-bit versions of Windows 7. The dosx command and DPMI is only available in Windows 7 to support older MS-DOS programs. Driverquery The driverquery command is used to show a list of all installed drivers. Echo The echo command is used to show messages, most commonly from within script or batch files. The echo command can also be used to turn the echoing feature on or off. Edit The edit command starts the MS-DOS Editor tool which is used to create and modify text files. The edit command is not available in 64-bit versions of Windows 7. Edlin The edlin command starts the Edlin tool which is used to create and modify text files from the command line. The edlin command is not available in 64-bit versions of Windows 7. Endlocal The endlocal command is used to end the localization of environment changes inside a batch or script file. Erase The erase command is used to delete one or more files. The erase command is the same as the del command. Esentutl The esentutl command is used to manage Extensible Storage Engine databases. Eventcreate The eventcreate command is used to create a custom event in an event log. Exe2bin The exe2bin command is used to convert a file of the EXE file type (executable file) to a binary file. The exe2bin command is not available in any 64-bit version of Windows 7. Exit The exit command is used to end the cmd.exe (Windows) or command.com (MS-DOS) session that you’re currently working in. Expand The expand command is used to extract the files and folders contained in Microsoft Cabinet (CAB) files. Extrac32 The extrac32 command is used to extract the files and folders contained in Microsoft Cabinet (CAB) files. The extrac32 command is actually a CAB extraction program for use by Internet Explorer but can be used to extract any Microsoft Cabinet file. Use the expand command instead of the extrac32 command if possible. Fastopen The fastopen command is used to add a program’s hard drive location to a special list stored in memory, potentially improving the program’s launch time by removing the need for MS-DOS to locate the application on the drive. The fastopen command is not available in 64-bit versions of Windows 7. Fastopen is only available in Windows 7 to support older MS-DOS files. Fc The fc command is used to compare two individual or sets of files and then show the differences between them. Find The find command is used to search for a specified text string in one or more files. Findstr The findstr command is used to find text string patterns in one or more files. Finger The finger command is used to return information about one or more users on a remote computer that’s running the Finger service. Fltmc The fltmc command is used to load, unload, list, and otherwise manage Filter drivers. For The for command is used to run a specified command for each file in a set of files. The for command is most often used within a batch or script file. Forfiles The forfiles command selects one or more files to execute a specified command on. The forfiles command is most often used within a batch or script file. Format The format command is used to format a drive in the file system that you specify. Drive formatting is also available from Disk Management. Fsutil The fsutil command is used to perform various FAT and NTFS file system tasks like managing reparse points and sparse files, dismounting a volume, and extending a volume. Ftp The ftp command can used to transfer files to and from another computer. The remote computer must be operating as an FTP server. Ftype The ftype command is used to define a default program to open a specified file type. Getmac The getmac command is used to display the media access control (MAC) address of all the network controllers on a system. Goto The goto command is used in a batch or script file to direct the command process to a labeled line in the script. Gpresult The gpresult command is used to display Group Policy settings. Gpupdate The gpupdate command is used to update Group Policy settings. Graftabl The graftabl command is used to enable the ability of Windows to display an extended character set in graphics mode. The graftabl command is not available in 64-bit versions of Windows 7. Graphics The graphics command is used to load a program that can print graphics. The graphics command is not available in 64-bit versions of Windows 7. Help The help command provides more detailed information on any of the other Command Prompt or MS-DOS commands. Hostname The hostname command displays the name of the current host. Hwrcomp The hwrcomp command is used to compile custom dictionaries for handwriting recognition. Hwrreg The hwrreg command is used to install a previously compiled custom dictionary for handwriting recognition. Icacls The icacls command is used to display or change access control lists of files. The icacls command is an updated version of the cacls command. If The if command is used to perform conditional functions in a batch file. Ipconfig The ipconfig command is used to display detailed IP information for each network adapter utilizing TCP/IP. The ipconfig command can also be used to release and renew IP addresses on systems configured to receive them via a DHCP server. Irftp The irftp command is used to transmit files over an infrared link. Iscsicli The iscsicli command starts the Microsoft iSCSI Initiator, used to manage iSCSI. Kb16 The kb16 command is used to support MS-DOS files that need to configure a keyboard for a specific language. The kb16 command is not available in 64-bit versions of Windows 7. The kb16 command only exists to support older MS-DOS files. Klist The klist command is used to list Kerberos service tickets. The klist command can also be used to purge Kerberos tickets. Ksetup The ksetup command is used to configure connections to a Kerberos server. Ktmutil The ktmutil command starts the Kernel Transaction Manager utility. Label The label command is used to manage the volume label of a disk. Loadfix The loadfix command is used to load the specified program in the first 64K of memory and then runs the program. The loadfix command is not available in 64-bit versions of Windows 7. Lodctr The lodctr command is used to update registry values related to performance counters. Logman The logman command is used to create and manage Event Trace Session and Performance logs. The logman command also supports many functions of Performance Monitor. Logoff The logoff command is used to terminate a session. Lpq The lpq command displays the status of a print queue on a computer running Line Printer Daemon (LPD). The lpq command is not available by default in Windows 7 but can be enabled by turning on the LPD Print Service and LPR Port Monitor features from Programs and Features in Control Panel. Lpr The lpr command is used to send a file to a computer running Line Printer Daemon (LPD). The lpr command is not available by default in Windows 7 but can be enabled by turning on the LPD Print Service and LPR Port Monitor features from Programs and Features in Control Panel. Makecab The makecab command is used to losslessly compress one or more files. The makecab command is sometimes called Cabinet Maker. The makecab command is the same as the diantz command. Manage-bde The manage-bde command is used to configure BitLocker Drive Encryption from the command line. Md The md command is the shorthand version of the mkdir command. Mem The mem command shows information about used and free memory areas and programs that are currently loaded into memory in the MS-DOS subsystem. The mem command is not available in 64-bit versions of Windows 7. Mkdir The mkdir command is used to create a new folder. Mklink The mklink command is used to create a symbolic link. Mode The mode command is used to configure system devices, most often COM and LPT ports. Mofcomp   More The more command is used to display the information contained in a text file. The more command can also be used to paginate the results of any other Command Prompt or MS-DOS command. Mount The mount command is used to mount Network File System (NFS) network shares. The mount command is not available by default in Windows 7 but can be enabled by turning on the Services for NFS Windows feature from Programs and Features in Control Panel. Mountvol The mountvol command is used to display, create, or remove volume mount points. Move The move command is used to move one or files from one folder to another. The move command is also used to rename directories. Mrinfo The mrinfo command is used to provide information about a router’s interfaces and neighbors. Msg The msg command is used to send a message to a user. Msiexec The msiexec command is used to start Windows Installer, a tool used to install and configure software. Muiunattend The muiunattend command starts the Multilanguage User Interface unattended setup process. Nbtstat The nbtstat command is used to show TCP/IP information and other statistical information about a remote computer. Net The net command is used to display, configure, and correct a wide variety of network settings. Net1 The net1 command is used to display, configure, and correct a wide variety of network settings. The net command should be used instead of the net1 command. The net1 command was made available in Windows NT and Windows 2000 as a temporary fix for a Y2K issue that the net command had, which was corrected before the release of Windows XP. The net1 command remains in later versions of Windows only for compatibility with older programs and scripts that utilized the command. Netcfg The netcfg command is used to install the Windows Preinstallation Environment (WinPE), a lightweight version of Windows used to deploy workstations. Netsh The netsh command is used to start Network Shell, a command-line utility used to manage the network configuration of the local, or a remote, computer. Netstat The netstat command is most commonly used to display all open network connections and listening ports. Nfsadmin The nfsadmin command is used to manage Server for NFS or Client for NFS from the command line. The nfsadmin command is not available by default in Windows 7 but can be enabled by turning on the Services for NFS Windows feature from Programs and Features in Control Panel. The nfsadmin command is not available in Windows 8 because Service for UNIX (SFU) was discontinued. Nlsfunc The nlsfunc command is used to load information specific to a particular country or region. The nlsfunc command is not available in 64-bit versions of Windows 7. Nlsfunc is only available in Windows 7 to support older MS-DOS files. Nltest The nltest command is used to test secure channels between Windows computers in a domain and between domain controllers that are trusting other domains. Nslookup The nslookup is most commonly used to display the hostname of an entered IP address. The nslookup command queries your configured DNS server to discover the IP address. Ocsetup The ocsetup command starts the Windows Optional Component Setup tool, used to install additional Windows features. Openfiles The openfiles command is used to display and disconnect open files and folders on a system. Path The path command is used to display or set a specific path available to executable files. Pathping The pathping command functions much like the tracert command but will also report information about network latency and loss at each hop. Pause The pause command is used within a batch or script file to pause the processing of the file. When the pause command is used, a «Press any key to continue…» message displays in the command window. Ping The ping command sends an Internet Control Message Protocol (ICMP) Echo Request message to a specified remote computer to verify IP-level connectivity. Pkgmgr The pkgmgr command is used to start the Windows Package Manager from the Command Prompt. Package Manager installs, uninstalls, configures, and updates features and packages for Windows. Pnpunattend The pnpunattend command is used to automate the installation of hardware device drivers. Pnputil The pnputil command is used to start the Microsoft PnP Utility, a tool used to install a Plug and Play device from the command line. Popd The popd command is used to change the current directory to the one most recently stored by the pushd command. The popd command is most often utilized from within a batch or script file. Powercfg The powercfg command is used to manage the Windows power management settings from the command line. Print The print command is used to print a specified text file to a specified printing device. Prompt The prompt command is used to customize the appearance of the prompt text in Command Prompt or MS-DOS. Pushd The pushd command is used to store a directory for use, most commonly from within a batch or script program. Qappsrv The qappsrv command is used to display all Remote Desktop Session Host servers available on the network. Qprocess The qprocess command is used to display information about running processes. Query The query command is used to display the status of a specified service. Quser The quser command is used to display information about users currently logged on to the system. Qwinsta The qwinsta command is used to display information about open Remote Desktop Sessions. Rasautou The rasautou command is used to manage Remote Access Dialer AutoDial addresses. Rasdial The rasdial command is used to start or end a network connection for a Microsoft client. Rcp The rcp command is used to copy files between a Windows computer and a system running the rshd daemon. The rcp command is not available by default in Windows 7 but can be enabled by turning on the Subsystem for UNIX-based Applications Windows feature from Programs and Features in Control Panel and then installing the Utilities and SDK for UNIX-based Applications available here. Rd The rd command is the shorthand version of the rmdir command. Rdpsign The rdpsign command is used to sign a Remote Desktop Protocol (RDP) file. Reagentc The reagentc command is used to configure the Windows Recovery Environment (RE). Recover The recover command is used to recover readable data from a bad or defective disk. Reg The reg command is used to manage the Windows Registry from the command line. The reg command can perform common registry functions like adding registry keys, exporting the registry, etc. Regini The regini command is used to set or change registry permissions and registry values from the command line. Regsvr32 The regsvr32 command is used to register a DLL file as a command component in the Windows Registry. Relog The relog command is used to create new performance logs from data in existing performance logs. Rem The rem command is used to record comments or remarks in a batch or script file. Ren The ren command is the shorthand version of the rename command. Rename The rename command is used to change the name of the individual file that you specify. Repair-bde The repair-bde command is used to repair or decrypt a damaged drive that’s been encrypted using BitLocker. Replace The replace command is used to replace one or more files with one or more other files. Reset The reset command, executed as reset session, is used to reset the session subsystem software and hardware to known initial values. Rmdir The rmdir command is used to delete an existing or completely empty folder. Robocopy The robocopy command is used to copy files and directories from one location to another. This command is also called Robust File Copy. The robocopy command is superior to both the copy command and the xcopy command because robocopy supports many more options. Route The route command is used to manipulate network routing tables. Rpcinfo The rpcinfo command makes a remote procedure call (RPC) to an RPC server and reports what it finds. The rpcinfo command is not available by default in Windows 7 but can be enabled by turning on the Services for NFS Windows feature from Programs and Features in Control Panel. Rpcping The rpcping command is used to ping a server using RPC. Rsh The rsh command is used to run commands on remote computers running the rsh daemon. The rsh command is not available by default in Windows 7 but can be enabled by turning on the Subsystem for UNIX-based Applications Windows feature from Programs and Features in Control Panel and then installing the Utilities and SDK for UNIX-based Applications available here. Runas The runas command is used to execute a program using another user’s credentials. Rwinsta The rwinsta command is the shorthand version of the reset session command. Sc The sc command is used to configure information about services. The sc command communicates with the Service Control Manager. Schtasks The schtasks command is used to schedule specified programs or commands to run at certain times. The schtasks command can be used to create, delete, query, change, run, and end scheduled tasks. Sdbinst The sdbinst command is used to deploy customized SDB database files. Secedit The secedit command is used to configure and analyze system security by comparing the current security configuration to a template. Set The set command is used to display, enable, or disable environment variables in MS-DOS or from the Command Prompt. Setlocal The setlocal command is used to start the localization of environment changes inside a batch or script file. Setspn The setspn command is used to manage the Service Principal Names (SPN) for an Active Directory (AD) service account. Setver The setver command is used to set the MS-DOS version number that MS-DOS reports to a program. The setver command is not available in 64-bit versions of Windows 7. Setx The setx command is used to create or change environment variables in the user environment or the system environment. Sfc The sfc command is used to verify and replace important Windows system files. The sfc command is also referred to as System File Checker or Windows Resource Checker depending on the operating system. Shadow The shadow command is used to monitor another Remote Desktop Services session. Share The share command is used to install file locking and file sharing functions in MS-DOS. The share command is not available in 64-bit versions of Windows 7. Share is only available in Windows 7 to support older MS-DOS files. Shift The shift command is used to change the position of replaceable parameters in a batch or script file. Showmount The showmount command is used to display information about NFS mounted file systems. The showmount command is not available by default in Windows 7 but can be enabled by turning on the Services for NFS Windows feature from Programs and Features in Control Panel. Shutdown The shutdown command can be used to shut down, restart, or log off the current system or a remote computer. Sort The sort command is used to read data from a specified input, sort that data, and return the results of that sort to the Command Prompt screen, a file, or another output device. Start The start command is used to open a new command line window to run a specified program or command. The start command can also be used to start an application without creating a new window. Subst The subst command is used to associate a local path with a drive letter. The subst command is a lot like the net use command except a local path is used instead of a shared network path. Sxstrace The sxstrace command is used to start the WinSxs Tracing Utility, a programming diagnostic tool. Systeminfo The systeminfo command is used to display basic Windows configuration information for the local or a remote computer. Takeown The takedown command is used to regain access to a file that an administrator was denied access to when reassigning ownership of the file. Taskkill The taskkill command is used to terminate a running task. The taskkill command is the command line equivalent of ending a process in Task Manager in Windows. Tasklist Displays a list of applications, services, and the Process ID (PID) currently running on either a local or a remote computer. Tcmsetup The tcmsetup command is used to set up or disable the Telephony Application Programming Interface (TAPI) client. Telnet The telnet command is used to communicate with remote computers that use the Telnet protocol. The telnet command is not available by default in Windows 7 but can be enabled by turning on the Telnet Client Windows feature from Programs and Features in Control Panel. Tftp The tftp command is used to transfer files to and from a remote computer that’s running the Trivial File Transfer Protocol (TFTP) service or daemon. The tftp command is not available by default in Windows 7 but can be enabled by turning on the TFTP Client Windows feature from Programs and Features in Control Panel. Time The time command is used to show or change the current time. Timeout The timeout command is typically used in a batch or script file to provide a specified timeout value during a procedure. The timeout command can also be used to ignore keypresses. Title The title command is used to set the Command Prompt window title. Tlntadmn The tlntadmn command is used to administer a local or remote computer running Telnet Server. The tlntadmn command is not available by default in Windows 7 but can be enabled by turning on the Telnet Server Windows feature from Programs and Features in Control Panel. Tracerpt The tracerpt command is used to process event trace logs or real-time data from instrumented event trace providers. Tracert The tracert command sends Internet Control Message Protocol (ICMP) Echo Request messages to a specified remote computer with increasing Time to Live (TTL) field values and displays the IP address and hostname, if available, of the router interfaces between the source and destination. Tree The tree command is used to graphically display the folder structure of a specified drive or path. Tscon The tscon command is used to attach a user session to a Remote Desktop session. Tsdiscon The tsdiscon command is used to disconnect a Remote Desktop session. Tskill The tskill command is used to end the specified process. Type The type command is used to display the information contained in a text file. Typeperf The typerperf command displays performance data in the Command Prompt window or writes the data to a specified log file. Tzutil The tzutil command is used to display or configure the current system’s time zone. The tzutil command can also be used to enable or disable Daylight Saving Time adjustments. Umount The umount command is used to remove Network File System (NFS) mounted network shares. The umount command is not available by default in Windows 7 but can be enabled by turning on the Services for NFS Windows feature from Programs and Features in Control Panel. Unlodctr The unlodctr command removes Explain text and Performance counter names for a service or device driver from the Windows Registry. Vaultcmd The vaultcmd command is used to create, remove, and show stored credentials. Ver The ver command is used to display the current Windows or MS-DOS version number. Verify The verify command is used to enable or disable the ability of Command Prompt, or MS-DOS, to verify that files are written correctly to a disk. Vol The vol command shows the volume label and the serial number of a specified disk, assuming this information exists. Vssadmin The vssadmin command starts the Volume Shadow Copy Service administrative command line tool which displays current volume shadow copy backups and all installed shadow copy writers and providers. W32tm The w32tm command is used to diagnose issues with Windows Time. Waitfor The waitfor command is used to send or wait for a signal on a system. Wbadmin The wbadmin command is used to start and stop backup jobs, display details about a previous backup, list the items within a backup, and report on the status of a currently running backup. Wecutil The wecutil command is used to manage subscriptions to events that are forwarded from WS-Management supported computers. Wevtutil The wevtutil command starts the Windows Events Command Line Utility which is used to manage event logs and publishers. Where The where command is used to search for files that match a specified pattern. Whoami The whoami command is used to retrieve user name and group information on a network. Winmgmt The winmgmt command starts the command line version of WMI (Windows Management Instrumentation), a scripting tool in Windows. Winrm The winrm command is used to start the command line version of Windows Remote Management, used to manage secure communications with local and remote computers using web services. Winrs The winrs command is used to open a secure command window with a remote host. Winsat The winsat command starts the Windows System Assessment Tool, a program that assesses various features, attributes, and capabilities of a computer running Windows. Wmic The wmic command starts the Windows Management Instrumentation Command line (WMIC), a scripting interface that simplifies the use of Windows Management Instrumentation (WMI) and systems managed via WMI. Wsmanhttpconfig The wsmanhttpconfig command is used to manage aspects of the Windows Remote Management (WinRM) service. Xcopy The xcopy command can copy one or more files or directory trees from one location to another. The xcopy command is generally considered a more «powerful» version of the copy command though the robocopy command trumps even xcopy. A command by the name of xcopy32 existed in Windows 95 and Windows 98. To avoid a long and confusing explanation here, just know that no matter if you executed the xcopy command or the xcopy32 command, you were always executing the most updated version of the command. Xwizard The xwizard command, short for Extensible Wizard, is used to register data in Windows, often from a preconfigured XML file.

Командная строка (command line, консоль, терминал) в операционной системе Windows предназначена для работы с системой в текстовом режиме. Программная оболочка служит для связи пользователя с операционной системой посредством ввода текстовых команд с клавиатуры компьютера.

Работа с командной строкой проходит следующим образом: пользователь запускает на компьютере приложение cmd.exe, открывается окно интерфейса командной строки (интерпретатор командной строки), затем пользователь вводит с клавиатуры команду или наборы команд, система их выполняет, иногда выдает запросы или сообщения, отображаемые в окне интерфейса командной строки.

Содержание:

  1. Как запустить командную строку
  2. Как выполнить команду в командной строке
  3. Команды для командной строки Виндовс
  4. Командная строка Windows: список основных команд
  5. Выводы статьи

Для выполнения различных задач на компьютере: запуск программ, настройка системы, изменения параметров Windows и т. д., необходимо вводить определенные команды для командной строки.

На заре создания операционных систем, ОС не имели графического интерфейса, все действия выполнялись с помощью команд, набранных на клавиатуре. После появления графического интерфейса командная строка не исчезла из системы.

Большинство пользователей, рано или поздно, сталкиваются с командной строкой, другая часть пользователей, даже не подозревает о ее существовании.

Преимуществом командной строки является то, что командная строка не зависит от графического интерфейса операционной системы. Пользователь вводит команды в окне командной строки, а система их немедленно выполняет. В некоторых случаях этот процесс проходит быстрее, чем подобные действия с использованием графического интерфейса Windows.

Командная строка часто используется при возникновении неполадок на компьютере, когда невозможно выполнить работы по исправлению сбоев системы другим способом.

Начинающим пользователям трудно работать с командной строкой из-за того, что они не знают команд. Поэтому с командную строку чаще используют опытные пользователи и администраторы.

В этой статье вы найдете список команд командной строки. В таблице собраны основные команды командной строки, работающие в операционных системах Windows 10, Windows 8,1, Windows 8, Windows 7.

Как запустить командную строку

В Windows 10 сразу найти командную строку неочевидно, поэтому прочитайте эту статью о разных способах запуска консоли в этой ОС.

В операционной системе Windows имеется несколько способов для запуска командной строки, вот самые простые:

  • Из меню «Пуск» войдите в «Программы» («Все программы»), а затем в «Служебные» (в Windows 7 — «Стандартные»), выберите приложение «Командная строка».
  • В поле поиска введите «cmd» (без кавычек), среди открывшихся результатов окажется командная строка.
  • После нажатия на клавиатуре «Win» + «R», в окне «Выполнить» введите команду запуска командной строки «cmd» (без кавычек).

В обычном режиме командная строка запускается от имени пользователя. Для выполнения некоторых действий в командной строке, требуются повышенные права Администратора компьютера. В этом случае, командную строку необходимо запустить от имени администратора. Прочитайте статью о том, как запустить командную строку от имени администратора в разных версиях операционной системы Windows.

Как выполнить команду в командной строке

Работа в командной строке выполняется очень просто: пользователь вводит текстовую команду, а затем нажимает на клавишу «Enter» (ввод). Если необходимо ввести несколько последовательных команд, повторите данную операцию несколько раз.

После запуска командной строки, в окне интерпретатора командной строки отображается версия операционной системы Windows, и место где сейчас находится пользователь. При запуске в обычном режиме, это адрес профиля пользователя на системном диске.

командная строка

При запуске командной строки от имени администратора, путь выглядит следующим образом: «C:Windowssystem32».

командная строка администратор

Команды командной строки Windows необходимо вводить в окне интерпретатора сразу после знака «>», в этом месте мигает курсор.

Для копирования команды с компьютера, а затем вставки команды в командную строку, используется контекстное меню правой кнопки мыши. Скопируйте команду в буфер обмена, вставьте курсор мыши в окно командной строки, нажмите на правую кнопку мыши. В Windows 10 поддерживается копирование и вставка при помощи стандартных клавиш клавиатуры: «Ctrl» + «C» и «Ctrl» + «V».

Некоторые системные приложения запускаются непосредственно после ввода команды, которая состоит из названия приложения, например, если вести команду «calc», то на компьютере запуститься системная программа Калькулятор.

Для других программ потребуется ввести полный путь до исполняемого файла приложения. Если в пути до файла есть пробелы, полный путь заключается в кавычки, например, так выглядит команда для запуска браузера Google Chrome:

"C:Program Files (x86)GoogleChromeApplicationchrome.exe"

После запуска команды из командной строки, реализация выполнения команды не всегда внешне заметна, из-за того, что происходят внутренние изменения в операционной системе.

К основной команде часто добавляются другие параметры, ключи для выполнения конкретных действий.

При вводе неправильной команды, например, введенной с ошибками, или если операционная система Windows не может по какой-либо причине выполнить команду, об этом появится сообщение в окне интерфейса командной строки.

Команды для командной строки Виндовс

Пользователь может самостоятельно узнать основные команды из самой утилиты Командная строка. Для этого достаточно ввести команду: «help».

В интерфейсе командной строки отобразится список основных команд.

основные команды командной строки

Для получения сведений о параметрах отдельной команды нужно ввести одну из следующих команд, которые выполняются одинаково (не забывайте поставить пробел):

имя_команды /?
help имя_команды

В результате вы получите сведения обо всех параметрах данной команды.

авпвметры команд командной строки

Командная строка Windows: список основных команд

Ознакомьтесь с таблицей, в которой собраны команды, используемые в командной строке Windows. Если я пропустил какую-нибудь важную команду, напишите об этом в комментарии к этой статье, я добавляю команду в таблицу.

Команда Выполняемое действие
appwiz.cpl запуск системного средства для изменения или удаления программ
arp отображение и изменение ARP таблиц преобразования IP-адресов в физические, используемые протоколом разрешения адресов
assoc вывод или изменение сопоставлений по расширениям имен файлов
at запуск программ в указанное время
attrib отображение и изменение атрибутов файлов
azman.msc диспетчер авторизации
bcdboot средство создания и восстановления файлов данных конфигурации загрузки
bcdedit редактирование изменений в базе загрузки начальной загрузки системы
break изменение режима обработки комбинации клавиш «Ctrl» + «C»
blastcln утилита очистки от червей
bootcfg настройка, извлечение, изменение или удаление параметров командной строки в файле Boot.ini в Windows XP
call вызов одного пакетного файла из другого
cacls просмотр и редактирование изменение таблиц управления доступом (ACL) к файлам
calc запуск приложения Калькулятор
cd вывод имени или изменение текущей папки
charmap таблица символов
chcp вывод или изменение активной кодовой страницы
chdir вывод или смена текущей папки
copy копирование одного или нескольких файлов
chkdsk проверка диска на ошибки и вывод статистики
chkntfs вывод или изменение параметров проверки диска во время загрузки
ciddaemon сервис индексации файлов
cipher шифрование файлов и папок в NTFS
cleanmgr утилита Очистка диска
cls очистка экрана
cmd запуск еще одного интерпретатора командной строки Windows
compmgmt.msc открытие консоли Управление компьютером
color установка цветов переднего плана и фона по умолчанию
comexp.msc службы компонентов
comp сравнение содержимого двух файлов или двух наборов файлов
compact просмотр и изменение параметров сжатия файлов в разделах NTFS
compmgmt.msc Управление компьютером
computerdefaults выбор приложений по умолчанию
control Панель управления
control admintools администрирование
control desktop настройка экрана и персонализация
control folder свойства папок в параметрах Проводника
control fonts шрифты
control keyboard открытие окна свойства клавиатуры
control mouse свойства мыши
control printer устройства и принтеры
control schedtasks Планировщик заданий
control userpasswords2 управление учетными записями пользователей
convert преобразование файловой системы тома FAT в NTFS (не работает на текущем диске)
copy копирование файлов в другое место
credwiz архивация и восстановление имен пользователей и паролей
date вывод или установка текущей даты
debug средство отладки и редактирования программ
defrag запуск дефрагментации дисков
del удаление одного или нескольких файлов
desk.cpl настройка разрешения экрана
devicepairingwizard добавление нового устройства
devmgmt.ms Диспетчер устройств
dfrgui оптимизация дисков (дефрагментация)
dir вывод списка файлов и подпапок из указанной папки
diskmgmt.ms открытие оснастки Управление дисками
diskpart отображение и настройка свойств раздела диска
diskperf включение или отключение счетчика производительности
doskey редактирование командной строки, повторный вызов команд Windows, создание макросов
dpiscaling настройка параметров дисплея
dxdiag средство диагностики DirectX
echo вывод сообщений и переключение режима отображения команд на экране
endlocal завершение локальных изменений среды для пакетного файла
erase удаление одного или нескольких файлов (затирание)
esentutl утилиты технического обслуживания баз данных Microsoft Windows
eudcedit редактор личных знаков
eventcreate создание запись об особом событии в указанном журнале событий
eventvwr.msc просмотр событий
expand распаковка сжатых файлов
explorer Проводник Windows
fc сравнение файлов или наборов файлов, вывод различий между ними
find поиск текстовой строки в одном или в нескольких файлах
findstr поиск текстовой строки в файле
finger сведения о пользователях указанной системы, на которой запущена служба Finger
firewall.cpl Брандмауэр Защитника Windows
for запуск указанной команды для каждого файла в наборе
format форматирование диска
fsmgmt.msc общие папки
fsquirt передача файлов по Bluetooth
fsutil показ и настройка свойств файловой системы
ftype вывод или изменение типов файлов при сопоставлении имен файлов
ftp обмен файлами по FTP
goto передача управления в указанную строку пакетного файла
getmac отображение MAC-адресов одного или нескольких сетевых адаптеров
gpresult информация о групповой политике для компьютера или пользователя
graftabl отображение расширенного набора символов в графическом режиме Windows
gpedit.msc Редактор локальной групповой политики
gpupdate обновление параметров нескольких групповых политик
hdwwiz мастер установки оборудования
icacls отображение, изменение, архивация, восстановление списков ACL для файлов и каталогов
iexpress создание самораспаковывающегося архива
if условная обработка в пакетных программах (файлах)
ipconfig информация о IP адресе
joy.cpl игровые устройства
label создание, изменение и удаление меток тома для дисков
lodctr обновление параметров реестра, относящееся к производительности счетчиков
logman управление службой «Оповещения и журналы производительности»
logoff завершение сеанса
lpksetup установка или удаление языков интерфейса Windows
lusrmgr.msc локальные пользователи и группы
magnify запуск приложения Лупа
main.cpl свойства мыши
makecab архивация файлов в CAB архив
md создание каталога (папки)
mdsched средство проверки оперативной памяти на ошибки
mkdir создать каталог (папку)
mmsys.cpl свойства звука
mode конфигурирование системных устройств
mofcomp 32-разрядный компилятор
more последовательный вывод данных по частям размером в один экран
mountvol создание, просмотр и удаление точек подключения
move перемещение одного или нескольких файлов из одной папки в другую
mrinfo работа с многоадресными сообщениями
mrt запуск средства удаления вредоносных программ Malicious Software Removal Tool
msconfig конфигурация системы
msg отправка сообщений пользователю
msinfo32 сведения о системе
mspaint запуск графического редактора Paint
msra удаленный помощник Windows
net управление сетевыми ресурсами
ncpa.cpl сетевые подключения
netstat отображение статистики протоколов и текущих сетевых подключений TCP/IP
netplwiz управление учетными записями пользователей
notepad запуск программы Блокнот
odbcconf настройка драйвера ODBC
openfiles вывод списка открытых файлов и папок, открытых в системе
optionalfeatures включение или отключение компонентов Windows
osk запуск экранной клавиатуры
path вывод или установка пути поиска исполняемых файлов
pause приостановка выполнения пакетного файла, вывод сообщения
perfmon системный монитор
resmon монитор ресурсов
popd восстановление предыдущего значения текущей папки, сохраненное командой pushd
prompt изменение командной строки Windows
pushd сохранение текущего каталога, а затем изменение каталога
ping отправка пакетов на указанный адрес
powercfg управление параметрами электропитания системы
print печать текстового файла
qprocess отображение информации о процессах
qwinsta отображение информации о сеансах служб удаленных рабочих столов
rd удаление каталога
recover восстановление сохранившихся данных на повреждённом диске
recdisc создание диска восстановления Windows
reg команда для работы с реестром
regedit Редактор реестра
rem помещение комментария в пакетный файл или в файл config.sys
ren переименование файлов и папок
rename переименование файлов и папок
rmdir удаление каталога
replace замена файлов
rstrui восстановление Windows из точек восстановления системы
runas для использования приложений от имени другого пользователя
rwinsta сброс значений подсистем оборудования и программ сеанса в начальное состояние
secpol.msc локальная политика безопасности
services.msc службы
set вывод, установка и удаление переменных среды Windows
setlocal начало локальных изменений среды в пакетном файле
sc отображение и настройка служб (фоновых процессов)
sfc проверка целостности всех защищенных системных файлов и замена неправильных
sigverif проверка подписи файла
shift изменение содержимого заменяемых параметров для пакетного файла
slui активация Windows
sndvol микшер громкости
start запуск указанной программы или команды в отдельном окне
schtasks запуск программ и выполнение команд на ПК по расписанию
sdbinst установщик базы данных совместимости
shutdown перезагрузка или выключения компьютера
sort программа сортировки
subst сопоставление имени диска указанному пути
sysdm.cpl свойства системы
systeminfo информация о конфигурации операционной системы
taskkill принудительное завершение процесса или приложения
tasklist показ всех задач, выполняемых в данный момент, включая службы
taskmgr Диспетчер задач
tcmsetup установка клиента телефонии
time просмотр и изменение текущего времени
timedate.cpl настройка времени и даты
title назначение заголовка текущего окна интерпретатора командной строки
tracert трассировка маршрута к указанному узлу
tree графическое отображение структуры заданного диска или папки
tscon присоединение сеанса пользователя к сеансу удаленного рабочего стола
tsdiscon отключение сеанса служб удаленных рабочих столов
tskill прекращение процесса
type вывод содержимого текстовых файлов
typeperf вывод сведений о производительности на экран или в журнал
utilman центр специальных возможностей
ver вывод сведений о версии Windows
verifier диспетчер проверки драйверов
verify установка режима проверки в Windows правильности записи файлов на диск
vol вывод метки и серийного номера тома для диска
vssadmin программа командной строки для администрирования службы теневого копирования тома
w32tm показ текущих параметров для отображения часового пояса
winver информация о версии Windows на экране
wmic сведения об инструментарии WMI в интерактивной командной оболочке
write текстовый редактор WordPad
wscui.cpl центр безопасности и обслуживания
wusa автономный установщик обновлений
xcopy копирование файлов и дерева папок

Выводы статьи

Командная строка в операционной системе Windows позволяет пользователю управлять компьютером без использования графического интерфейса. Для выполнения определенных действий на ПК, необходимо ввести в интерпретатор командной строки специальные команды. В этой статье опубликована таблица со списком самых востребованных команд для командной строки Windows.

Похожие публикации:

  • Восстановление Windows через командную строку
  • Сравнение версий Windows 10: таблица
  • Как перейти с 32 битной на 64 битную версию Windows
  • Как узнать версию Windows
  • Как отключить обновления в Windows 10 — 5 способов
  1. Как открыть командную строку Windows?
  2. Параметры команд и получение помощи
  3. Запуск системных компонентов и программ из командной строки
  4. Работа с файлами и папками из командной строки
  5. Востребованные сетевые команды командной строки
  6. Редко используемые, но очень полезные команды

Выполнение множества задач в операционных системах Windows возможно не только при использовании привычного графического пользовательского интерфейса, но и при помощи интерпретатора командной строки (командной строки, консоли). Через него можно изменять различные системные параметры, управлять файлами и папками, запускать системные компоненты и любые программы, выполнять иные операции. Рассмотрим наиболее важные команды командной строки Windows, которые могут пригодиться любому пользователю.

Как открыть командную строку Windows?

Некоторые из консольных команд можно выполнить лишь из учетной записи администратора. Потому лучше сразу запомнить, как запускать интерпретатор с максимальным количеством прав доступа к системе. В ОС Windows 7/8/10 делается это просто:

  • Откройте «Поиск» в/около меню «Пуск».
  • Впишите поле поиска «Командная строка».
  • В результатах поиска отобразится нужная нам программа. Кликните по ней правой кнопкой мыши, затем выберите из выпадающего меню пункт «Запустить от имени администратора».

Запуск командной строки

Но для выполнения простых команд консоль Windows можно запускать и без прав администратора. Проще всего это сделать следующим образом:

  • Нажмите на клавиатуре клавиши «Win» и «R».
  • Откроется окно «Выполнить».
  • Впишите в него команду cmd и нажмите «ОК».

Запуск командной строки

Так или иначе, системное приложение «Командная строка Windows» будет запущена и готова выполнению пользовательских команд:

Командная строка Windows

Параметры команд и получение помощи

Прежде чем приступать к изучению команд, следует понимать два важных момента:

  • У многих команд существуют изменяемые параметры, уточняющие выполнение командой той или иной функции.
  • По любой команде можно получить помощь прямо в окне интерпретатора. Для этого следует сразу после команды вписать «/?«, что также является параметром.

Возьмем, к примеру, одну из наиболее востребованных команд ping. Впишите в консоль следующую строку:

ping /?

Вызов справки по команде ping

Подобным способом можно получить справку по большинству команд (в основном по тем, у которых имеются атрибуты).

Запуск системных компонентов и программ из командной строки

Здесь стоит отметить, что запускать системные компоненты и программы все же проще не напрямую из командной строки, а из ранее упомянутого приложения «Выполнить». Но разницы в синтаксисе (написании) самих команд никакой нет. В обоих случаях после ввода команды достаточно нажать «Enter».

Вот список наиболее востребованных команд для запуска системных приложений и компонентов:

  • control — запуск «Панели управления Windows».

Выполнение команды "control"

  • regedit — запуск «Редактора реестра».

Выполнение команды "regedit"

  • devmgmt.msc — запуск «Диспетчера устройств».

Выполнение команды "msc"

  • taskmgr — запуск «Диспетчера задач».

Выполнение команды "taskmgr"

  • services.msc — запуск приложения «Службы».

Выполнение команды "services.msc"

  • appwiz.cpl — «Программы и компоненты» («Установка и удаление программ»).

Выполнение команды "appwiz.cpl"

И это далеко не полный список команд запуска системных приложений и компонентов, а лишь самые востребованные у нас — обычных пользователей.

А вот 4 команды для запуска предустановленных (стандартных) в Windows программ:

  • calc — запуск «Калькулятора».

Калькулятор Windows

  • mspaint — запуск графического редактора «Paint».

Графический редактор mspaint

  • notepad — запуск текстового редактора «Блокнот».

Текстовый редактор notepad

  • wordpad — запуск текстового редактора «WordPad»

Тектовый редактор wordpad

Вообще, из командной строки можно запустить любую другую программу или файл. Рассмотрим, как это сделать, а заодно познакомимся с некоторыми командами по управлению файлами и папками.

Работа с файлами и папками из командной строки

Бывают ситуации, когда невозможно запустить стандартный файловый менеджер «Проводник Windows». Например, из-за действия вирусов-блокировщиков или при системных сбоях. В любом случае все, что можно сделать при помощи «Проводника», можно сделать и при помощи командной строки. Начнем с самого простого — просмотра содержимого папок.

Просмотр содержимого папки. При запуске командной строки перед мигающим курсором можно увидеть адрес расположения папки учетной записи на жестком диске. В нашем случае — это «C:Usersvzgn»:

Просмотр содержимого папки

Давайте, выведем на экран список все других объектов (файлов и папок), содержащихся в данной папке. Для этого используйте команду dir:

Выполнение команды DIR

Объекты, напротив которых написано <DIR> — это папки, все остальное — файлы (напротив них указан размер в байтах).

Команду dir можно применять вообще папкам, расположенным в вообще любом месте на жестком диске. Для этого после команды следует указать путь до каталога. К примеру, для просмотра содержимого папки «Windows» на диске «C:» следует ввести команду:

dir c:windows

Запомните одно простое правило. Если в именах папок/файлов присутствуют пробелы, их следует писать в двойных («имя папки или файла») кавычках.

Открытие файла из командной строки. Для открытия файла достаточно вписать его полное название вместе с расширением в командную строку. Что не вводить имя файла целиком, используйте клавишу «Tab» (с ее помощью можно поочередно перебирать имена всех объектов в текущей папке).

Открытие файла из командной строки

В нашем случае был открыт файл .pgAdmin4.startup.log при помощи «Блокнота». Если бы это был музыкальный файл, запустился бы аудиопроигрыватель, если DOC/DOCX-файл — редактор «MS Word» и т.д. Таким образом, открытие файла в командной строке равнозначно двойному клику по файлу в «Проводнике Windows».

Переход в другую папку. Для перехода в папку используется команда cd, после которой следует прописать путь к открываемой папке либо просто ее имя (если она расположена в нашем текущем местоположении на жестком диске).

Перейдем в папку «Music». Т.к. она находится в текущем каталоге, достаточно ввести в консоль:

cd music

Выполнение команды CD

Теперь наше местоположение изменилось на «C:UsersvzgnMusic».

Давайте, перейдем в какую-нибудь папку, расположенную на другом локальном диске. Это можно сделать несколькими способами, но воспользуемся самым легким для запоминания.

  • Для начала перейдем в сам локальный диск (изменим наше местоположение). Для этого достаточно использовать (независимо от текущего местоположения) команду e:. Вместо e можно использовать любую другую букву локального диска (или даже флешки, например):

  • Допустим, нам известно, что на диске «E» существует папка «Install«, а в ней — пака «Web«. Перейти в нее можно одной командой:

cd e:installweb

Переход в папку на другом диске через командную строку

Запуск/открытие программы/файлы в другой папке или на другом диске. Запустим программу, расположенную где-нибудь глубоко на диске. Для запуска файла или программы можно просто указать полный путь до него. Текущее местоположение в этом случае не имеет значения. Запустим, например, текстовый редактор «Notepad++» одной командой:

C:»Program Files»Notepad++notepad++.exe

Запуск программы через командную строку

Обратите внимание, что имя папки «Program Files» взято в кавычки, т.к. в нем присутствует пробел.

Создание, удаление и переименование файлов и папок. Из командной строки можно выполнить все эти операции над файлами и папками.

  • Создание простого текстового файла — copy nul простой_текстовый_файл.txt. Перед названием файла можно указать путь до конечной папки, в которой тот будет создан (если не указать, файл создастся в текущей папке).

Создание файла в командной строке

  • Создание папки — mkdir папка. Папка также создается в текущем местоположении.

Создание папки в командной строке

  • Удаление файла (или нескольких) — del простой_текстовый_файл.txt (если требуется удалить несколько файлов, просто вписываем их имена друг за другом через пробел). Удаляем созданный ранее файл.
  • Удаление папки — rmdir папка. Удаляем созданную ранее папку.

Удаление папки в командной строке

  • Переименование папки/файла — ren простой_текстовый_файл.txt новое_имя_файла.txt или ren папка новое_имя_папки. Переименуем созданный файл и папку.

Переименование папок и файлов в в командной строке

Через командную строку можно выполнить и ряд других операций над файлами и папками, включая копирование, перемещение, применение/изменение атрибутов (скрытый, системный, только для чтения и т.д.), слияние и т.д.

Востребованные сетевые команды командной строки

Из командной строки Windows можно взаимодействовать с сетевыми подключениями, изменять их настройки, просматривать различную информацию и многое другое. Рассмотрим наиболее востребованные сетевые команды.

Команда ping

Наверное, это самая популярная команда среди пользователей ОС Windows (как, впрочем, и других операционных систем). Предназначена она для проверки доступности и качества связи между компьютером и целевым IP-адресом. Также команда может применяться для определения IP-адреса сайта по доменному имени сайта и для выполнения других задач.

Определим, есть ли связь с каким-нибудь IP-адресом. Пусть это будет — 173.194.73.139 (IP-адрес поисковой системы Google). Вводим следующую команду:

ping 173.194.73.139

Выполнение команды PING

Как видим, обмен пакетами с указанным IP-адресом осуществляется, значит, связь есть. Если бы ее не было, картина была бы следующая (уберем из IP Google последнюю цифру):

Выполнение команды PING

«100% потерь» означает, что связь установить не удалось.

А теперь определим IP-адрес сайта по его доменному имени. Возьмем адрес softsalad.ru:

ping softsalad.ru

Определение IP при помощи команды PING

На изображении выше можно увидеть IP-адрес сайта, определенный по его доменному имени.

Команда tracert

А эта команда применяется для отслеживания сетевого маршрута от компьютера до целевого IP-адреса (можно использовать и доменное имя сайта):

tracert softsalad.ru

Выполнение команды TRACERT

Видите, чтобы «достучаться» до сайта компьютеру в данном случае потребовалось обратиться к 12 промежуточным IP-адресам (ваш провайдер, сервер сайта и т.д.).

Команда ipconfig

С помощью этой команды можно получить информацию о настройках IP-протокола компьютера (или, грубо говоря — настройки сетевых карт). Воспользуемся данной командой с атрибутом /all, который позволит вывести более подробную информацию:

ipconfig /all

Выполнение команды ipconfig /all

Команда getmac

Если требуется определить только MAC-адрес сетевой карты, используем эту команду без всяких атрибутов:

getmac

Выполнение команды GETMAC

Редко используемые, но очень полезные команды

При помощи командной строки можно выполнять различные интересные функции (большинство приведенных ниже команд работает только с правами администратора):

Превращаем ноутбук в Wi-Fi-роутер (включение раздачи интернета с ноутбука или настольного компьютера с Wi-Fi-адаптером)

Для реализации этой затеи нужно поочередно выполнить три несложные команды:

  1. netsh wlan set hostednetwork mode=allow
  2. netsh wlan set hostednetwork mode=allow ssid= MiWiFi key= MiWiFipassword keyUsage=persistent. Вместо MiWiFi и MiWiFipassword можно использовать свои фразы. Первый параметр задает имя беспроводной сети, второй — пароль (должен состоять из 8 символов или более).
  3. netsh wlan start hostednetwork.

Как раздать интернет с ноутбука из командной строки

Если после выполнения каждой команды вы видите сообщения, аналогичные тем, что приведены на изображении выше, значит, все прошло успешно. Теперь к ноутбуку можно подключиться, например, с телефона так же, как и к обычному Wi-Fi-роутеру.

Удалениям службу Windows (или любую другую) через командную строку

Если попробовать удалить службу через штатное приложение «Службы», то ничего не получится (в нем попросту не предусмотрено такой функции). Однако это бывает необходимым, особенно после установки различных программ, которые устанавливают службы, но «забывают» их удалять при деинсталляции. Это легко реализуется через командную строку. Однако для начала необходимо узнать имя службы, и это можно сделать через стандартное Windows-приложение:

  • Запустите программу «Службы», используя команду msc.
  • Найдите в отобразившемся списке службу, которую необходимо удалить, и кликните по ней два раза мышкой:

Службы Windows

  • Нас интересует текст в блоке «Имя службы».
  • Теперь вернитесь в окно командной строки и впишите в него команду:

sc delete имя_службы

  • Подставьте вместо фразы «имя_службы» имя удаляемой службы. Если оно содержит пробелы, как в нашем случае, заключите имя службы в кавычки.

Удаление службы из командной строки

  • Служба удалена.

Выключаем/перезагружаем/отправляем в сон/гибернацию компьютер с задержкой. Если необходимо выключить, перезагрузить или отправить в сон компьютер с задержкой по времени, не обязательно использовать какие-либо сторонние программы — все можно сделать при помощи командной строки. Для этого достаточно использовать команду:

shutdown /s /t 60 /f

В данном случае компьютер будет выключен (параметр «/s«) через 60 секунд (параметр «/t 60«) с принудительным завершением работы всех приложений без предупреждения пользователя (параметр «/f» — обязательный при использовании таймера «/t«).

Вместо выключения компьютера «/s» использовать:

  • /l — завершение сеанса (выход из учетной записи пользователя с блокировкой, если для входа требуется пароль).
  • /r — перезагрузка компьютера.
  • /hybrid /s — «отправка» компьютера в сон (параметр «/s» использовать обязательно).
  • /h — режим гибернации (или режим максимального энергосбережения, при котором ключевые компоненты компьютера остаются включенными).

Для выключения компьютера, например, через 2 часа следует указывать в параметре «/t» число 7200 (1 час равен 3600 секундам).

Выключение компьютера из командной строки

Сразу после выполнения команды на экран будет выведено уведомление:

Уведомление о выключении компьютера

Выполнение команды всегда можно отменить (если была использована задержка), воспользовавшись:

shutdown /a

Отмена выклчения компьютера

Просмотр списка запущенных процессов и завершение работы любого из них. Если по каким-то причинам не удается запустить «Диспетчер задач», но имеется доступ к командной строке, запущенный процесс может быть снят при помощи специальных команд:

  • Сначала выведем на экран список всех запущенных процессов при помощи команды tasklist:

Просмотр запущенных процессов из командной строки

  • Нас интересует идентификатор «PID» завершаемого процесса. Возьмем для примера PID процесс «NVDisplay.Container.exe» — 1100.
  • Для завершения его работы используем команду taskkill /pid 1100 /f (параметр «/f» необходим для принудительного завершения работы процесса).

Завершение работы процесса из командной строки

Чиним интернет при помощи командной строки. Разнообразные неполадки с сетевыми подключениями можно устранить «одним махом» через командную строку путем сброса настроек TCP/IP (не будем вдаваться в подробности, но если вам интересно, об это можно почитать тут — Netsh Winsock — что это и зачем нужно?.

Для выполнения этой задачи нужно поочередно ввести две команды:

netsh int ip reset

netsh winsock reset

Сброс параметров IP из командной строки

Перезагружаем компьютер для применения изменений.

Команды Windows для работы с сетью

ipconfig – информация об ip адресах (локальная сеть, DNS, маска, шлюз)

ipconfig
ipconfig /displaydns – очистить кэш DNS
ipconfig /flushdns – показывает содержание кэш DNS
inetcpl.cpl — настройка и свойства интернета

Свойства Интернет
ping  — проверяет связь с указанным узлом

список параметров ping

Например,

ping google.com

ping google.com -t
ping 127.0.0.1

arp -a — выводит содержание таблицы ARP хоста
arp -d — сброс всей таблицы ARP хоста
getmac — получить MAC-адрес сетевой карты XX-XX-XX-XX-XX-XX
ncpa.cpl – сетевые подключения
Сетевые подключения
netstat -rn – показывает таблицу маршрутизации хоста
netstat – открытые IP адреса с портами
net stop was /y — отключение портов
netstat

netsh  winhttp show proxy — отображает текущее состояния прокси
netsh winhttp set proxy 127.0.0.1 — установка прокси
netsh winhttp reset proxy — сбор настроек proxy
mstsc — подключение к удалённому рабочему столу
Подключение к удаленному рабочему столу
shutdown.exe -r -t 30 -f -m \192.168.111.132 – перезагрузка удаленного компьютера
ftp – команда, для работы с ftp протоколом
shutdown -s – выключить компьютер
shutdown -r – перезагрузка компьютера
tskill chrome — закрывает процессы из cmd
%systemroot%system32shutdown.exe -r -t 30 – создание ярлыка

Команды для работы с дисками и файловой системой

cd .. – выйти из текущей директории;
cd %systemroot% — перейти к папке C:WINDOWS
cd /d C: — перейти на диск C:
G: — перейти на другой диск, например на флешку
md file.txt – создание в текущей директории файла file.txt
mkdir — команда создаёт каталог, аналог команды md
RENAME [hdd:][path]old_file new_file — переименование файла
del file.txt – удаление файла или папки, в данном случае удаление файла file.txt
RMDIR [/S] [/Q] [hdd:]path — удаление дерева каталога или директории
dir – выводит информацию о файлах и папках (размер файла, названия файлов и папок, дата)

директория
diskmgmt.msc – управление дисками

Управление дисками
cleanmgr – очистка диска, выбор устройства для очистки
Очистка диска выбор устройства
sfc /scannow – проверка и восстановления системных файлов ОС
CHKDSK F — стандартная утилита windows для проверки диска, ключ F проверяет и исправляет ошибки на hdd или флешки, ключ R — поиск и исправление повреждённых секторов
chkdsk c: /f — этой командой можно воспользоваться, если нет доступа к файлу или папки на флешки, при этом, если ещё появляется сообщение «файл или папка повреждены чтение невозможно» 
RECOVER [имя_диска:][путь_к_файлу]имя_файла — восстановление данных на повреждённом диске
reagentc /disable — при загрузке windows 7, отключает средства восстановления системы (для выполнения команды нужны дополнительные привилегии)
Iexpress — утилита IExpress Wizard для сжатия файлов в exe-файл
IExpress Wizard сжатие файлов
copy /b old_capture.jpg+Doc.rar new_capture.jpg — спрятать информацию внутри файла jpg old_capture.jpg и Doc.rar в новый файл new_capture.jpg

Базовые команды cmd

winver – версия ОС Windows
О программе Windows
msconfig — конфигурация ОС windows
Конфигурация системы
msinfo32 – отображает сведения об ОС и компьютере
Сведения о системе
prompt $t – отображает системное время в формате 20:12:12,18
date — установка новой даты, также отображает текущую дату
timedate.cpl – дата и время, дополнительные часы, время по интернету
Дата и время
color 2F – параметры цвета фона и шрифтов (в данном примере фон зелёный, шрифт — белый);
color cmdcolor help cmd
regedit – редактор реестра ОС
Редактор реестра
taskmgr – диспетчер задач
Диспетчер задач Windows

control userpasswords2 — учетные записи пользователей

Учетные записи пользователей

control – панель управления

Панель управления
services.msc – службы
Службы
devmgmt.msc – диспетчер устройств
Диспетчер устройств
dxdiag -средство диагностики DirectX, драйверы
Средство диагностики DirectX
verifier – диспетчер проверки драйверов
Диспетчер проверки драйверов
mmsys.cpl – звук, запись, воспроизведение, динамики
Звук
appwiz.cpl – программы и компоненты, установка и удаление программ
Программы и компоненты
control printers – устройства и принтеры
Устройства и принтеры
desk.cpl – свойство и разрешение экрана
Разрешение экрана
control folders – параметры папок, вид, поиск
Параметры папок
powercfg.cpl – электропитание (выбор плана электропитания)
Электропитание
control fonts – установленные шрифты
Шрифты
control mouse – свойство мышки, скорость
Свойства Мышь
control keyboard – свойство клавиатуры, частота мерцания курсора
Свойства Клавиатура
wscui.cpl – центр поддержки, обновление Windows
Центр поддержки
firewall.cpl – брандмауэр ОС Windows
Брандмауэр Windows
explorer – проводник ОС Windows
проводник
logoff –выйти из ОС Windows
CLS — очистить экран
exit — выйти из cmd

Дополнительные команды для вызова стандартных программ Windows

notepad – блокнот
Блокнот
mspaint.exe – paint (рисование)
Paint
magnify – экранная лупа (увеличение масштаба экрана)
лупа
charmap – таблица символов
Таблица символов
eudcedit – редактор личных знаков и символов
Редактор личных знаков
Narrator – экранный диктор
Экранный диктор
joy.cpl – игровые устройства

Игровые устройства

Команды Windows для администрирования

rstrui.exe — восстановление системы

Восстановление системы

control admintools — администрирование системы (инструменты)

Администрирование
odbcad32 — администратор источников данных ODBC в windows

Администратор источников данных ODBC
gpedit.msc — редактор локальной групповой политики

Редактор локальной групповой политики
secpol.msc — локальная политика безопасности в ОС windows

Локальная политика безопасности
lusrmgr.msc — локальные пользователи и группы

Локальные пользователи и группы
sigverif — проверка цифровой подписи файлов

Проверка подписи файла
certmgr.msc — зарегистрированные сертификаты текущего пользователя в системе

Сертификаты - текущий пользователь
mmc — корень консоли управления windows

Корень консоли
compmgmt.msc — управление компьютеромУправление компьютером
wmimgmt.msc — корень консоли элемент управления WMIWindows

Корень консоли Элемент управления WMI локальный
rsop.msc — результирующая политика windows

Результирующая политика
cliconfg — программа сетевого клиента SQL Server

Программа сетевого клиента SQL Server
shrpubw — мастер создания общих ресурсов ОС windows

Мастер создания общих ресурсов
syskey — защита базы данных учетных записей Windows

Защита БД учетных записей Windows
wscript — параметры сервера сценариев ОС Windows на языках JScript или VBScript

Параметры сервера сценариев Windows
control schedtasks — планировщик заданий windows

Планировщик заданий
eventvwr.msc — просмотр событий (журнал событий)

Просмотр событий
fsmgmt.msc — общие папки

Общие папки
perfmon.msc — системный монитор

Системный монитор

dcomcnfg — службы компонентов, установленных в ОС

Службы компонентов


Определить кодировку cmd:

chcp

Например, чтобы поменять кодировку в windows на UTF-8 (по умолчанию стоит кодировка 866)

chcp 65001


Историю открывавшихся файлов в Windows 7

%APPDATA%/Microsoft/Windows/Recent


Путь к временным файлам (temp) на windows 7,8,10

C:Usersимя учётной записиAppDataLocalTemp

C:Usersимя учётной записиAppDataLocalTemporary Internet Files

Путь к временным файлам (temp) для браузера Google Chrome

C:Documents and SettingsИмя пользователяLocal SettingsApplication DataGoogleChromeUser DataDefaultCache

Путь к закладкам в браузере Google Chrome (Bookmarks)

C:UsersИмя пользователяAppDataLocalGoogleChromeUser DataDefault

Путь к временным файлам (temp) для браузера Internet Explorer

C:Documents and SettingsИмя пользователяLocal SettingsTemporary Internet Files

Путь к файлам  Telegram

C:UsersUserAppDataRoamingTelegram Desktop

Принудительно удалить файл, пример

Del /F /Q /S d:/temp.exe

14 команд CMD, которые должен знать каждый пользователь

Нередко неопытные пользователи воспринимают командную строку Windows как нечто совершенно ненужное и отжившее свой век. Думать так — это большая ошибка. Значение командной строки или иначе консоли CMD трудно переоценить даже после того как она потеряла большую часть своих команд доступных в MSDOS. Достоинство командной строки заключается, прежде всего, в обеспечении прямого доступа к операционной системе и её скрытым возможностям, кроме того консоль CMD имеет в себе несколько полезнейших встроенных утилит предназначенных для работы с программными и аппаратными компонентами компьютера.

Быть асом командной строки совершенно не обязательно, тем не менее, есть команды, которые должен знать каждый уважающий себя пользователь Windows. Вот они.

Assoc

14 команд CMD, которые должен знать каждый пользователь

Большинство пользовательских файлов в операционной систем связаны с определёнными программами, которые обрабатывает их по умолчанию. Такая связь называется ассоциацией. Для её просмотра как раз и существует команда assoc. При её выполнении выводится список сопоставлений расширений и типов файлов. А ещё команда assoc позволяет изменять ассоциации.

Например командой assoc .html = txtfile для файлов с расширением HTML устанавливается тип файла txtfile (текстовый). Если же вам нужно узнать какой именно программой открываются файлы с таким расширением, используйте команду ftype txtfile.

Cipher

14 команд CMD, которые должен знать каждый пользователь

Эта команда предназначается для шифрования и дешифрования данных на дисках с файловой системой NTFS, но с таким же успехом она может использоваться для зачистки свободного дискового пространства. Пользоваться ей очень просто. Если вам нужно гарантированно удалить остатки всех ранее удалённых файлов на диске D, выполните в консоли команду cipher /w:D.

Driverquery

14 команд CMD, которые должен знать каждый пользователь

Полезная команда позволяющая просмотреть список всех установленных в операционной системе драйверов. При выполнении команды без параметров данные выводятся в виде отсортированного списка. Колонка «Модуль» содержит имена драйверов без расширения, колонка «Название» включает краткое описание драйвера, «Тип драйвера» — соответственно тип, «Дата ссылки» указывает на дату установки или последней модификации драйвера.

FC (File Compare)

14 команд CMD, которые должен знать каждый пользователь

Команда FC пригодится в основном кодерам, также она может использоваться теми юзерами, которым приходится работать с текстовыми файлами. Эта команда позволяет сравнивать содержимое двух файлов, отыскивая между ними несоответствия. Допустим, у вас имеются два файла file1.docx и file2.docx и вы хотите их сравнить. Выполните в консоли следующую команду:

fc /U «D:file1.docx» «D:file2.docx»

В данном примере мы сравнили два простых текстовых документа. Интерпретатор командной строки нашел несоответствие в одном из предложений и указал конкретное место. Команда FC также позволяет сравнивать бинарные файлы, файлы в кодировке юникод, определять число несоответствий и т.п. Если сравниваемые файлы окажутся идентичными, при выполнении команды FC будет выведено соответствующее сообщение.

Ipconfig

14 команд CMD, которые должен знать каждый пользователь

Полезная команда позволяющая определить текущие настройки протокола TCP/IP или попросту IP-адрес. Однако показывает она только внутренний IP-адрес, если же вы используете роутер и хотите узнать тот IP, с которым вы выходите в глобальную Сеть, лучше обратиться к помощи специальных онлайновых сервисов типа 2ip.ru.

Netstat

14 команд CMD, которые должен знать каждый пользователь

Эта команда выводит список всех текущих интернет-соединений. Используется она в основном администраторами для отображения TCP и UDP-соединений, прослушиваемых портов, таблиц маршрутизации и статистических данных для различных протоколов. Также может использоваться для поиска следов, оставляемых вирусами и прочими вредоносными объектами. Выполненная без параметров команда Netstat отображает тип соединения, локальный адрес, внешний адрес и текущее состояние.

Ping

14 команд CMD, которые должен знать каждый пользователь

Как и Netstat команда ping используется в основном системными администраторами. Служит она для диагностики компьютерных сетей. С её помощью можно определять доступность тех или иных ресурсов. Допустим вам нужно проверить доступность Google. Поскольку DNS сервер Google имеет адрес 8.8.8.8, в консоли CMD нужно выполнить команду ping 8.8.8.8.

Цифровой IP-адрес также может быть заменён текстовым URL-адресом — ping google.com. Если узел окажется недоступен будет выведено сообщение «превышен лимит ожидания», а количество потерь при этом составит 100 процентов.

Tracert

14 команд CMD, которые должен знать каждый пользователь

Ещё одна «сетевая» команда, предназначенная для диагностики сети (трассировки). Команда позволяет получить цепочку узлов, через которые проходит IP-пакет, адресованный конечному узлу. Используется системными администраторами для выявления неполадки, препятствующей доставке пакетов конечному узлу. Примером использования команды может послужить трассировка к узлу того же Google: tracert google.com.

Pathping

14 команд CMD, которые должен знать каждый пользователь

Работает эта команда примерно так же как и tracert, но в отличие от последней является более функциональной. Команда выполняет трассировку плюс отправку запросов на промежуточные узлы маршрута для сбора информации о задержках и потерях пакетов на каждом из них.

Powercfg

14 команд CMD, которые должен знать каждый пользователь

Мощная утилита командной строки, предназначенная для управления параметрами электропитания Windows. Выполняется только с параметрами. Выполненная с ключом /Q команда Powercfg выводит текущую конфигурацию схемы электропитания, с ключом /a выводит отчет об использовании электроэнергии в ноутбуках, с ключом –energy генерирует детальный текстовый лог о состоянии компонентов компьютера, включая аккумуляторные батареи. Также команда Powercfg может использоваться для создания резервных копий настроек электропитания и развёртывания их на новом оборудовании.

Shutdown

14 команд CMD, которые должен знать каждый пользователь

Эта команда используется для завершения сеанса пользователя, выключения, перезагрузки и перевода компьютера в режим гибернации. Поддерживает удалённое управление. Выполняется shutdown всегда с параметрами. Например, команда вида shutdown /s /t 0 приведёт к завершению работы открытых приложений и немедленному выключению компьютера. Посмотреть список доступных ключей можно выполнив в консоли shutdown /?.

Sfc (System File Checker)

14 команд CMD, которые должен знать каждый пользователь

Одна из самых полезных и нужных команд. Предназначается для обнаружения и восстановления повреждённых или модифицированных системных файлов Windows. Восстановление производится из резервных копий создаваемых самой операционной системой. Чтобы запустить сканирование системы с последующим восстановлением файлов выполните команду sfc с параметром /scannow. После завершения проверки потребуется перезагрузка компьютера. Выполнять эту команду нужно в консоли, запущенной от имени администратора.

Tasklist

14 команд CMD, которые должен знать каждый пользователь

Команда Tasklist делает ту же работу, что и Диспетчер задач. Выполненная без параметров она выводит список всех запущенных процессов выполняющихся на локальном или удалённом компьютере. При этом для каждого процесса отображается его название, идентификатор (PID), имя сессии, номер сеанса и выделенный объём оперативной памяти. Команда Tasklist поддерживает использование ключей и фильтров. Например, Tasklist /SVC выводит список процессов вместе со службами для каждого процесса в отдельности.

Taskkill

14 команд CMD, которые должен знать каждый пользователь

Если Tasklist просто выводит список запущенных процессов, то Taskkill завершает их работу в принудительном режиме. Правда для этого вам потребуется знать идентификатор завершаемого процесса или название исполняемого файла. Допустим, вам нужно принудительно закрыть Блокнот. Выполняем для начала команду Tasklist и смотрим PID процесса notepad.exe. В нашем случае он имеет значение 2580. Зная PID процесса его легко можно «убить». Сама же команда будет выглядеть так: Taskkill /PID 2580. Примерно так же сработает команда Taskkill /IM notepad.exe, только в этом примере будут завершены все экземпляры процесса notepad.exe.

Итог

На этом пока всё. Есть и другие полезные команды CMD, с которыми пользователям желательно было бы познакомиться, но о них мы расскажем в следующий раз. К таковым в частности относится Diskpart — мощный инструмент управления дисками и разделами не уступающий возможностями коммерческим программным продуктам типа Acronis Disk Director.

Имеет ли смысл изучать командную строку профессионально? Вряд ли, если только вы не собираетесь становиться программистом или системным администратором.

Впрочем, желающим освоить консоль CMD не мешало бы также обратить внимание на её продвинутый аналог — встроенную утилиту PowerShell.

Понравилась статья? Поделить с друзьями:
  • Полезные команды для cmd windows 10
  • Полезные команды выполнить для windows 10
  • Полезные команды в командной строке windows 10
  • Полезные команды powershell для windows 10
  • Полезные изменения в реестре windows 10