Best Command Line for Windows

Top 14 Best Command Line for Windows Tips and Tricks

Best Command Line for Windows

The best command line is a place where you can give instructions using words on a computer with Windows. For a long time, Windows has used something called Command Prompt or CMD for this.

But now, Microsoft wants people to use Power Shell instead.

However, there are some good reasons why Microsoft doesn’t want to give up the command line.

One big reason is that Power Shell is made for experts, while the command line is better for people who just want to do basic things.

The easier command line shouldn’t stop you from switching to PowerShell. One big reason is that the best command line for Windows has helpful tricks and tips that can make our work easier.

These tricks are especially useful when you spend a decent amount of time using this Windows feature. In this article, we talk about the top 14 of the best command line for Windows tricks and tips.

Keyboard shortcuts keys of functions

The function keys F1 to F9 on the keyboard do things when you press them. We have a list where we look at all these 9 keys.

F1: When you press this button, the last command you wrote will be rewritten one letter at a time.

F2: It asks you to type a letter, and then it replaces the previous command until it finds the first occurrence of that letter.

For example, if you previously used the command “ping” and you give the letter “g” to this function, it will write the word “pin.”

F3: Changes the last command completely.

F4: Takes a letter from you and removes all commands starting from that letter.

F5: Changes all commands written so far, from the newest to the oldest, but stops when it reaches the first command entered.

F6 is used to type “Z^” on the screen.

F7 shows a list of commands you previously typed.

F8 rewrites all the commands you wrote, starting from the last one and going backward. When it reaches the first command, it starts over again.

F9 takes a number you input and shows the command that matches that number. The numbers are listed in the same order as they appear in the F7 menu.

Viewing the history of commands

If you want to see all the things you did on the command line recently, you can use a special command.

This command will show you a list of all the commands you entered during the current session.

doskey  /history

“Doskey” is a Microsoft tool that does many things. It works like the F7 key, but you can save or change its output. To learn more, read points 7 to 9 in this article.

Repeat the previous commands

If you want to use a command again or change it, you can use the up-arrow key.

This key helps you move through previously entered commands from the latest to the first one.

It’s similar to the F8 key, but if you use the up arrow, the cursor will be at the end of the command, while F8 keeps it at the beginning.

Perform multiple commands simultaneously.

Imagine you have many commands that take a long time to complete when you run them.

You don’t want to stay by the computer and wait for each command to finish before starting the next one.

To solve this, you can use chain commands by linking them together.

Best Command Line for Windows
cd C: && echo hello world!

You can use “&&” to enter multiple commands one after another.

These commands are executed in the order you write them, and each command waits for the previous one to finish before starting.

Canceling command during execution

If you give a command that takes a long time, you can stop it right away by pressing “Ctrl + C“.

If you run a program that never finishes, you can close it using these keys.

Viewing the command output page by page

best commands line for Windows usually show results, but sometimes these results are too long and keep scrolling, making them unreadable.

To solve this problem, you can use the following format.

[command with output] | more


Best Command Line for Windows
dir | more

The “more” command shows information in a regular way, but it stops when the page is full.

To see more, press the “Space” key for the next page or press “Enter” to keep reading.

It gives you the information line by line.

Filtering the output of the best command line for windows

If you have a long command and want to find a specific line or word in it, you can limit it using this command.

[command with output] | find “query”

Ipconfig | find “Address” is the best command line for Windows.


Best Command Line for Windows
Ipconfig | find “Address”

Let’s say you used a command to find errors in the computer system from last year.

If you’re searching for a particular error, you can use this command to find it easily.

The command looks at each line and shows you any line that has the word or phrase you want.

Copying the output of a command

Imagine you need to fix a problem in Windows and the specialist tells you to do a specific action and show them what happens.

But it’s hard to highlight and copy the text in the command line.

Instead, you can use this alternative command.

[Command with output] | clip

Ipconfig | clip is the best command line for Windows.


Ipconfig | clip

When you use this command, the result goes straight to a special memory called “Clipboard” (Clipboard is where copied information is stored).

You can then paste it wherever you want by pressing the keys “Ctrl + V” together.

Remember that using this command will overwrite anything that was previously in the clipboard, so be cautious not to lose any important data.

Saving the output of a command

If you want to save the result of a command in a file, instead of copying and pasting the information into the file yourself, you can use a command to directly put the output into the file you want.

[command with output] > filename.txt


Ipconfig > ipinfo.txt

This command makes a new file with the given name where you are working and saves everything in it.

If the file already exists, it will be changed. If you want to save the file in a different place, use the full address (like C:\folder\filename.txt).

If you don’t want the file to be changed, use this command to add the code to the existing file.

[command with output] >> existingfile.txt

Drag and drop files

If you have a file buried in your folders and you want to find its exact location, there are a few ways to get its address.

One way is to copy the address from the bar at the top of the “File Browser” and paste it into the command line.

Another, easier way is to simply drag and drop the file into the command line.

However, this method only works in regular mode, not if you’re logged in as an “Admin” or something else.

Viewing the structure of each folder

To view the layout of a folder containing lots of files and subfolders, you can use the “tree” command.

This command is easy to use and understand, and you can achieve the desired outcome by using different options with it.

The tree is the best command line for Windows.


Normally, this command shows the folders in the current location.

However, if you type the address of another folder before the command, it will show its structure instead.

By adding “F/” at the end of the command (like tree /F), it will also show the files.

If the folder is large, it’s a good idea to save the results in a file.

Automatic completion of folder and file names

When you need to type file addresses by hand, the “Tab” key makes your job easier.

In the command line, when you’re typing an address, the Tab key finishes it for you by finding the closest folder or file name.

If there are many similar names, each time you press Tab, it shows one of them.

For instance, if we type “C:\Us” in the command line and press the “Tab” key, it will automatically change to “C:\Users”.

Next, if we keep typing “C:\Users\F” and press “Tab” again, it will show “C:\Users\thinkwriteway”.

This feature is helpful when you have an idea about a folder’s name but don’t know the exact spelling. By entering a few letters and pressing “Tab,” you can find the correct name easily.

Changing the size of the window

If you don’t like how big the command line window looks, you can change it in the settings.

But you can also make it smaller or bigger by using a command instead of going to the settings. Just use this command to resize the window easily.

Mode [Columns], [Rows]

You can change the size of the command line by specifying the number of characters for each column and row.

For instance, if you want a window with 140 characters in length and 60 characters in height, use the command “mode 140,60”.

Be aware that this command clears the window, so avoid using it if you need to keep the current outputs.

Resize to full screen

If you have many tasks that can be done only using the command line and you want to prevent other programs on Windows from disturbing your work.

If you want to recreate the old terminal experience, you can use the “Alt + Enter” key combination to switch to full-screen mode.

We finished the article, but the best command line for Windows isn’t over! “CMD” has many options for users. You can make your work easier and save time by writing batch files with the command line.

If you find additional information, please refer to this article on the Top 14 Best Command Line for Windows Tips and Tricks. beebom

If you seek further more information about the Top 14 Best Command Line for Windows Tips and Tricks or have any inquiries regarding our blog, please don’t hesitate to contact us via email at

Share This Article :

Leave a Comment

What to read next