1. Starting in the current directory
Windows Terminal supports passing the starting directory as a parameter using the -d
flag. This means that you can type wt -d .
in the File Explorer's address bar to start Windows Terminal in the current directory.
Another approach to opening Windows Terminal in the current directory would be through the context menu. if you right-click your mouse while holding the shift key, you can see that there is a new entry in the context menu that offers to open cmd/powershell/wsl in that directory. Windows Terminal does not yet support adding itself to the context menu on install. Fortunately, you can use this tool to add open windows terminal here
to the context menu.
2. Getting the full path of a file/folder.
You can drag and drop files and folders to the terminal to get their full path. If you are a WSL user, you can use wslpath tool that comes with Windows 10 to convert Windows path to Unix path.
3. Using Administrator mode
To start Windows Terminal (or any other app) in administrator mode, you can hold ctrl+shift while clicking its icon. You can also use psutils to simulate Linux's sudo
in Windows.
Discussion (1)
nice one thank you for this post.