Unprecedented convenience! Do you know that the CMD of win10 can still play like this



If you are an experienced user, you should often use the command line tools represented by CMD in win10. However, these command-line tools have always had a great impact on the experience, that is, every time they are opened, the path is “C: users user name” by default. If the tool you need exists in another directory, you need to manually enter “CD directory” to jump. Every time, it’s very troublesome.

The default directory may not be the most commonly used one, whether it is CMD or powershelly

If you often use command lines such as CMD in a directory, it’s much more convenient to change the default path to this directory. So how to customize the default path of tools such as CMD and PowerShell? Let’s have a look.

First of all, we need to use Microsoft’s latest terminal app. In win10 store, search “Windows terminal” or click the link below to download and install.

Windows terminal app Download: https://www.microsoft.com/store/productId/9N0DX20HK701

This Windows terminal app has a much more gorgeous interface than the one that comes with the system. It uses the latest fluent design. Microsoft will release win10 21h2 this year. At that time, the UI of win10 will be fully transformed into fluent design. Maybe this app will also become the pre installed part of the system. Anyway, this time we’ll look at its custom default path function.

Win10 command line app

After opening the terminal app, click the drop-down triangle above to find “Settings”.

Find settings

Click “set” and it will be opened through Notepad“ settings.json ”File, we can set the terminal app by editing the parameters.

In the “default” section, we can edit all kinds of parameters including CMD, PowerShell and even WSL.

Find “default”

To specify the default path, just add the following characters to the “default” of the specified tool:

‘startingdirectory ‘:’directory /’,

The “directory” is defined by you. For example, if you want to open the command line, the default is the root directory of disk C. then the added characters should be:

‘startingDirectory’: ‘C:/’,

For example, if you add this line of code to the module in the command prompt, it will point to the root directory of Disk C by default

Here, we can set the default open path for all kinds of command line tools, just find the corresponding parameters. These parameters are easy to find, in the corresponding string are marked “command line prompt”, “power shell” and so on, you can do it yourself.

After modification, save the file, open the terminal app again, and you can see the default open path, which has just been set.

All in all, this is a very practical trick. If you often use the command-line tools, you might as well have a try!

 


发表评论

邮箱地址不会被公开。 必填项已用*标注