Is there any way to use (basic) bash commands on Command Prompt from Windows 8? I will still use more sophisticated commands in my scripts, but for simple navigation, etc. is it possible to setup Command Prompt to use things like ls
, pwd
, and cd
?
4 Answers
Yes, just use Powershell. It's built-in since Windows Vista and the successor of the good old cmd.exe.
This command (called Cmdlet in PS)
Get-Alias
will show you which aliases exist for Powershell commands. The typical bash commands are among them.
PS C:\Users\User> pwd Path ---- C:\Users\User PS C:\Users\User> ls Directory: C:\Users\User Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 18.08.2013 10:56 .android d---- 14.06.2013 19:23 .config d---- 11.08.2013 16:57 .freemind d---- 01.04.2013 21:13 .splunk d---- 12.12.2012 08:36 .ssh d---- 17.10.2012 07:22 Cisco Packet Tracer 5.3.3 d---- 16.04.2013 18:25 Citrix d-r-- 13.10.2013 23:48 Contacts d-r-- 04.01.2014 14:28 Desktop d---- 25.05.2013 00:35 deviantART d-r-- 04.01.2014 23:55 Documents d-r-- 04.01.2014 18:56 Downloads d-r-- 04.01.2014 15:19 Dropbox d-r-- 04.01.2014 14:30 Favorites d---- 15.10.2012 23:57 GNS3 d-r-- 13.10.2013 23:48 Links d-r-- 13.10.2013 23:48 Music d---- 17.09.2012 18:22 pdf-Office d-r-- 04.01.2014 17:12 Pictures d---- 18.04.2012 22:38 Roaming d-r-- 13.10.2013 23:48 Saved Games d-r-- 13.10.2013 23:48 Searches d---- 12.12.2012 18:00 SparkleShare d-r-- 13.10.2013 23:48 Videos d---- 29.05.2013 09:26 vmws -a--- 15.10.2012 20:58 186 .packettracer -a--- 19.09.2012 14:53 81 CTX.DAT -a--- 07.03.2013 20:24 641 dateilink.lnk -a--- 02.01.2014 18:13 27369 history.cer
I believe what you're looking for is MinGW and MSYS. Take a look at this webpage: http://www.mingw.org/
A basic UNIX environment that includes not only bash
, ls
, pwd
, cd
, but you can get pretty much everything up to and including X
nicely packaged up and ready to go using cygwin
, which can be freely obtained.
Just write powershell
in your good old cmd
command prompt and it will turn into powershell.
Most of the commands work there.
You can switch back to command prompt by writing cmd
again.