loading...
Cover image for Some Windows Terminal tips

Some Windows Terminal tips

ducaale profile image Mohamed Dahir Updated on ・1 min read

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.

starting windows terminal from File Explorer's address bar

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.

starting Windows Terminal from 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.

dragging and dropping a folder into Windows Terminal

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.

Posted on by:

Discussion

pic
Editor guide
 

nice one thank you for this post.