Ещё совсем недавно, в эпоху первых персональных компьютеров на базе архитектуры IBM PC, громоздких ЭЛТ-мониторов и шумных дисководов, интерпретатор командной строки был ключевой составляющей едва ли не всех программных платформ того времени. С развитием графических сред востребованность этого инструмента среди рядовых пользователей практически сошла на нет, а сама консоль осталась уделом лишь администраторов вычислительных систем да IT-гиков, не понаслышке знающих обо всех её преимуществах. Мы сочли такое положение дел несправедливым и из почти трёхсот поддерживаемых CMD-интерпретатором Windows команд выбрали двадцать тех, что могут пригодиться всем пользователям ПК.
Для доступа к командной строке Windows достаточно щёлкнуть по кнопке «Пуск» правой клавишей мыши и выбрать соответствующий пункт меню либо воспользоваться комбинацией клавиш «Win+R»
⇡#Диагностика компьютера
Systeminfo. Позволяет получить подробную информацию о конфигурации компьютера и установленной на нём операционной системе, включая сведения об изготовителе ПК, процессоре, объёме оперативной памяти, сетевом адаптере, версии BIOS/UEFI, поддержке технологий виртуализации, дате инсталляции ОС и прочие данные.
Mdsched. Системный инструмент Memory Diagnostic Tool, позволяющий проверить оперативную память компьютера на наличие ошибок и сбоев в работе. Пригодится при поиске технических неисправностей ПК и причин возникновения критических ошибок Windows, сопровождающихся «синими экранами смерти» (Blue Screen of Death, BSoD).
Powercfg. Команда, благодаря которой можно из консоли просматривать и конфигурировать настройки управления питанием компьютера и не только. Например, ввод данной инструкции с ключом /energy выдаст отчёт об эффективности энергопотребления ПК и имеющихся проблемах с энергосбережением, с параметром /batteryreport — сведения об использовании батареи ноутбука и оставшейся ёмкости аккумулятора, а с опцией /requests — отобразит на экране приложения, системные процессы и драйверы, удерживающие ОС от перехода в сон или режим гибернации. Отличный инструмент для поиска и решения различных проблем с энергосбережением мобильного устройства.
Verifier. Диагностическое средство Driver Verifier, с помощью которого можно выявить конфликты в работе драйверов, а также получить сведения о неподписанных и требующих дополнительной проверки драйверах. Пригодится для поиска проблемных драйверов, которые часто служат причиной нестабильной работы Windows.
Msconfig. Системная утилита Microsoft System Configuration Utility, управляющая автозапуском приложений, загрузкой служб и исполняемых файлов Windows, а также различными настройками операционной системы. Позволяет запустить ОС в режиме диагностики с базовым набором драйверов и служб.
⇡#Восстановление системных файлов и данных
Sfc. Инструмент System File Checker для проверки целостности системных модулей, библиотек и ключевых компонентов Windows, а также их восстановления в случае обнаружения проблемных файлов.
Wbadmin. Позволяет выполнять резервное копирование и восстановление операционной системы, томов, файлов, папок и приложений из командной строки. Для создания резервных копий следует ввести в консоли wbadmin start backup, для запуска процедуры восстановления данных — wbadmin start recovery. Проще не бывает.
Recover. Восстанавливает данные с повреждённых носителей. Утилита выполняет посекторное копирование указанных файлов и извлекает сохранившиеся данные. При этом «битые» секторы игнорируются. Метод элементарный и при наличии незначительного числа сбойных секторов на диске вполне эффективный, особенно по части восстановления файлов с простой внутренней структурой (например, текстовых документов).
⇡#Работа с дисками
Fsutil. Консольный инструмент для просмотра сведений об используемых на диске ПК файловых системах, быстрой оценки занятого пространства на накопителе и выявления проблемных мест, создания жёстких ссылок на файлы, управления дисковыми квотами и решения прочих задач. К примеру, команда fsutil fsinfo volumeinfo c: отображает сведения о системном диске и задействованных томах, а fsutil volume allocationreport c: позволяет узнать, сколько места занимают служебные файлы и метаданные файловой системы NTFS, теневые копии (точки восстановления) Windows, сжатые, зашифрованные и разреженные файлы.
Chkdsk. Позволяет проводить диагностику файловой системы и устранять обнаруженные ошибки. Пригодится для восстановления работы компьютера после сбоев и внезапных перезагрузок, поиска повреждённых секторов, устранения проблем со структурой файловых систем FAT, FAT32 и NTFS.
Defrag. Утилита для дефрагментации жёстких дисков. Программа упорядочивает и объединяет фрагментированные данные, тем самым повышая эффективность работы HDD (для твердотельных накопителей SSD проблема фрагментации файлов неактуальна). Defrag позволяет оптимизировать как все данные на диске, так и только загрузочные файлы. Поддерживается работа с отдельными разделами, разным системным приоритетом и в фоновом режиме. Перед началом использования приложения рекомендуется провести оценку необходимости дефрагментации того или иного диска. Делается это с помощью ключа /a, запускающего анализ указанного тома.
Certutil. Программа командной строки, которая позволяет управлять службами сертификации Windows и не только. Рядовому пользователю certutil может пригодиться в качестве инструмента для кодирования и декодирования файлов с использованием стандарта Base64 (параметры /encode и /decode), расшифровки кодов ошибок Windows (ключ /error) и вычисления хешей (контрольных сумм) файлов (опция /hashfile). Последняя функция может быть использована для проверки целостности и подлинности файлов, например ISO-образов операционных систем или дистрибутивов программ.
Cipher. Предназначена для управления шифрованием данных на уровне файловой системы NTFS и защиты конфиденциальной информации от несанкционированного доступа. Интересная особенностью утилиты — активируемая ключом /w функция затирания следов удалённых файлов с целью исключения их последующего восстановления средствами специализированного ПО. Такая возможность может пригодиться, к примеру, для предпродажной подготовки ПК и гарантированной вычистки хранившихся на нём данных.
⇡#Управление системными процессами
Tasklist и taskkill. Команды для управления запущенными в системе процессами. Первая отображает список выполняющихся в данный момент приложений и служб, вторая — позволяет завершать их выполнение и нередко используется IT-специалистами при написании скриптов для автоматизации административных задач. Что касается домашних пользователей, то для них знание упомянутых инструкций тоже не будет лишним. Например, на случай непредвиденных сбоев графического интерфейса Windows, когда доступной остаётся только консоль. В таких ситуациях tasklist и taskkill помогут выгрузить из памяти ПК проблемные процессы.
Shutdown. Команда, позволяющая принудительно завершить все процессы для последующей перезагрузки ОС либо выключения компьютера. Поддерживает отложенное выключение/перезагрузку по таймеру, перевод ПК в режим гибернации и прочие функции, для ознакомления с полным списком которых следует использовать параметр /?.
⇡#Работа с сетью
Ping. Утилита для диагностики сетевого соединения с тем или иным сервером. Программа отправляет запросы указанному узлу сети, фиксирует поступающие ответы, временные задержки по маршруту и частоту потери пакетов. Руководствуясь данными сведениями, можно оценить загруженность канала передачи данных и качество связи с интернет-ресурсом. Также команда ping может использоваться для определения IP-адреса сайта по его доменному имени и мониторинга состояния удалённых хостов.
Tracert. Консольное приложение для трассировки маршрута до заданного сервера в интернете. Программа выполняет отправку тестового пакета указанному узлу сети и отображает информацию обо всех промежуточных маршрутизаторах, через которые прошёл пакет на пути к запрошенному ресурсу, а также время отклика каждого из них. Это позволяет оценить, насколько «длинный» путь прошёл пакет и на каком участке возникают наибольшие задержки, связанные с передачей данных. Tracert помогает определить проблемные участки сети и установить места потери или задержки пакетов.
Ipconfig. Выводит сведения о конфигурации используемых Windows сетевых адаптерах (в том числе виртуальных). Позволяет узнавать текущий IP-адрес компьютера, просматривать идентификаторы MAC сетевых устройств, а также очищать DNS-кеш. Последняя функция может быть полезна при некорректной работе службы доменных имён Windows и сбоях при доступе к веб-ресурсам.
Netstat. Служит для получения сведений обо всех активных сетевых соединениях, просмотра таблиц IP-маршрутизации и статистики по протоколам. С помощью команды netstat можно получить представление о том, какой установленный на компьютере софт проявляет излишнюю сетевую активность, какой порт использует определенный системный процесс, а также просмотреть расширенную информацию о сетевых интерфейсах.
⇡#Удаление вредоносного ПО
Mrt. Утилита Malicious Removal Tool для сканирования компьютера на предмет наличия наиболее распространённого зловредного ПО. Находит и удаляет угрозы, а также отменяет внесённые ими изменения. На выбор доступны три варианта проверки — быстрая, полная и выборочная. Поддерживается работа в фоновом режиме. Malicious Removal Tool регулярно обновляется через Windows Update и может использоваться в качестве дополнения к установленным в системе защитным решениям.
⇡#Заключение
Как ни крути, даже в современных реалиях перечисленные консольные утилиты — неплохое подспорье для повседневной работы за компьютером. И пусть многим из них уже не один десяток лет, они до сих пор не теряют своей актуальности и могут сослужить добрую службу всем пользователям Windows — даже тем, кто редко выходит за рамки графического интерфейса операционной системы. Готовы поспорить с данным утверждением или дополнить обзор ценными замечаниями? Оставляйте свои отзывы в комментариях ниже — мы вас слушаем очень внимательно.
Если Вы заметили ошибку — выделите ее мышью и нажмите CTRL+ENTER.
Нередко неопытные пользователи воспринимают командную строку Windows как нечто совершенно ненужное и отжившее свой век. Думать так — это большая ошибка. Значение командной строки или иначе консоли CMD трудно переоценить даже после того как она потеряла большую часть своих команд доступных в MSDOS. Достоинство командной строки заключается, прежде всего, в обеспечении прямого доступа к операционной системе и её скрытым возможностям, кроме того консоль CMD имеет в себе несколько полезнейших встроенных утилит предназначенных для работы с программными и аппаратными компонентами компьютера.
Быть асом командной строки совершенно не обязательно, тем не менее, есть команды, которые должен знать каждый уважающий себя пользователь Windows. Вот они.
Assoc
Большинство пользовательских файлов в операционной систем связаны с определёнными программами, которые обрабатывает их по умолчанию. Такая связь называется ассоциацией. Для её просмотра как раз и существует команда assoc. При её выполнении выводится список сопоставлений расширений и типов файлов. А ещё команда assoc позволяет изменять ассоциации.
Например командой assoc .html = txtfile для файлов с расширением HTML устанавливается тип файла txtfile (текстовый). Если же вам нужно узнать какой именно программой открываются файлы с таким расширением, используйте команду ftype txtfile.
Cipher
Эта команда предназначается для шифрования и дешифрования данных на дисках с файловой системой NTFS, но с таким же успехом она может использоваться для зачистки свободного дискового пространства. Пользоваться ей очень просто. Если вам нужно гарантированно удалить остатки всех ранее удалённых файлов на диске D, выполните в консоли команду cipher /w:D.
Driverquery
Полезная команда позволяющая просмотреть список всех установленных в операционной системе драйверов. При выполнении команды без параметров данные выводятся в виде отсортированного списка. Колонка «Модуль» содержит имена драйверов без расширения, колонка «Название» включает краткое описание драйвера, «Тип драйвера» — соответственно тип, «Дата ссылки» указывает на дату установки или последней модификации драйвера.
FC (File Compare)
Команда FC пригодится в основном кодерам, также она может использоваться теми юзерами, которым приходится работать с текстовыми файлами. Эта команда позволяет сравнивать содержимое двух файлов, отыскивая между ними несоответствия. Допустим, у вас имеются два файла file1.docx и file2.docx и вы хотите их сравнить. Выполните в консоли следующую команду:
fc /U «D:file1.docx» «D:file2.docx»
В данном примере мы сравнили два простых текстовых документа. Интерпретатор командной строки нашел несоответствие в одном из предложений и указал конкретное место. Команда FC также позволяет сравнивать бинарные файлы, файлы в кодировке юникод, определять число несоответствий и т.п. Если сравниваемые файлы окажутся идентичными, при выполнении команды FC будет выведено соответствующее сообщение.
Ipconfig
Полезная команда позволяющая определить текущие настройки протокола TCP/IP или попросту IP-адрес. Однако показывает она только внутренний IP-адрес, если же вы используете роутер и хотите узнать тот IP, с которым вы выходите в глобальную Сеть, лучше обратиться к помощи специальных онлайновых сервисов типа 2ip.ru.
Netstat
Эта команда выводит список всех текущих интернет-соединений. Используется она в основном администраторами для отображения TCP и UDP-соединений, прослушиваемых портов, таблиц маршрутизации и статистических данных для различных протоколов. Также может использоваться для поиска следов, оставляемых вирусами и прочими вредоносными объектами. Выполненная без параметров команда Netstat отображает тип соединения, локальный адрес, внешний адрес и текущее состояние.
Ping
Как и Netstat команда ping используется в основном системными администраторами. Служит она для диагностики компьютерных сетей. С её помощью можно определять доступность тех или иных ресурсов. Допустим вам нужно проверить доступность Google. Поскольку DNS сервер Google имеет адрес 8.8.8.8, в консоли CMD нужно выполнить команду ping 8.8.8.8.
Цифровой IP-адрес также может быть заменён текстовым URL-адресом — ping google.com. Если узел окажется недоступен будет выведено сообщение «превышен лимит ожидания», а количество потерь при этом составит 100 процентов.
Tracert
Ещё одна «сетевая» команда, предназначенная для диагностики сети (трассировки). Команда позволяет получить цепочку узлов, через которые проходит IP-пакет, адресованный конечному узлу. Используется системными администраторами для выявления неполадки, препятствующей доставке пакетов конечному узлу. Примером использования команды может послужить трассировка к узлу того же Google: tracert google.com.
Pathping
Работает эта команда примерно так же как и tracert, но в отличие от последней является более функциональной. Команда выполняет трассировку плюс отправку запросов на промежуточные узлы маршрута для сбора информации о задержках и потерях пакетов на каждом из них.
Powercfg
Мощная утилита командной строки, предназначенная для управления параметрами электропитания Windows. Выполняется только с параметрами. Выполненная с ключом /Q команда Powercfg выводит текущую конфигурацию схемы электропитания, с ключом /a выводит отчет об использовании электроэнергии в ноутбуках, с ключом –energy генерирует детальный текстовый лог о состоянии компонентов компьютера, включая аккумуляторные батареи. Также команда Powercfg может использоваться для создания резервных копий настроек электропитания и развёртывания их на новом оборудовании.
Shutdown
Эта команда используется для завершения сеанса пользователя, выключения, перезагрузки и перевода компьютера в режим гибернации. Поддерживает удалённое управление. Выполняется shutdown всегда с параметрами. Например, команда вида shutdown /s /t 0 приведёт к завершению работы открытых приложений и немедленному выключению компьютера. Посмотреть список доступных ключей можно выполнив в консоли shutdown /?.
Sfc (System File Checker)
Одна из самых полезных и нужных команд. Предназначается для обнаружения и восстановления повреждённых или модифицированных системных файлов Windows. Восстановление производится из резервных копий создаваемых самой операционной системой. Чтобы запустить сканирование системы с последующим восстановлением файлов выполните команду sfc с параметром /scannow. После завершения проверки потребуется перезагрузка компьютера. Выполнять эту команду нужно в консоли, запущенной от имени администратора.
Tasklist
Команда Tasklist делает ту же работу, что и Диспетчер задач. Выполненная без параметров она выводит список всех запущенных процессов выполняющихся на локальном или удалённом компьютере. При этом для каждого процесса отображается его название, идентификатор (PID), имя сессии, номер сеанса и выделенный объём оперативной памяти. Команда Tasklist поддерживает использование ключей и фильтров. Например, Tasklist /SVC выводит список процессов вместе со службами для каждого процесса в отдельности.
Taskkill
Если Tasklist просто выводит список запущенных процессов, то Taskkill завершает их работу в принудительном режиме. Правда для этого вам потребуется знать идентификатор завершаемого процесса или название исполняемого файла. Допустим, вам нужно принудительно закрыть Блокнот. Выполняем для начала команду Tasklist и смотрим PID процесса notepad.exe. В нашем случае он имеет значение 2580. Зная PID процесса его легко можно «убить». Сама же команда будет выглядеть так: Taskkill /PID 2580. Примерно так же сработает команда Taskkill /IM notepad.exe, только в этом примере будут завершены все экземпляры процесса notepad.exe.
Итог
На этом пока всё. Есть и другие полезные команды CMD, с которыми пользователям желательно было бы познакомиться, но о них мы расскажем в следующий раз. К таковым в частности относится Diskpart — мощный инструмент управления дисками и разделами не уступающий возможностями коммерческим программным продуктам типа Acronis Disk Director.
Имеет ли смысл изучать командную строку профессионально? Вряд ли, если только вы не собираетесь становиться программистом или системным администратором.
Впрочем, желающим освоить консоль CMD не мешало бы также обратить внимание на её продвинутый аналог — встроенную утилиту PowerShell.
Изучите основные команды windows, которые помогут вам в устранении неполадок, настройке и сборе информации о системе. 50 базовых команд Windows с примерами.
Большинство этих команд встроено в windows, поэтому нет необходимости что-либо загружать или устанавливать (единственное исключение — команды Sysinternals). Кроме того, эти команды Windows можно запускать из командной строки или консоли PowerShell.
Совет: Большинство команд windows содержат меню справки, в котором перечислены все параметры и синтаксис команды. Введите команду, за которой следует /? для просмотра меню справки. Например, ping /?
1. ping (проверка сетевого соединения)
Команда ping проверяет сетевое соединение между двумя устройствами, посылая эхо-запросы ICMP. Например, компьютер A проверяет, есть ли у него соединение с компьютером B, посылая несколько пакетов туда и обратно.
Команда ping по-прежнему является одним из моих любимых инструментов для тестирования базового сетевого подключения. Она быстрая и очень простая в использовании. Кроме того, я использую ее для следующих целей:
- Проверка потери пакетов
- Тестирование задержки
- Тестирование DNS-запросов
- Тестирование возможности подключения с настройкой новых соединений (может ли мой маршрутизатор общаться со следующим узлом, например, маршрутизатором провайдера?)
Примеры Ping
Чтобы проверить соединение с другим устройством по IP, используйте приведенную ниже команду.
ping 192.168.100.1
Ping по имени хоста.
ping bookflow.ru
Для большинства команд windows вы можете ввести команду, за которой следует /? для просмотра справки, в ней будет показан полный синтаксис и параметры. Поэтому для просмотра справки по команде ping используйте эту команду:
ping /?
Ключ -l задает размер пакета.
ping -l 2024 192.168.5.1
Ключ -a будет выполнять обратное разрешение имен на IP (поиск PTR-записей).
ping -a 142.250.177.46
-Ключ -t будет выполнять непрерывный пинг. Очень популярная команда для тестирования сетевого соединения.
ping -a 192.168.5.1
Отправьте вывод любой команды в текстовый файл.
ping -t > c:ittest-ping.txt
2. ipconfig (получение информации о сетевом адаптере)
Команда ipconfig используется для отображения конфигурации TCP/IP компьютера. Вы можете отобразить информацию об IP для одной или всех сетевых карт, установленных на компьютере.
Эта команда также может отображать кэш DNS на локальной машине, очищать DNS, освобождать и обновлять адреса DHCP на всех сетевых картах.
Примеры команд ipconfig
Для просмотра IP-конфигурации всех сетевых карт на компьютере введите команду ниже и нажмите клавишу Enter.
ipconfig /all
Ключ /all для отображения информации об IP для всех сетевых карт.
ipconfig /all
/flushdns для очистки кэша локального DNS
ipconfig /flushdns
/registerdns для запуска динамической регистрации имен DNS и IP-адресов, настроенных на компьютере.
ipconfig /registerdns
/release для освобождения адресов DHCP. Это освободит адреса DCHP на сетевых картах, настроенных на DHCP.
ipconfig /release
/renew ключ обновит DHCP-адрес для всех сетевых карт.
ipconfig /renew
/displaydns ключ отобразит кэш клиента DNS.
ipconfig /displaydns
3. nslookup (поиск записей dns)
Команда nslookup используется для проверки записей DNS и устранения неполадок DNS. Это обязательная команда для любого системного администратора или сетевого инженера. Вы можете выполнять все виды тестов для проверки правильности работы DNS, вы можете проверять PTR, A, MX, SOA и многие другие типы записей DNS. Это еще одна из моих любимых команд windows для устранения неполадок в сети.
Примеры команд Nslookup
Чтобы проверить наличие записи A в имени хоста, выполните следующие два шага
Шаг 1: введите nslookup и нажмите enter
Шаг 2: введите доменное имя и нажмите enter
4. tracert (поиск и устранение неисправностей в сети)
Команда tracert используется для отслеживания пути, пройденного пакетом от IP-адреса источника до адреса назначения. Это означает, что она отображает каждый маршрутизатор (hop), через который проходит пакет, чтобы достичь места назначения.
Эту команду я использую не очень часто, но все же она может пригодиться при устранении неполадок в сети. Например, у нас были некоторые проблемы со скоростью веб-сайта у нашего провайдера, а у другого провайдера проблем не было. Провайдер попросил нас запустить traceroute, чтобы они могли увидеть путь, который проходит сайт.
Примеры команды tracert
Синтаксис этой команды — tracert, за которым следует имя хоста или IP.
tracert google.com
У этой команды очень мало опций. Единственный ключ командной строки, который я считаю полезным, это -d, который используется для того, чтобы не преобразовать адрес в имя хоста.
5. Команда shutdown (выключение)
Команда shutdown делает именно это — она выключает компьютер. Эта команда полезна для выключения или перезапуска локальных или удаленных компьютеров. Она также позволяет быстро просмотреть все журналы регистрации причин перезапуска или выключения компьютера.
Примеры shutdown
Эта команда перезагрузит компьютер pc2.
shutdown /r /m \pc2
Эта команда выключит удаленный компьютер.
shutdown /s /m \pc2
Просмотр журналов предыдущих выключений/перезагрузок.
shutdown /d
Вот пример вывода команды shutdown /d. Это может быть полезно, чтобы быстро проверить, почему компьютер перезагрузился или выключился.
Другие примеры shutdown
Некоторые из них используют несколько ключей, обратитесь к файлу справки shutdown /? для объяснения каждого ключа команды.
Выход пользователя из системы на удаленном компьютере.
shutdown /l /m \pc2
Перезагрузка удаленного компьютера без обратного отсчета.
shutdown /r /m \pc2 /t 0
Выключает локальный компьютер и указывает период времени до выключения в секундах.
shutdown /s /t 60
Выключение удаленного компьютера с помощью пользовательского сообщения.
shutdown /m \pc2 /c "Rebooting computer, have a nice day"
Прервать выключение системы.
shutdown /a
Принудительное закрытие приложений без предупреждения.
shutdown /s /f
6. Gpupdate (обновление групповой политики)
Команда gpupdate используется для применения групповых политик на компьютере в домене windows. Это очень популярная команда, я видел много админов, которые используют ее. Вы можете запустить эту команду, чтобы обновить GPO и избежать перезагрузки, но это не всегда срабатывает.
Примеры команды gpupdate
Эта команда выполняет все изменения GPO на компьютере.
gpupdate
Используйте /force для повторного применения всех GPO на компьютере.
gpupdate /force
7. Netstat (отображение сетевых подключений)
Это потрясающая команда.
Команда netstat отображает информацию о TCP/IP-соединениях, статистику ethernet и таблицу маршрутизации компьютера. Как системный администратор я использую эту команду на серверах и клиентах Windows при устранении проблем с подключением. Я могу убедиться, что серверы приложений работают правильно, проверив, что служба запущена и прослушивает соединения на порту.
Примеры команды netstat
Отображение всех активных и прослушиваемых портов.
netstat -a
Отображение всех соединений в числовом порядке.
netstat -a -n
Вот результат выполнения вышеуказанной команды. Вы видите, как можно проверить подключение сервера и клиента. Он показывает, что мой контроллер домена с IP 192.168.100.10 установил эти четыре соединения с IP 192.168.100.11.
Другие примеры netstat
Отображает исполняемый файл, который используется для создания соединения.
netstat -ab
Отображает статистику ethernet. Это быстрый способ проверить наличие ошибок и потерь сетевой карты.
netstat -e
Отображает exe и идентификатор процесса (PID), связанный с соединением.
netstat -abo
Отображает локальную таблицу маршрутизации компьютера.
netstat -r
Отображает FQDN с информацией о подключении.
netstat -af
8. Dcdiag (проверка контроллера домена)
Если вы являетесь администратором Active Directory, то вы должны знать эту команду. Эта команда анализирует состояние контроллеров домена, она содержит более 30 встроенных тестов. Вы должны регулярно запускать эту команду, чтобы убедиться, что ваша среда домена находится в рабочем состоянии.
примеры dcdiag
Чтобы запустить dcdiag на определенном контроллере домена, выполните следующую команду
dcdiag /s:DC1
9. Net stop и net start (службы windows)
Простая команда для запуска и остановки служб windows.
Примеры
В этом примере я остановлю и запущу службу спулера принтера.
net stop spooler
и теперь запустим службу спулера.
net start spooler
Это все для данной команды, дополнительных параметров нет.
10. Systeminfo
Команда systeminfo отображает сведения о конфигурации компьютера, такие как имя и версия ОС, информация об оборудовании, время загрузки, сервер входа в систему и многое другое.
Эта команда отображает множество деталей, я обычно использую ее для проверки времени последней загрузки, сервера входа в систему и версии ОС.
Вы можете запустить эту команду на удаленных компьютерах с параметром /s.
system info /s pc1
11. Getmac (получить mac-адрес)
Эта команда возвращает MAC-адрес всех сетевых карт в системе. При устранении проблем с подключением клиента мне часто нужен MAC-адрес компьютера, чтобы я мог проверить, что он подключен на коммутаторе. Эта команда — лучший способ быстро получить MAC-адрес компьютера.
Чтобы запустить ее на локальном компьютере, просто введите getmac.
Для запуска на удаленном компьютере используйте параметр /s.
getmac /s pc1
12. Gpresult (результаты групповой политики)
Команда gpresult сообщает о том, какие групповые политики и параметры применяются к пользователю или компьютеру.
Это еще одна команда, которую необходимо знать, если вы работаете с серверами Active Directory.
Чтобы отобразить все примененные GPO, выполните эту команду. Примечание: Вам необходимо запустить командную строку в режиме администратора, иначе она не создаст полный отчет.
gpresult /r
Приведенная выше команда предоставит отчет для GPO, применяемых как к пользователю, так и к компьютеру.
и настройки компьютера.
Другие примеры GPResult (50 базовых команд Windows с примерами)
Отображение GPO, примененных к пользователю.
gpresult /r /scope:user
Отображение GPO, примененных к компьютеру.
gpresult /r /scope:computer
Отображение GPO для удаленного компьютера.
gpresult /s pcname
Создание отчета в формате HTML.
gpresult /h c:report.html
Отправка вывода команды в текстовый файл.
gpresult /r > c:result.txt
13. Команда whoami
Эта команда показывает, кто в настоящее время вошел в локальную систему. Она также может показать, к каким группам принадлежит пользователь. Используйте эту команду для отображения членства в группах зарегистрированных пользователей.
Получить текущего залогинившегося пользователя.
whoami
Отображение групп пользователей, к которым принадлежит текущий пользователь.
whoami /groups
Другие команды whoami (50 базовых команд Windows с примерами)
Отображение имени пользователя в формате UPN
whoami /upn
Отображает текущий домен, имя пользователя и SID пользователей
whoami /user
Отображает всю информацию для текущего пользователя
whoami /all
14. Клиент telnet
Я использую клиент windows telnet для проверки того, разрешает ли удаленный хост подключение к определенному порту или нет, когда кто-то говорит, что ваш брандмауэр блокирует работу программы.
Если вы знаете номер порта, на котором работает приложение, вы можете использовать приведенную ниже команду. В данном примере я установил filezilla, поэтому порт 21 должен быть открыт.
Синтаксис: telnet + имя хоста или IP + номер порта
telnet srv01 21
Вы можете получить или не получить ответ от удаленного сервера. В данном случае с filezilla это так. Вы также можете получить пустой экран при успешном подключении.
Если соединение не установлено, вы должны получить сообщение, как показано ниже.
Это все, для чего я использую клиент telnet. Полный синтаксис команды можно найти в документации Microsoft по telnet.
15. Set (получить сведения о системе)
Команда set отображает информацию о переменных окружения.
Я не так часто использую эту команду, но все же она полезна для проверки входа пользователя на сервер или быстрого просмотра переменных окружения.
Одна маленькая хитрость этой команды заключается в том, что вы можете ввести команду, за которой следует строка, и она отобразит только эти результаты. Например, если я хочу найти все, что начинается с path, я использую следующую команду
set path
Теперь он просто отображает все, что начинается с «path».
16. Cd (сменить каталог)
Команда cd позволяет перейти в другой каталог на вашем компьютере.
Например, чтобы перейти в каталог windows, используйте эту команду.
cd windows
Вы также можете начать вводить имя каталога и нажать клавишу tab для автоматического завершения. Например, для перехода в каталог «Program Files» я могу набрать cd pro и нажать клавишу tab, после чего произойдет автоматическое завершение пути.
17. Mkdir (создать каталог)
Команда mkdir создает каталог или подкаталог. Она создает каталог в текущем каталоге. Например, в командной строке мой путь — c:it, если я наберу mkdir folder1, это создаст каталог folder1 в папке c:it.
Если я посмотрю в проводнике windows, то увижу каталог folder1.
18. Sfc (средство проверки системных файлов)
Команду sfc можно использовать для проверки и замены важных системных файлов windows. Если у вас синий экран или другие сбои, команда sfc может устранить проблему. Приведенная ниже команда просканирует все защищенные файлы операционной системы и при необходимости выполнит ремонт.
sfc /scannow
Можно также запустить тест только без ремонта.
sfc /verifyonly
19. Net use (подключение к сетевым ресурсам)
Команда net use используется для подключения и удаления общих ресурсов, таких как сетевые диски и принтеры.
В этом примере я подключу сетевой диск к моему серверу srv-vm1
net use \srv-vm1share
Вы можете использовать net use для составления списка ресурсов.
Чтобы удалить ресурс, используйте /delete
net use z: /delete
20. Chkdsk (проверить диск)
Команда chkdsk сканирует файловую систему на диске и проверяет целостность файлов и метаданных. У этой команды много опций командной строки, поэтому для получения подробной информации обратитесь к меню справки (chkdsk /?).
Для проверки диска в режиме только для чтения выполните следующую команду.
chkdsk
Используйте /F, чтобы исправить все ошибки, обнаруженные на диске.
chkdsk /f
21. Route Print (просмотр локальной таблицы маршрутизации)
Для просмотра таблицы маршрутизации локального компьютера используйте команду route print. Это полезно, когда компьютер оснащен несколькими сетевыми интерфейсными картами и вам нужно определить маршрут, по которому проходит сетевой трафик.
route print
22. powercfg (Настройки питания)
Список и настройка параметров питания с помощью команды powercfg
Перечислить все схемы электропитания:
powercfg /list
Измените тайм-аут монитора:
powercfg /change monitor-timeout-ac 5
23. Tasklist (отображение запущенных процессов)
Tasklist (список задач) отображает запущенные процессы на локальном компьютере.
24. Taskkill (завершить процесс)
Завершить процесс по номеру PID. В этом примере я принудительно завершаю процесс PID 1808.
taskkill /pid 1808 /f
25. Format (50 базовых команд Windows с примерами)
Команда format используется для форматирования раздела на жестком диске или флэш-накопителе. При этом все данные с раздела будут удалены.
В этом примере я отформатирую диск E в файловую систему NTFS.
format e: /fs:NTFS
26. Cls (очистить экран)
Команда cls очищает консоль командной строки. Это полезно, когда на экране много информации, а вам нужен пустой экран.
В командной строке windows введите cls и нажмите enter, чтобы очистить экран.
27. Diskpart (50 базовых команд Windows с примерами)
Diskpart позволяет управлять дисками, разделами и томами на локальном компьютере. Вы можете удалять, создавать, форматировать, расширять и уменьшать тома.
Чтобы отобразить список дисков на локальном компьютере, выполните следующие команды.
diskpart list disk
28. Robocopy
Robocopy позволяет легко копировать файлы и каталоги из одного места в другое. Это очень популярная команда windows для перемещения файловых серверов на другой сервер.
Копирование файлов с одного сервера на другой.
robocopy c:source \srv-vm2share /z /e /copyall
29. Xcopy
Xcopy — еще одна команда Windows, используемая для копирования файлов и папок. Чтобы скопировать все файлы и папки в новое место, используйте эту команду.
xcopy c:myfolder e:myfolder
30. Del
Команда del используется для удаления файлов и папок. При удалении файлов с помощью команды del они не попадают в корзину.
Удаление одного файла.
del c:itpass.txt
Удалите все файлы exe.
del c:it*.exe
Удаление файлов и вложенных папок.
del c:it*.*
31. Assoc (ассоциация файлов)
Команда assoc отображает или изменяет ассоциации расширений имен файлов.
Список всех текущих ассоциаций расширений имен файлов.
assoc
Вот пример создания ассоциации файлов. Я свяжу расширение файла .jpg с типом файла jpegfile.
assoc .jpg=jpgfile
32. Schtasks (запланированные задачи)
Команда schtasks позволяет добавлять, удалять, изменять и просматривать запланированные задачи на локальном компьютере.
Просмотр запланированных задач:
schtasks
Удаление запланированной задачи:
SCHTASKS /Delete /TN "BackupBackup and Restore"
33. Net user (50 базовых команд Windows с примерами)
Команда net user отображает информацию об учетной записи пользователя на локальном компьютере или в домене.
На ПК введите net user, чтобы увидеть информацию об учетной записи компьютера.
Чтобы получить все учетные записи пользователей с контроллера домена.
net user /domain
Получите данные учетной записи домена.
net user username /domain
34. Arp
Команда arp отображает и изменяет кэш протокола разрешения адресов (ARP) на локальном компьютере.
Отображение кэша arp для всех интерфейсов:
arp -a
Чтобы очистить кэш arp, используйте эту команду:
arp -d
35. Hostname (50 базовых команд Windows с примерами)
Эта команда windows отображает имя хоста компьютера.
hostname
36. Cipher (шифровать данные)
Команда cipher полезна для перезаписи удаленных данных в windows. Когда вы удаляете данные из Windows, их можно восстановить с помощью программного обеспечения для восстановления данных. С помощью команды cipher можно удалить удаленные данные с диска, чтобы никто не смог их восстановить.
Чтобы перезаписать удаленные данные на томе, используйте ключ /w. Например, я очищу путь c:itprivate.
cipher /w:c:itprivate
37. fc (сравнение файлов)
Команда fc сравнивает два файла и выводит разницу между ними.
В этом примере я проверю разницу между двумя текстовыми файлами (ping1.txt и ping2.txt).
fc c:itping1.txt c:itping2.txt
38. Psexec (50 базовых команд Windows с примерами)
PsExec позволяет выполнять команды на удаленных компьютерах. Это полезно, когда нужно устранить неполадки на удаленном компьютере без полного контроля над ним.
В этом примере я выполню команду ipconfig на удаленном компьютере pc1, чтобы получить информацию об IP-адресе.
psexec \pc1 ipconfig
39. Sysinternals (50 базовых команд Windows с примерами)
Sysinternals — это набор утилит, разработанный Марком Руссиновичем и Брайсом Когсвеллом, который используется для устранения неполадок и мониторинга компьютеров под управлением Windows. Набор утилит стал очень популярным среди ИТ-администраторов для мониторинга процессов windows и сбора информации о системе. В 2006 году Microsoft приобрела компанию и ее активы.
Набор инструментов можно загрузить с сайта Sysinternals.
40. Rsop (параметры групповой политики)
Команда RSOP создает отчет о политиках, примененных к компьютеру и пользователю. Это полезно для устранения неполадок в настройках групповой политики на локальном компьютере.
Эта команда требует запуска с правами локального администратора.
rsop
41. Mmc
mmc открывает консоль управления Microsoft Management Console. Затем можно добавлять/удалять собственные оснастки для быстрого доступа к различным консолям управления.
42. Dir (50 базовых команд Windows с примерами)
Команда dir выводит список всех файлов и каталогов в определенном каталоге.
Чтобы перечислить содержимое текущего каталога, используйте эту команду:
dir
Чтобы перечислить содержимое другой папки, перейдите в эту папку или введите dir и путь к ней. Например, я перечислю содержимое папки c:itprivate.
dir c:itprivate
Если в каталоге много файлов и папок, вы можете приостановить листинг каталога, чтобы просмотреть его.
dir /p
43. Runas (50 базовых команд Windows с примерами)
Runas позволяет запустить определенный инструмент или программу от имени другого пользователя. Например, вы вошли в систему как обычный пользователь (без прав администратора), а вам нужно запустить программу под учетной записью, имеющей права локального администратора.
В этом примере я вошел в систему как adproadam.reed и запущу программу (блокнот) под учетной записью локального администратора.
runas /user:administrator c:windowsnotepad.exe
44. Rmdir (удаление каталогов)
Вам нужно удалить каталог? Команда rmdir удалит каталог.
По умолчанию команда удаляет только пустые каталоги. Если вы хотите удалить каталог и файлы в нем, используйте ключ /s.
Например, я удалю каталог c:itprivate и все файлы в этом каталоге.
rmdir c:itprivate /s
45. W32tm (служба времени)
Команда w32tm используется для настройки параметров службы времени windows. Если вам нужно настроить службу времени на сетевой сервер времени, вы можете использовать эту команду для настройки параметров. 50 базовых команд Windows с примерами.
Чтобы просмотреть конфигурацию службы времени, выполните эту команду.
w32tm /query /computer: /configuration
У этой команды много опций, она сложнее, чем казалось. Для получения более подробной информации ознакомьтесь со страницей документации w32tm.
46. Msiexec (установка msi файлов)
Команду msiexec можно использовать для установки и изменения пакетов установщика msi и MSP. Эта команда обычно используется для тихой установки программного обеспечения с помощью программы установки msi.
Установите пакет.
msiexec /i c:install_file.msi
Установка пакета без участия пользователя.
msiexec /i c:install_file.msi /quit
47. Ver (50 базовых команд Windows с примерами)
Команда ver отображает версию Windows.
48. Manage-bde (BitLocker)
Проверка состояния bitlocker, шифрование и расшифровка дисков с данными.
Проверка состояния битлокатора.
manage-bde -status
Включите bitlocker и зашифруйте диск.
manage-bde -on
49. Findstr
Findstr ищет фрагменты текста в файлах.
Например, я буду искать слово food в файле ping1.txt
findstr food c:itping1.txt
Приведенная выше команда будет искать в файле любой экземпляр строки food.
Вот как выглядит текстовый файл.
Ниже показано, что команда дважды нашла строку «food» в файле.
Дополнительные примеры см. в документации Microsoft findstr.
50. Mstsc (50 базовых команд Windows с примерами)
Команда mstsc запускает сеанс удаленного рабочего стола на другом компьютере или позволяет редактировать конфигурационный файл .rdp.
Подключитесь к серверу, используя полноэкранный режим, я буду использовать 192.168.100.10 в этих примерах.
mstsc /f 192.168.100.10
Распределите rdp по нескольким мониторам.
mstsc /span 192.168.100.10
Есть ли команда для вывода списка всех команд Windows?
Вы можете набрать help, чтобы получить список системных команд по умолчанию.
К сожалению, здесь не перечислены команды, которые были установлены другими программами, например, инструментами RSAT. Полный список команд можно найти в документации по командам Microsoft Windows.
Как запустить командную строку от имени администратора?
Это очень важно, поскольку некоторые команды не будут выполняться, если командная строка не находится в режиме администратора.
Чтобы запустить командную строку от имени администратора, щелкните правой кнопкой мыши на «Командная строка» и выберите «Запуск от имени администратора«.
Итог 50 базовых команд Windows с примерами.
Все эти команды можно использовать в PowerShell или в старом (и мертвом) Windows CMD. Эти команды полезны независимо от того, на каком этапе ИТ-карьеры вы находитесь. Я использовал некоторые из этих команд с тех пор, как начал работать техником службы поддержки, и до сих пор использую их в качестве системного администратора/сетевого инженера.
Возможно вам так же будет интересно:
Как создать разделы диска в Linux?
Полезные горячие клавиши для Bash
Windows 10 предусматривает гибкую настройку и управление системой с помощью командной строки. Она позволяет пользователю посредством команд воспользоваться той или иной функцией. Например, существует команда SFC /scannow, позволяющая производить сканирование и мгновенное исправление системных файлов. Подобных функций десятки, но не все о них знают. Однако некоторые из них бывают очень даже полезными при постоянном использовании ПК.
Сегодня мы поговорим подробнее об основных командах для командной строки в Windows 10.
Открываем командную строку
Для пользователей Windows 10 в командной строке предоставлено огромное количество команд, однако не все из них используются даже опытными юзерами. Поэтому мы рассмотрим с вами только основные команды, которые могут пригодиться в разных случаях. Но для начала я покажу вам, каким способом можно запустить командную строку и как ею пользоваться.
Самый простой способ запуска командной строки – это ввод специальной команды в окне «Выполнить». Для этого воспользуемся следующей инструкцией:
- Используем комбинацию клавиш «Win+R», где Win – это клавиша, расположенная в нижней левой части клавиатуры с логотипом Windows. Далее вводим команду cmd и нажимаем на клавишу «Enter».
Запускаем командную строку
- В отобразившемся окне перед нами открывается командная строка, которая уже готова к получению команд от пользователя.
Командная строка включает в себя простой интерфейс и мощный функционал
Также вы можете запустить командную строку и через меню «Пуск». Для этого достаточно кликнуть правой кнопкой мыши по пуску и выбрать «Командная строка» либо «Windows PowerShell». Тут же можно открыть программу от имени администратора.
Давайте теперь попробуем воспользоваться командной строкой на примере очень простой команды: control. Она позволяет запускать панель управления на компьютере.
Чтобы использовать команду, необходимо ввести нужное слово или набор слов и символов, а затем нажать на кнопку «Enter»
С вводом команд разобрались, теперь можно приступить к просмотру основных команд. Начнем мы с тех, которые предназначены для быстрого запуска стандартных программ.
Запуск основных программ и утилит системы
Нижеуказанный список не всем будет полезен, но там есть команды, без которых пользователю не обойтись. Например, обратите внимание на такие команды как dxdiag и regedit. С помощью них запускаются важные утилиты, которые просто так вы не сможете найти в операционной системе.
- appwiz.cpl – утилита «Программы и компоненты»
- certmgr.msc – окно для управления сертификатами системы
- control – «Панель управления»
- control printers – окно для управления устройствами и принтерами
- control userpasswords2 – «Учетные записи пользователя»
- compmgmt.msc – «Управление компьютером»
- devmgmt.msc – «Диспетчер устройств»
- dfrgui – «Оптимизация дисков»
- diskmgmt.msc – «Управление дисками»
- dxdiag – запуск средства диагностики DirectX
- hdwwiz.cpl – еще одна команда для вызова окна «Диспетчер устройств»
- firewall.cpl – Брандмауэр Защитника Windows
- gpedit.msc – «Редактор локальной групповой политики»
- lusrmgr.msc – «Локальные пользователи и группы»
- mblctr – «Центр мобильности»
- mmc – консоль управления системными оснастками
- msconfig – «Конфигурация системы»
- odbcad32 – панель администрирования источника данных ODBC
- perfmon.msc – «Системный монитор», предоставляющий возможность просмотра изменений в производительности компьютера и системы
- presentationsettings – «Параметры режима презентации»
- powershell – PowerShell (та же командная строка, но с большим функционалом)
- powershell_ise – «Интегрированная среда сценариев» оболочки PowerShell
- regedit – «Редактор реестра»
- resmon – «Монитор ресурсов»
- rsop.msc – «Результирующая политика»
- shrpubw – «Мастер создания общих ресурсов»
- secpol.msc – «Локальная политика безопасности»
- services.msc – средство управления службами операционной системы
- taskmgr – «Диспетчер задач»
- taskschd.msc – «Планировщик заданий»
Управление и настройка операционной системы
В данном разделе будет рассказано о командах, с помощью которых можно выполнять различные действия в операционной системе.
- сomputerdefaults – определение параметров программ по умолчанию
- control admintools – открытие папки со средствами администрирования
- date – отображение и изменение текущей даты в командной строке
- displayswitch – изменение подключенных экранов
- dpiscaling – параметры дисплея
- eventvwr.msc – просмотр журнала событий
- fsmgmt.msc – средство работы с общими папками
- fsquirt – отправка и прием файлов по Bluetooth
- intl.cpl – региональные настройки
- joy.cpl – настройка внешних игровых устройств
- logoff – выход из системы
- lpksetup – установка и удаление языков интерфейса
- mobsync – запуск окна «Центр синхронизации»
- msdt – официальное средство диагностики службы поддержки Microsoft
- msra – вызов утилиты «Удаленный помощник Windows»
- msinfo32 – просмотр сведений об операционной системе
- mstsc – подключение к удаленному Рабочему столу
- napclcfg.msc – настройка конфигурации операционной системы
- netplwiz – панель управления «Учетными записями пользователей»
- optionalfeatures – включение и отключение стандартных компонентов операционной системы
- shutdown – завершение работы компьютера
- sigverif – средство проверки подлинности файлов
- sndvol – запуск микшера громкости
- slui – средство активации лицензии ОС Windows
- sysdm.cpl – вызов окна «Свойства системы»
- systempropertiesperformance – «Параметры быстродействия»
- systempropertiesdataexecutionprevention – запуск службы DEP, компонента «Параметров быстродействия» ОС
- timedate.cpl – изменение даты и времени
- tpm.msc – «Управление доверенным платформенным модулем TPM на локальном компьютере»
- useraccountcontrolsettings – «Параметры управления учетными записями пользователей»
- utilman – управление «Специальными возможностями» в разделе «Параметров» операционной системы
- ver – показывает сведения о текущей версии ОС Windows.
- wf.msc – активация режима повышенной безопасности в стандартном Брандмауэре ОС Windows
- winver – просмотр общих сведений об операционной системе и ее версии
- WMIwscui.cpl – переход к Центру поддержки операционной системы
- wscript – «Параметры сервера сценария» ОС Windows
- wusa – «Автономный установщик обновлений Windows»
Настройки периферийных устройств
Есть также и немного команд, предназначенных для вызова стандартных программ и элементов управления оборудования, подключенного к компьютеру или ноутбуку.
- main.cpl – настройка мыши
- mmsys.cpl – панель настройки звука
- printui – «Пользовательский интерфейс принтера»
- printbrmui – средство переноса принтера, предоставляющее возможность экспорта и импорта программных компонентов и драйверов оборудования
- printmanagement.msc – «Управление печатью»
- sysedit – редактирование системных файлов с расширениями INI и SYS (Boot.ini, Config.sys, Win.ini и др.)
- tabcal – средство калибровки дигитайзера
- tabletpc.cpl – просмотр и настройка свойств планшета и пера
- verifier – «Диспетчер проверки драйверов»
- wfs – «Факсы и сканирование»
- wmimgmt.msc – вызов «Элемента управления WMI» стандартной консоли
Работа с файлами и подключенными накопителями
Нижеуказанные команды предназначены для работы с файлами, папками, дисковыми устройствами и накопителями. Некоторые из них работают только внутри предварительно вызванных консольных утилит. Для получения более подробных сведений по ним вы всегда можете обратиться к справке, воспользовавшись командой help.
Вводим help и нажимаем на клавишу «Enter»
- assoc — выводит и позволяет изменять связь между расширениями имени и типов того или иного пакетного файла
- attrib – редактирование атрибутов предварительно обозначенного файла или папки
- bcdboot – создание и/или восстановление системного раздела
- cd – просмотр наименования текущей папки или переход в другую
- chdir – просмотр папки или переход к другой
- chkdsk – проверка жестких и твердотельных дисков, а также подключенных к ПК внешних накопителей
- cleanmgr – инструмент «Очистка диска»
- convert – преобразование файловой системы тома
- copy – копирование файлов (с указанием конечного каталога)
- del – удаление выбранных файлов
- dir – просмотр файлов и папок по указанному пути
- diskcopm – позволит сравнить содержимое двух гибких дисков
- dickcopy – полностью скопирует содержимое одного гибкого диска на любой другой (пакетное копирование)
- diskpart – консольная утилита для работы с дисками (открывается в отдельном окне «Командной строки», для просмотра поддерживаемых команд обратитесь к справке – help)
erase – удаление одного или нескольких файлов - fc – сравнение файлов и поиск различий
- format – форматирование локальных дисков Windows
- label – удаление, изменение, а также создание меток тома для дисков
- md – создание новой папки
- mdsched – проверка оперативной памяти
- move – перемещение файлов по заданному пути
- ntmsmgr.msc – средство работы с внешними накопителями
- recdisc – создание диска восстановления операционной системы (работает только с оптическими накопителями)
- recover – восстановление данных
- rekeywiz – инструмент для шифрования данных («Шифрующая файловая система (EFS)»)
- RSoPrstrui – Настройка средства «Восстановление системы»
- sdclt – «Резервное копирование и восстановление»
- sfc /scannow – проверка целостности системных файлов с возможностью их восстановления
- tree – графическое отображение структуры каталогов диска или папки
- verify – анализ правильности записи файлов на диск
- vol – отображает собственную метку и серийный номер тома для диска
Работа внутри командной строки
Если вы захотите изменить цвет, почистить содержимое командной строки или воспользоваться внутренними настройками, то вы также можете использовать команды. Например, если вписать команду color и выбрать специальное кодовое слово, то изменится весь фон и цвет текста командной строки.
Команда color fc придает утилите бледно-розовый оттенок
- cls – очистка содержимого экрана командной строки
- color – изменение фона и цвета
- exit – выход из командной строки
- help – отображение полного списка команд командной строки
- prompt – изменяет слева от вводимого текста название на любое другое
Теперь вместо <C:UsersИлья> будет отображаться слово «hello»
Сеть и интернет
Немного команд для настройки сети и интернета:
- control netconnections – просмотр и настройка доступных «Сетевых подключений»
- inetcpl.cpl – переход к свойствам интернета
- NAPncpa.cpl – аналог первой команды, предоставляющий возможность настройки сетевых подключений
- telephon.cpl – настройка модемного подключения к интернету
Заключение
Подытожив, хочется сказать, что не нужно запоминать какую-либо команду дословно. Ознакомления с ними более чем достаточно. Ну а если вам понадобится воспользоваться какой-либо функцией на компьютере с Windows 10, то вспомните про командную строку и посмотрите вышеперечисленные команды – уверен, вы найдете то, что нужно. Если же вы хотите более обширно изучить командную строку, то рекомендую почитать профессиональную литературу, которую легко найти в Интернете.
Post Views: 18 944
Бывает, что некоторые команды Windows cmd сложно вспомнить, и сохранение их на компьютере или на бумаге в качестве шпаргалки является хорошей практикой. Этот список не является полным, но он содержит наиболее часто используемые команды. Не стесняйтесь добавить свои наиболее часто используемые команды в комментариях ниже, а так же поделиться этим списком.
Управление файлами и папками
- COPY — Копирование файлов в другое место
- DIR — Отображение файлов и папок в текущем каталоге
- DEL или ERASE — Удаление файлов
- EDIT — Запуск редактора файлов
- CD — Изменить каталог
- EXPAND — Распаковать сжатые файлы
- FC — Сравнивает файлы и показывает различия между ними
- FIND — Найти текстовую строку в файле
- MD или MAKEDIR — Создать папку
- MOVE — Переместить файлы из одной папки в другую
- PRINT – отобразить содержимое текстового файла
- RD или RMDIR — удалить папку
- REN или RENAME — переименовать файл или папку
- REPLACE — Замена файлов в одном каталоге на файлы с тем же именем в другом каталоге
- ROBOCOPY — Использует программу робокопи для копирования файлов и каталогов
- TREE — Показывает структуру каталогов диска или папки
- TYPE — Отображает содержимое текстовых файлов
- OPENFILES — Управление открытыми локальными или сетевыми файлами
- XCOPY — Копирование файлов и деревьев каталогов
Приложения и процессы
- SCHTASKS – Запланированный запуск приложения приложения (планировщик задач)
- SHUTDOWN — Выключение или перезагрузка компьютера
- TASKLIST — Список выполняемых задач
- TASKKILL — Остановить или прекратить выполнение задачи (для остановки задачи используется PID, который можно узнать из TASKLIST).
- REG — Запустить редактор реестра
- RUNAS — Запуск задачи от имени другого пользователя
Управление дисками
- CHKDISK — Проверяет диск и показывает статистику
- DEFRAG — Запуск дефрагментации диска
- CHKNTFS — Отображает или изменяет выполнение проверки диска при загрузке
- COMPACT — Отображает и изменяет сжатие файлов в разделах NTFS
- CONVERT — преобразование дискового тома FAT в NTFS
- DISKPART — Отображение и настройка свойств разделов диска
- FORMAT — Форматирование диска
- FSUTIL — Отображение и настройка свойств файловой системы
- LABEL — Создание, изменение или удаление метки тома диска
- RECOVER — Восстановление данных с поврежденного или испорченного диска
- VOL — Отображение метки тома и серийного номера диска
Системная информация
- DATE — Выводит или устанавливает текущую дату
- TIME — Выводит или устанавливает системное время
- DRIVERQUERY — Отображает текущее состояние и свойства драйвера устройства
- HOSTNAME — Отображает имя компьютера
- SYSTEMINFO — Отображает информацию о конфигурации компьютера
- VER — Позволяет просмотреть версию Windows
- GPRESULT — Отображает текущие примененные групповые политики (RSoP)
- GPUPDATE — Обновление групповых политик
Сеть
- IPCONFIG — Отображает информацию о сетевых интерфейсах
- PING — Отправляет ICMP-запросы на целевой хост, проверяет его доступность
- TRACERT – Отображение пути пакетов в сети
- NSLOOKUP — Поиск IP-адреса по имени ресурса
- ROUTE — Отображает таблицы сетевых маршрутов
- ARP — Показывает таблицу с IP-адресами, преобразованными в физические адреса
- NETSH — Запускает программу управления сетевыми настройками
- GETMAC — Показывает MAC-адрес сетевого адаптера
- TFTP — Запускает TFTP-клиент в консоли
Настройка командной строки
- CLS — Очистить экран
- CMD — Отображает другую командную строку
- COLOR — Устанавливает цвет текста и фона в консоли
- PROMPT – Изменение начального текста командной строки
- TITLE — Присвоение заголовка для текущего сеанса
- HELP — Запуск справки CMD
- EXIT — Выход из командной строки
Аverage rating : 4
Оценок: 2
191028
Санкт-Петербург
Литейный пр., д. 26, Лит. А
+7 (812) 403-06-99
700
300
ООО «ИТГЛОБАЛКОМ ЛАБС»
191028
Санкт-Петербург
Литейный пр., д. 26, Лит. А
+7 (812) 403-06-99
700
300
ООО «ИТГЛОБАЛКОМ ЛАБС»
700
300