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

With an interface as attractive as Windows 10’s, it is easy to forget that the OS comes with a command line interface as well. You might have forgotten about Command Prompt, but Microsoft hasn’t, and it has brought some handy improvements to Command Prompt with Windows 10 and Windows 11. While it’s not as powerful as its Unix counterpart, there are many Command Prompt tricks that can make it a helpful tool to have. A lot of things that the Command Prompt (also known as CMD) can let you do are not even available in the GUI of the Windows OS, so it’s something you should be using. In this article, we have listed 20+ Command Prompt tricks that you should know in 2024.

If you’re new to Windows, we suggest glancing at our Windows 10 beginner tips article to get a better idea about how the OS works and its features. Now, let’s dive in and check out what you can do with Command Prompt.

1. Encrypt Files Using Command Prompt

One of the most useful things that you can do using the Command Prompt, is encrypting your sensitive data. Encryption is a way to prevent others from taking a peek at your data, and it’s a really important part of ensuring (to some extent, at least), that your files are only yours. With this simple Command Prompt trick, you can easily encrypt files on your Windows PC.

  • Launch the Command Prompt, and change your working directory to the folder where your files are. This can be done by using the “cd” command.
  • Once you’re done, type “Cipher /E“, and hit Enter. This will encrypt all the files that were inside the folder.
Command Prompt Tricks

Note: If you try and open these encrypted files, they will open normally for you, however, any other user will not be able to view the files, unless they log in using your account. So make sure that you have a password set.

2. Change the Color of the Command Prompt Window

The Command Prompt window can be unexciting with the default black background and light gray text color. But Windows does allow you to change these colors to suit yourself and make things a bit more intriguing.

  • Launch CMD and Right-click on the title bar
  • Click on “Properties” and in the separate window that opens, click on “Colors”`
  • Here you can choose the colors for the screen text or background as well as for the popup text and background, and also change the transparency of the CMD window
  • After you’re done choosing the most fitting colors for your personality, Click OK

Note: There are a lot of other colors available, and you can check out the entire list by typing help color.

Command Prompt Tricks

3. Change the Prompt Text in Command Prompt

When you first open Command Prompt, the default text of the prompt is very boring. It does reflect the current working directory that the user is in, but it sure could use some customization. If you would like the prompt in your cmd window to say something other than the default, you can use the following trick.

  • Launch Command Prompt, and type “prompt” followed by the text that you want. Make sure you add “$G” to the end, to ensure that there is always the “>” sign at the end of the prompt, and you know where your command begins at.
Command Prompt Tricks

  • Hit Enter, and you will see the prompt in the cmd window change to your custom text.
Command Prompt Tricks

Note: There are some more options like “$G” available, and you check out the entire list by typing “help prompt“. Also, you can reset the prompt back to its original state by typing “prompt” and hitting Enter.

4. Change the Title of the Command Prompt Window

When you launch Command Prompt, you must have seen that the title bar reads “Command Prompt”, or maybe “Administrator Command Prompt”, if you launch it with Administrator privileges. While that is okay, but if you have a lot of cmd windows open, and each of them are working on a different task, then this “Command Prompt” title is not helpful at all. Fortunately, you can change that too.

  • Open Command Prompt, and type “title”, followed by the text that you want the Title bar to read.
command prompt tricks

  • Hit Enter, and you will see the Title of the cmd window change to the text that you entered.
command prompt tricks

Note: The title changes back to “Command Prompt” once you quit cmd and relaunch it. 

5. List Every Driver Installed on Your Windows 10 PC

If you’re trying to troubleshoot an issue or merely looking for a list of all the drivers on Windows 10/11, there’s a command prompt trick you can use. Follow the steps below to see the list of drivers:

  • Type in driverquery /FO list /v in CMD, and you will see a list of drivers on your screen.
cmd tricks driver list

  • If you want, you can also copy this output into a text file for easy viewing later. Use this command to save the drivers list to a document:
driverquery > C:\Users\YourUsername\Desktop\driver.txt

6. F1 to F9 Keys are Shortcuts in CMD

All the function keys on your keyboard are also shortcuts for various Command Prompt functions. Here’s what each function key on your keyboard does in CMD:

  • F1: Tap or hold this key to retype your last command letter by letter.
  • F2: Copies the current command up to a specified character.
  • F3: Retypes the entire previous line
  • F4: Auto-deletes the current command up to a specified character.
  • F5: Similar to F3, but lets you cycle through previous commands.
  • F6: Enters the EOF indicator into CMD.
  • F7: Opens a list of previously entered commands.
  • F8: Similar to F5, but doesn’t stop at the end of your command history in the session. Instead, it goes all the way to the start.
  • F9: Enters a previous command by entering a number associated with that line.

7. Hide Folders using Command Prompt

While there is an easy way to hide folders on Windows by using the properties pane of the folder and checking the checkbox that says “Hidden”, the method is not very useful as the folders hidden using this method can easily be viewed if the view options are changed to “Show hidden files and folders”, making it a pretty useless feature. However, just like you can hide folders using Terminal on Mac, using this cmd trick, you can hide your folders in such a way that they will be completely hidden, and Explorer won’t be able to display them at all. Simply follow the steps outlined below:

  • Launch Command Prompt, and navigate to the directory where your target folder resides.
  • Type “Attrib +h +s +r folder_name“, replacing the “folder_name” with the name of the folder that you want to hide, and press Enter.
Command Prompt Tricks

  • You can now check that the folder is indeed hidden inside Windows Explorer and can not be seen by anyone.
  • To unhide the folder, you can use the command “Attrib -h -s -r folder_name“.
Command Prompt Tricks

Note: Hidden folders can be viewed using the cmd command “dir /AH”.

8. Copy Command Output to Clipboard

If you have ever tried to copy stuff off the Command Prompt, you must have realized that it is exceedingly difficult, not to mention un-intuitive. However, with this simple trick you can copy the output of any command that you want, directly to your computer’s clipboard, and you can then paste it into any text editor that you want.

  • Launch Command Prompt and type the command that you want to copy the output for, followed by “| clip“. For example, I’m using the command “ipconfig | clip“. Hit Enter, and you will see that the cmd window shows no output.
Command Prompt Tricks

  • Open a text editor, such as Notepad, and press Control + V, and you can simply paste the output of the command directly inside Notepad.
Command Prompt Tricks

9. List all Installed Programs

Another cool trick on the Command Prompt involves listing out all of the Windows 10 apps and programs that are installed on your PC. This is particularly helpful if you need to uninstall a program using the Command Prompt. To list out all the installed programs, simply follow the steps outlined below:

  • Launch Command Prompt, and type “wmic product get name“.
  • Hit Enter, and you will see a list of all the programs that are installed on your PC.
Command Prompt Tricks

You can also use wmic to uninstall programs, directly from the cmd window. Simply type “wmic product where “name like ‘%NAMEOFAPP%’” call uninstall /nointeractive” and hit Enter. Obviously, replace “NAMEOFAPP” with the name of the app that you want to uninstall from your PC.

10. Open CMD Window Inside a Directory

Let’s face it, the way Windows handles changing directories using the “cd” command is rather weird. Fortunately, there is a simple way to open Command Prompt windows inside a directory so you don’t have to change directories. This is a really handy trick, especially if the folders you want to access are buried deep inside the filesystem. To open a cmd window inside a directory, just follow the steps below:

  • Open the directory in Windows Explorer. In the address bar, type “cmd”, and hit Enter.
Command Prompt Tricks directory

  • A command window will open inside the directory you had opened in Windows Explorer.
command prompt tricks

11. Generate Battery Health Report

Windows 10 lets you track vital stats related to the battery’s health by maintaining data related to the battery. This includes stats like factory specifications, full battery capacity, and the current capacity and these are updated with each session. You can generate a report about these stats by using a CMD command, which can be executed as follows:

  • Launch Command Prompt as an Administrator or change directory using cd C:\Windows\System32
  • Enter command powercfg/energy
  • The system will take 60 seconds to analyze and then generate a report in form of an HTML documents
Command Prompt Tricks battery

  • To access the report, you can head to this location on your Windows 10 computer:
 C:\Windows\system32\energy-report.html
Command Prompt Tricks

As you can see in our laptop’s case, the battery’s capacity has dropped to 82% to what it was shipped with. If you want a step-by-step direction for generating battery health on Windows, click on the link to read the article.

12. Hide Sensitive RAR Files in Images

CMD facilitates a command which lets you concatenate or fuse two files into a single file. While this command comes in handy in merging the contents of basic file types such as TXT or CSV, you can also use the command to hide a RAR, ZIP, or another archived file inside an image or text file. To achieve this, follow these steps:

  • Open CMD in the directory which contains both files using the 10th item in this list or use the cd command to change the directory
  • Use command copy /b <RAR_filename>.rar + <image_filename>.<extension> <result_filename>.<extension>.
  • In our case, we used copy /b modules.rar+wave.png test2.png 
Command Prompt Tricks copy/b

Note: make sure you enter the RAR file first followed by the other file, else you won’t be able to recover the RAR package. The method also works on most common file types including documents and PDFs as long as you add the archive file first.

  • This will generate the result file, which in our case is test2.png

This PNG file displays as a normal image file but when you open it with WinRAR or any other extraction tool, it will extract the RAR file which is buried under the image file. This is a good way of saving your sensitive files from curious friends or co-workers or even prevent them from being misused even in case of a data breach.

13. Abort Command Execution

This is one of the best Command Prompt tricks and everyone should know about it. Say, you want to run a specific command but accidentally execute a different command. In that case, to quickly stop the command execution, simply press “Ctrl +C” together and the operation will be aborted instantly.

13. Abort Command Execution

14. Always Run Command Prompt as Administrator

For users who deal with system files and applications know that they always need elevated privileges to tweak and move around things. But on the other hand, Command Prompt always defaults to the normal account which makes it harder for users to gain Administrator access in the middle of an operation. So to save yourself from such situations, you can change the behavior permanently and run Command Prompt with Administrator privilege always.

  • Just search for “cmd” in the Start menu and right-click on it. After that, open its file location.
  • Now copy the Command Prompt shortcut to your desktop.
  • Move to desktop and right-click on the shortcut and open “Properties”.
  • Here, click on Advanced and enable “Run as administrator”.
  • Now onwards, open CMD from the desktop shortcut and it will always start with the Administrator privilege.
14. Always Run Command Prompt as Administrator

15. SFC /Scannow

SFC (System File Checker) is a relatively new addition to Command Prompt to keep your computer clean and bug-free. It’s a handy command-line tool that will help you fix many system issues. Just run sfc /scannow on Command Prompt and it will start verifying the integrity of all protected system files. Further, it will also repair the damaged files wherever possible. So in the future, if you face any issue, make sure to run this command on your Windows computer.

15. SFC /Scannow

16. Find Information About Commands

Sometimes we run a command to achieve a certain task, but don’t know much about it. So to learn about specific commands, add /? at the end of any command, and hit enter. Command Prompt will give you a good overview of its usage and syntax. Take an example of SFC from the above point, type sfc /? and hit enter. It will tell you the sub-commands with examples, and what are the other commands related to SFC in a lucid language. This command is similar to the “man” command in Linux.

16. Find Information About Commands

17. Command Line History

Many users are aware of the ‘UP’ navigation key to move forth and back between commands, but circling back to previous commands that were executed way back is difficult. However, there is the doskey /history command to check all your executed commands in a chronological list. The con is you can’t select the commands and execute them instantly and will have to type it out manually, which is not the best solution.

As a result, if you want to quickly navigate through all your past commands with the ability to execute them immediately, just press the F7 key. You will get a separate window where you can choose a command and execute it then and there. It’s one of the best Command Prompt tricks. Keep in mind, some users need to press the “Fn” key along with F7 to trigger this action.

17. Command Line History

18. Delete Temp Files to Clear Space

If you’re running low on space and urgently need to clear some trash out, getting rid of temporary files on your PC might be the swiftest action plan. Here’s what you can do to clean out temp files from your PC and regain a considerable amount of space.

  • Use the command del /q /f /s %temp%\*
cmd tricks delete temp files 1

  • Use the command del /s /q C:\Windows\temp\* (requires admin privileges)
  • You can also use both the commands in one go by typing del /q /f /s %temp%\* && del /s /q C:\Windows\temp\*
cmd tricks delete temp files 2

19. Play an RPG Game in Command Prompt

Do you like playing role-playing games? If so, you should definitely check out Ateraan, which is a text-only role-playing game that works inside the command prompt on your Windows PC.

  • Type the command telnet ateraan.com 4002 into CMD and press enter. That will launch the game, and you can create your character and start your journey. GLHF!
play rpg games cmd

20. Move to Windows Terminal

Command Prompt is one of the oldest Windows programs, but recently Microsoft announced a universal command-line tool for Windows that integrrated Powershell, WSL, and Command Prompt at once place; The program’s called the Windows Terminal. One of the advantages of running Command Prompt in Windows Terminla is you get the ability to run multiple tabs to execute multiple commands in the same Window. If you’re wondering how to try out the new Windows Terminal, refer to our guide on the same.

18. Move to Windows Terminal

21. View a Directory’s Structure

Using the dir command to get an idea about the structure of a directory could be a hard affair since the command isn’t very presentable. Hence, if you want to look at a directory’s structure in a more neat and precise way, use the tree command. Here’s how the command looks.

tree
Tree command Windows command prompt tricks

The command will show you the structure of your default directory “C:” If you want to check the structure of other drives, use the drive letter followd by a colon after typing the command.

tree A:

Командная строка (CMD) — это мощный инструмент, который может быть не только полезным, но и источником веселья. Вот подборка приколов и забавных команд для CMD, которые можно использовать как для развлечения, так и для легкой шутки с друзьями. Команды можно заранее записать в BAT-файл и подкинуть другу.

1. «Спам-окна»

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

@echo off
:loop
start cmd
goto loop

Как это работает: Создается бесконечный цикл, который запускает новые окна CMD снова и снова.

Предупреждение: Чтобы остановить процесс, нужно нажать «Ctrl+Alt+Del» и завершить работу всех экземпляров CMD.


2. «Случайные символы»

Запускает рандомные символы на экране CMD, создавая эффект «матрицы».

@echo off
color 0a
:start
echo %random% %random% %random% %random%
goto start

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

Интересно: Можно изменить цвет текста с помощью команды «color».


3. «Бесконечный прогресс»

Отображает фейковый процесс выполнения задачи, который никогда не завершится.

@echo off
:progress
echo LOADING... %random%%%
ping localhost -n 2 > nul
goto progress

Как это работает: Выводит случайный процент загрузки, имитируя процесс работы программы.

Эффект: Создает иллюзию того, что что-то происходит.  


4. «Горячие клавиши»

Можно «сломать» горячие клавиши Windows, чтобы пользователь не мог их использовать.

@echo off
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoWinKeys /t REG_DWORD /d 1 /f

Как это работает: Отключает комбинации клавиш, такие как «Win+E», «Win+D» и другие.

Обратно: Чтобы вернуть функциональность, используйте следующую команду:

@echo off
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoWinKeys /f

5. «Фейковое отключение»

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

@echo off
shutdown -s -t 30
timeout /t 5 >nul
shutdown -a
echo Ваш компьютер был спасен!
pause

Как это работает: Имитирует отключение через 30 секунд, но затем отменяет его и выводит сообщение о спасении.

Реакция: Друзья будут в шоке!


6. «Мышь-бегемот»

Заставляет курсор мыши двигаться хаотично по экрану.

@echo off
:start
set /a x=%random% %% 1920
set /a y=%random% %% 1080
powershell.exe -w hidden "$wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('^{ESC}'); [System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point(%x%, %y%)"
goto start

Как это работает: Использует PowerShell для перемещения курсора в случайные координаты.

Предупреждение: Может быть немного раздражающим.


7. «Очистка диска»

Имитирует очистку всего диска C:, хотя на самом деле ничего не удаляется.

@echo off
echo Очищаю диск C:...
ping localhost -n 3 >nul
echo Файл system32 удален...
ping localhost -n 3 >nul
echo Файл bootmgr удален...
ping localhost -n 3 >nul
echo Ваш компьютер больше не работает!
pause

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

Реакция: Очень смешная для тех, кто поверит.


Бонус: «Удаление Windows»

Эта команда — классическая шутка, которая заставляет друзей нервничать.

@echo off
del C:\Windows\system32

Как это работает: На самом деле эта команда не сработает, потому что системные файлы защищены. Однако если ваш друг не знает об этом, он может сильно перепугаться.


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

Unlocking the lighter side of the command line, here are some funny CMD commands that showcase creativity while adding a bit of humor to your coding experience.

echo "I'm smarter than your average computer!"

What Are CMD Commands?

CMD commands refer to the commands one can execute in the Command Prompt (CMD) on Windows operating systems. CMD allows users to perform various tasks, from file management to network configurations, using text-based commands. This versatile tool opens gateways to numerous functionalities, enabling users to do much more than just point-and-click.

Understanding CMD commands is essential for anyone interested in technology, programming, or system administration. By diving deeper into CMD, users unlock powerful tools to automate tasks, troubleshoot issues, and even entertain themselves.

Helpful Cmd Commands to Enhance Your Skills

Helpful Cmd Commands to Enhance Your Skills

What Makes CMD Commands Funny?

The humor in CMD commands stems from the unexpected and often absurd outcomes they can generate. Users can craft commands or scripts that evoke laughter, surprise, or confusion, creating light-hearted moments in what is typically a serious environment. Embracing creativity in technology can serve not only to entertain but also to deepen one’s understanding of command syntax.

Classic Pranks Using CMD

Creating a Fake Error Message

One classic prank involves displaying a fictitious error message, which can momentarily confuse your friends. Here’s how to do it:

msg * "This computer has performed an illegal operation"

When executed, this command sends a message across the screen, imitating an alert. It’s harmless but delivers a quick shock, illustrating how CMD can be used for jest. Always use this responsibly and ensure it’s all in good fun!

Matrix Effect with CMD

Who doesn’t want their computer to feel like it’s straight out of The Matrix? With this simple command, you can create a cascading green text effect:

color 0a
:a
echo %random%%random%%random%%random%
goto a

This command changes the color of your CMD window while generating random numbers continuously. It’s visually engaging and superbly geeky!

Fun Things to Do with CMD

ASCII Art in CMD

Creating ASCII art can amplify the fun factor! Users can draw simple images using text characters. For example, a simple smiley face can be created with:

echo (•‿•)

This basic form of ASCII art utilizes characters, often invoking nostalgia and creativity. You can expand this by experimenting with different characters for more complex designs.

Dog Pile: A Custom Command Script

Creating humorous scripts can also add to the fun. A playful command could be:

echo "You are being dog piled!" 
pause

This creates an interactive experience when a friend runs the script, invoking confusion or laughter as they try to understand what’s happening.

Cool Commands to Entertain

Playing a Simple CMD Game

You can even create a text-based adventure game right in CMD! Here’s a mini example:

@echo off
echo You are in a dark room. Do you go left or right?
set /p choice=Enter your choice:
if "%choice%"=="left" echo You found a treasure chest! 
if "%choice%"=="right" echo You encountered a dragon!
pause

This command introduces basic game mechanics, engaging users in a light-hearted adventure. You can expand on the storyline or add more choices for deeper interaction!

Rain Effect

Bring a little flair to your workspace with a simple rainfall effect using this command:

@echo off
:start
echo * 
timeout /t 1 > nul
goto start

This command generates a steady stream of asterisks, mimicking raindrops. It can be mesmerizing and a change from the monotony of conventional screens.

CMD Codes for Fun

Using ‘telnet’ for Fun

For those adventurous souls, the command:

telnet towel.blinkenlights.nl

transports users to a text-based rendition of Star Wars. Simply enable Telnet in your Windows features if you haven’t already, and immerse yourself in an ASCII representation of the famous space opera, which is sure to elicit laughs and nostalgia.

Color Customization

Playing around with color codes can also brighten up your CMD experience. Change the CMD window’s color using:

color [code]

Here, replace `[code]` with letters or numbers corresponding to different colors (e.g., ‘0’ for black, ‘a’ for green). Mixing various colors can create a dazzling display that can delight users or serve as a hilarious visual presentation.

Interesting Commands in CMD

Network Information Class Clown

You can also utilize network commands for humorous effects. Try:

net send * "Welcome to the command prompt, enjoy your stay!"

This command sends a message to all users in a local network, ideal for joking around with colleagues. However, ensuring you have permission to use this command is crucial for maintaining a friendly atmosphere.

Generating a Random Password

For practical humor, use the following script to generate a random password, which may just result in some amusing combinations:

@echo off & setlocal enabledelayedexpansion
set chars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
set password=
for /L %%i in (1,1,10) do set password=!password!!chars:~%random% % chars:~0,1!
echo !password!

Watch friends’ expressions as they receive random, seemingly nonsensical passwords they can use for fun (or safely discard).

Learn Cmd Commands in a Flash: Quick Tips and Tricks

Learn Cmd Commands in a Flash: Quick Tips and Tricks

CMD Hacks for Creative Users

Scripting for Laughs

Taking CMD to the next level by scripting can yield surprising and hilarious results. For instance, craft a batch file that displays random jokes each time executed:

@echo off
set /p input= "Do you want a joke? (yes/no) "
if %input%==yes (
    echo "Why should you never trust stairs? They’re always up to something!"
) else (
    echo "No laughs today, eh?"
)
pause

With this code, users can trigger a simple joke, spreading giggles while familiarizing themselves with batch scripting.

Using CMD for Visual Humor

Combining CMD commands with visual tricks can astonish and entertain. From displaying random images using the `start` command to pulling up local files with amusing labels, the scope for creativity is vast.

For example:

start "FunnyImage" "C:\path\to\funny_image.jpg"

This allows the CMD to bring humor directly to the screen, blending visuals with practical CMD skills.

Unlocking Common Cmd Commands for Quick Mastery

Unlocking Common Cmd Commands for Quick Mastery

Conclusion

Delving into funny CMD commands transforms a powerful tool into a source of amusement and creativity. By exploring these quirky commands, users not only enhance their CMD skills but also discover a unique way to engage with technology on a lighter note. Whether it’s creating pranks, ASCII art, or even a mini-adventure, CMD can be a delightful platform for personal expression and enjoyment.

So go ahead, unleash your creativity, and don’t forget to share your favorite funny CMD commands with friends!

Today, I will share the 100+ best CMD tricks you should know. Command Prompt may seem like an old feature of Windows computers. But it is an extremely powerful tool that your PC has. There are so many programs out there that need you to type down some CMD commands to run it. Then why not be a master at it?

CMD Tricks

Well, just to help you in mastering the CMD, I have shared these command prompt tricks. These tricks will definitely help you to become a CMD ninja at no time. So let’s head into the topic without wasting time.

Must Read: Best IPTV Players for Windows

Contents

  • 1 Best CMD Tricks For Windows 11/10/8/7 PC
    • 1.1 The Ultimate List of Best Command Prompt Tricks
  • 2 Final Words

Best CMD Tricks For Windows 11/10/8/7 PC

1. Getting help

We often feel a need for help with the CMD commands. And performing a Google search for each of those CMD commands can be a pretty hectic task. However, thankfully there is a little CMD trick that will help you to get help for a specific CMD command.

Just add the “ /? ” after the command that you know about and hit enter. Then this command will help you to understand what a specific command does.

2. Check The IP Address Of A Website

This one is one of the best CMD tricks that you can try. There are often when website developers do feel a need to know the IP address of their website.

In such cases, a little CMD command helps a lot. Since checking the IP Address by going to different websites can be challenging. Instead, you can type this command: nslookup website.com

3. Execute Multiple Domains One By One

Want to execute multiple domains one by one? Well, then this command would be pretty handy for you. There are lots of programs that need CMD to get installed on a computer.

So, if you want to run multiple commands at once, relax a bit. Then you can put && between two CMD commands and hit the enter button.

After that, CMD will automatically execute the courses one by one. Plus, you do not have to enter commands again and again. Here is an example of the command: doskey /history&&driverquery

4. Repair the System Files

We all know fact that Windows’s system files often get corrupted. And installing windows, again and again, is a pretty boring task. But thankfully, you can repair system files by running a simple command. This is also one of the best CMD tricks one should know.

Simply type “sfc/scannow” and hit enter, and it will immediately start the scanning and repair process. However, you should open CMD with Administrator rights to execute the code.

5. Function Keys

The function keys are a set of keys on your keyboard that can be used to perform specific tasks in CMD. Here are some of the most useful ones:

  • F1: F1 Key prints the characters one by one of your last-used commands.
  • F2: This command help in pasting the last used command. However, it only works for some specific commands.
  • F3: F3 pastes the last used command and works with every command.
  • F4: F4 helps delete commands, but it works only for some specific commands.
  • F5: F5 Key pastes the last used code without cycling.
  • F6: F6 helps in pasting the ^Z code.
  • F7: F7 key displays all the previously used commands.
  • F8: F8 key pastes all the cycle-able used commands.
  • F9: F9 key lets you paste commands from the list of recently used commands.

6. See PC driver list

Want to know which drivers are installed on your computer? Well, you can use a simple command to learn about it. Simply type down “driverquery” command, and you will get the list of all the installed drivers on your computer.

7. Change the Color of the Command Prompt

Do you know that you can even change the color of your command prompt? Well, for this you have to right-click on the command prompt window. Then go to properties and select a color.

8. Change Font Color

You can also change the font color of your command prompt. For this, you have to use commands like:

  • color 1
  • color 2
  • color 3
  • color 4
  • color 5
    and so on.

9. Command History

Looking for a command that you have previously used but can’t remember now? Well, then try the doskey /history command. This will offer you a list of all the previously used commands.

10. Shut Down the Computer With CMD

You can also shut down, restart, and log off your computer using CMD commands. To do so, here are the commands that you have to use

  • For Shutdown: shutdown -s
  • For Restarting: shutdown -r
  • For Logoff: shutdown -l

11. Create a WiFi Hotspot

You can also take help from CMD to create a wifi hotspot and share the internet with other devices. However, it is a little lengthy process.

  • First of all, you have to enter this command “netsh wlan set hostednetwork mode=allow ssid=HotspotName key=Password” in the CMD.
  • Now enter any name in the ‘HotspotName’ section and enter a password in the ‘Password’ section.
  • Now to start the WiFi hotspot, you have to type the “netsh wlan start hostednetwork” command. Also, to switch off the WiFi hotspot, you must use the “netsh wlan stop hostednetwork” command.

The Ultimate List of Best Command Prompt Tricks

Apart from these commands, many of the best CMD tricks are available. You can learn more about them by going through this list.

1. Character Map – charmap

2. Bluetooth Transfer Wizard – fsquirt

3. Calculator – calc

4. Accessibility Wizard – accwiz

5. Administrative Tools – control admintools

6. Automatic Updates – wuaucpl.cpl

7. Add/Remove Programs – appwiz.cpl

8. Add Hardware Wizard – hdwwiz.cpl

9. Certificate Manager – certmgr.msc

10. Check Disk Utility – chkdsk

11. Clipboard Viewer – clipbrd

12. Control Panel – control

13. Component Services – dcomcnfg

14. Computer Management – compmgmt.msc

15. DDE Shares – ddeshare

16. Command Prompt – cmd

17. Date and Time Properties – timedate.cpl

18. Device Manager – devmgmt.msc

19. Direct X Troubleshooter – dxdiag

20. Disk Cleanup Utility – cleanmgr

21. Disk Defragment – dfrg.msc

22. Disk Management – diskmgmt.msc

23. Disk Partition Manager – diskpart

24. Display Properties – control desktop

25. Display Properties – desk.cpl

26. Dr. Watson System Troubleshooting Utility – drwtsn32

27. Driver Verifier Utility – verifier

28. Event Viewer – eventvwr.msc

29. Files and Settings Transfer Tool – migwiz

30. File Signature Verification Tool – sigverif

31. Findfast – findfast.cpl

32. Firefox – firefox

33. Folders Properties – control folders

34. Fonts – control fonts

35. Fonts Folder – fonts

36. Free Cell Card Game – freecell

37. Game Controllers – joy.cpl | Best CMD Commands 2017

38. Group Policy Editor (for xp professional) – gpedit.msc

39. Hearts Card Game – mshearts

40. Help and Support – helpctr

41. HyperTerminal – hypertrm

42. Iexpress Wizard – iexpress

43. Indexing Service – ciadv.msc

44. Internet Connection Wizard – icwconn1

45. Internet Explorer – iexplore

46. Internet Properties – inetcpl.cpl

47. Keyboard Properties – control keyboard

48. Local Security Settings – secpol.msc

49. Local Users and Groups – lusrmgr.msc

50. Logs You Out Of Windows – logoff

51. Malicious Software Removal Tool – mrt

52. Microsoft Chat – winchat

53. Microsoft Movie Maker – moviemk

54. Microsoft Paint – mspaint

55 Microsoft Syncronization Tool – mobsync

56. Minesweeper Game – winmine

57. Mouse Properties – control mouse

58. Mouse Properties – main.cpl

59. Netmeeting – conf

60. Network Connections – control netconnections

61. Network Connections – ncpa.cpl

62. Network Setup Wizard – netsetup.cpl

63. Notepad – notepad

64. Object Packager – packager

65. ODBC Data Source Administrator – odbccp32.cpl

66. On Screen Keyboard – osk

67. Outlook Express – msimn

68. Paint – pbrush

69. Password Properties – password.cpl

70. Performance Monitor – perfmon.msc

71. Performance Monitor – perfmon

72. Phone and Modem Options – telephon.cpl

73. Phone Dialer – dialer

74. Pinball Game – pinball

75. Power Configuration – powercfg.cpl

76. Printers and Faxes – control printers

77. Printers Folder – printers

78. Regional Settings – intl.cpl

79 Registry Editor – regedit

80. Registry Editor – regedit32

81. Remote Access Phonebook – rasphone

82. Remote Desktop – mstsc

83. Removable Storage – ntmsmgr.msc

84. Removable Storage Operator Requests – ntmsoprq.msc

85. Resultant Set of Policy (for xp professional) – rsop.msc

86. Scanners and Cameras – sticpl.cpl

87. Scheduled Tasks – control schedtasks

88. Security Center – wscui.cpl

89. Services – services.msc

90. Shared Folders – fsmgmt.msc

91. Shuts Down Windows – shutdown

92. Sounds and Audio – mmsys.cpl

93. Spider Solitare Card Game – spider

94. SQL Client Configuration – cliconfg

95. System Configuration Editor – sysedit

96. System Configuration Utility – msconfig

97. System Information – msinfo32

98. System Properties – sysdm.cpl

99. Task Manager – taskmgr

100. TCP Tester – tcptest

101. Telnet Client – telnet

102. User Account Management – nusrmgr.cpl

103. Utility Manager – utilman

104. Windows Address Book – wab

105. Windows Address Book Import Utility – wabmig

106. Windows Explorer – explorer.

107. Managing the Boot Configuration Data – bcdedit

108. Editing Boot Settings – bootcfg

109. Encrypting or Decrypting Files/folders – cipher

110. Clearing the screen – cls

111. Managing stored usernames/passwords – cmdkey

112. Changing CMD Color – color

113. Compressing one or more files – compress

114. Converting FAT drives to NTFS – convert

115. Delete files – del

116. Deleting User Profiles – delprof

117. Displaying the list of files and folders – dir

118. Displaying Message On Screen – echo

119. Deleting one or more files – erase

120. Opening the windows Explorer – explorer

121. Formatting a disk – format

122. Knowing file extension – ftype

123. Displaying the Mac Address – getmac

124. Online help – help

125. Displaying the host name – hostname

126. Editing disc label – label

127. Log a user off – logoff

128. Get a log time in a file – logtime

129. Creating .cab files – makecab

130. Creating new folders- md

131. Opening Windows Installer – msiexec

132. Managing the network resources – net

133. Knowing the permissions for a user – perms

134. Testing a network connecting – ping

135. Printing a text file – print

136. Shutdown computer – psshutdown

137. Checking free disk space – freedisk

138. Know the file and volume utilities – fsutil

139. File transfer protocl – ftp

140. Showing the space used in folders – diskuse

141. Deleting a folder and all subfolders – deltree

142. Importing or Exporting Active directory data – csvde

143. Displaying the resultant set of Policy information – gpresult

144. Updating the Group policy settings – gpupdate

145. Replacing the files that are currently in use by the os – inuse

146. Comparing two files – fc

147. Finding a text string in a file – find

148. Finding for a strings in file – findstr

149. Displaying the memory usage – mem

Must Read: Best Firewall for Windows PC

Final Words

So these are some of the best CMD tricks you can try. Undoubtedly, if you use these cmd commands effectively, you will be able to level up your productivity. As well as you will be able to handle your PC easily. Anyway, if you have any questions, please comment below.

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.

Microsoft

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.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как создать установочный диск windows 7 на mac
  • Свойство папки в windows 11 где найти
  • Добавление оснастки active directory в windows 10
  • Установка vscode на windows
  • Как сделать локальную сеть между двумя компьютерами windows 10 через кабель