As a developer or an administrator, you often use the Windows Console. Before Windows 10 and Windows Server 2016, it was a pain. The main burden was the 80 columns limitation. But Microsoft has finally decided to make some improvements. The major improvement is the console now support more than 80 columns and common shortcuts such as Ctrl+C and Ctrl+V. Here's are some tips to help you using the console.
#Quickly open a cmd from the explorer
You often want to open a console in a specific directory. Instead of using the
cd command, you can open it from the explorer. Simply enter
cmd in the search bar and press enter. You can focus the search bar by pressing CTRL+L.
Open Windows Console
#Change the transparency (Ctrl+Shift+Mouse wheel)
You can change the transparency of the console using Ctrl+Shift+Mouse wheel or Ctrl+Shift++ and Ctrl+Shift+-. This allows to view the window behind.
#Full Screen (F11)
If you are only using the console, such as on Windows Server Core, you can show the console in full screen using F11 or Alt+Enter. This will make your Windows looks like Linux 😃
Windows Console fullscreen
#Commands history (F7)
It's nice to avoid typing a command twice. The console keeps a history of all the executed commands, so you can reuse them later. Navigating using up and down is not so useful as you don't always know which is the previous command. The console has an awesome UI for showing previous commands 😃 You can show it using F7
Windows Console history
#Find text (Ctrl+F)
Sometimes you need to search in the output of a command. Of course, you can read the whole output and find what you are looking for. But, if the output is very long, you'll spend long minutes. As in many applications, you can find text using Ctrl+F.
Windows Console find
#Copy the output of a command to the clipboard
You can use the
clip command to redirect the command output from the command line to the Windows clipboard:
echo toto | clip
You can also copy the content of a file to the clipboard:
clip < file.txt
#Pipe commands between Windows and Linux
dir | wsl grep ts wsl ls | find /i "ts"
Do you have a question or a suggestion about this post? Contact me!