Open command window here
Revision as of 17:37, 23 May 2018 by Planetoid (talk | contribs) (→Open a Cygwin window from the current File Explorer directory)
Quick to open the command prompt/terminal window.
Contents
Explanation of symbols[edit]
- Symbol . means the current folder on Windows or Unix-like OS.
- Symbol .. means the upper folder above the current folder on Windows or Unix-like OS.
- Symbol ~ means the home folder of the user on Cygwin or Unix-like OS[1].
Command Prompt/Terminal ⇋ File Explorer (OS: Win
)[edit]
Open a Command Prompt/Terminal from the current File Explorer directory[edit]
Open a Command Prompt/Terminal from the current File Explorer directory
(1) Press alt + d to switch to the path bar of file explorer. (2) Enter cmd in the PATH bar and press ENTER key to open the console window. Tested on Windows 7, 8, 10.[2][3]
- cmdhere powertoy for windows xp
- create the cmd.exe shortcut ( c:\windows\system32\cmd.exe ) and set the start location manually
Open a Command Prompt/Terminal from the Total Commander directory
- If you using the Total Commander, enter cmd in the bottom PATH bar and press ENTER key to open the console window.
Open a Windows PowerShell from ...
- (left blank intentionally)
Open a File Explorer from the current Command Prompt/Terminal directory[edit]
- Keyin explorer . on the command prompt, it will open the current folder in the file explorer [4]
- Keyin explorer .. on the command prompt, it will open the upper folder in the file explorer
Cygwin window ⇋ File Explorer (OS: Win
)[edit]
Open a Cygwin window from the current File Explorer directory[edit]
Steps for Cygwin
- Go to your "Send To" folder: C:\Users\<your_user_name>\AppData\Roaming\Microsoft\Windows\SendTo (howto: Customize the Send To Menu in Windows 10, 8, 7, or Vista)
- Create a shortcut having this in the Target field: C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico C:\cygwin64\bin\bash.exe -l -c "cd \"$0\" ; exec bash"[5]
Known issue: If the folder name contains Chinese characters will met problem!
Open a File Explorer from the current Cygwin directory[edit]
- Keyin explorer "$(cygpath -w .)" on the Cygwin command, it will open the current folder in the file explorer[6]
- Keyin explorer "$(cygpath -w ~)" on the Cygwin command, it will open the Cygwin user home folder e.g. C:\cygwin64\home\User in the file explorer [7]
Terminal window ⇋ Finder (OS: Mac
)[edit]
Open a Command Terminal from the current Finder directory[edit]
Mac OS 在 Finder 的目前目錄中開啟終端機 - G. T. Wang
- Applescript to launch iTerm2 Version 3+ from OS X Finder via keyboard shortcut or Toolbar
- Go2Shell - ZipZapMac (Go2Shell:在 Mac App Store 上的 App)
- GitHub - jbtule/cdto: Finder Toolbar app to open the current directory in the Terminal (or iTerm, X11)
Open a Finder from the current Command Terminal directory[edit]
- Keyin open . on the terminal prompt, it will open the current folder in the finder
- Keyin open .. on the terminal prompt, it will open the upper folder in the finder
Copy current path to clipboard[edit]
Using tools
- Total Commander
- sublime text 3: How to set shortcut for `Copy file path` in sublime text 3 - Super User
- Notepad++ --> Open the file --> Right mouse click on the label --> Copy the path
- EmEditor (Text Editor) --> Open the file --> Right mouse click on the label --> Copy the path
Further reading[edit]
References[edit]
- ↑ history - Why was '~' chosen to represent the home directory? - Unix & Linux Stack Exchange
- ↑ Quickly Open a Command Prompt from the Windows Explorer Address Bar.
- ↑ Windows 7:在命令提示字元視窗中快速切換路徑 @ 學不完.教不停.用不盡 :: 痞客邦 PIXNET ::
- ↑ Open a File Browser From Your Current Command Prompt/Terminal Directory
- ↑ windows - Open Cygwin at a specific folder - Stack Overflow
- ↑ cygpath
- ↑ windows - Open Cygwin at a specific folder - Stack Overflow