Making Windows Command Prompt more linux like

Here I'm trying to keep a list of mostly used command line tools available under windows .
Below is a list of tools that can be put to use via command prompt and most of unix tools for writing automated scripts on Windows.

Install chocoletey:

chocoletey is a yum and apt-get like CLI tool for install new software on your machine but  for windows. With chocoletey(https://chocolatey.org/) you just type 'choco install jdk' and you will have java installed.
On windows 7 just run this on your command prompt:
  1. @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

Make sure you have run cmd as administrator (elevated):


Now you have the ultimate command line installer installed. :)
With chocoletey any tool you install just run :

  1. refreshenv

to instantly use in your current command prompt window.

Install git :

While installing git from http://git-scm.com/download/win just select "Use Git and optional Unix tools from the windows command prompt":




This way you will have lots of unix command line tools available in your command prompt.
Make sure to select MINGW32 for using in Git-Bash during installation.

Install GNU core-utils for windows:

Install GNU core utils for windows http://gnuwin32.sourceforge.net/downlinks/coreutils.php
from
http://gnuwin32.sourceforge.net/packages/coreutils.htm

Install ps tools:
https://download.sysinternals.com/files/PSTools.zip
pstools has some usefull CLI tools like psexec & many others
Install gtools:

Install gtools http://www.p-nand-q.com/download/gtools/gtools-current.exe from
https://code.google.com/p/pserv4/

gtools has some usefull CLI tools like pathed & many others ( See http://p-nand-q.com/download/gtools/index.html )

Install Gcal , a tool to print calendar on console & have same functionality as Unix_Cal
( http://gnuwin32.sourceforge.net/downlinks/gcal.php )
Install bc , a command line calculator that lets do floating point calculations on command prompt
(http://gnuwin32.sourceforge.net/downlinks/bc.php)

Still missing 'clear' & 'pwd':

Run this code on your cmd:
  1. echo cls > %WINDIR%\system32\clear.bat
you will have unix clear  on your command prompt.
Download this file from :
https://raw.githubusercontent.com/ahmedmohiduet/Scripts/master/pwd.bat
and place it on your system directory:(C:\WINDOWS\system32).
If you have already installed wget with chocoletey then just run the follwing commands on your command prompt:
  1. cd c:
  2. cd C:\WINDOWS\system32
  3. wget --no-check-certificate https://raw.githubusercontent.com/ahmedmohiduet/Scripts/master/pwd.bat

Download and install UnxUtils from
http://unxutils.sourceforge.net/UnxUtils.zip
It has lotta useful utilities like du.

Download and install http://www.paulsadowski.com/wsh/cmdprogs.htm
http://www.paulsadowski.com/wsh/cmdutils.zip
It has lotta useful tools like df

Download and install Putty Installer from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
https://the.earth.li/~sgtatham/putty/latest/x86/putty-0.67-installer.exe
make sure to add environment variable:
  1. setx /m PATH "%PATH%;C:\Program Files (x86)\PuTTY"

It has lotta useful tools like pscp,putty,plink etc

Download and install nmap
https://nmap.org/dist/nmap-7.60-setup.exe
it has lotta network utilities like nmap, npcap, ncat, ndiff, nping

Download and install util-linux-ng
http://downloads.sourceforge.net/gnuwin32/util-linux-ng-2.14.1-setup.exe
it has lotta tools like col, colcrt, colrm, ddate, getopt, hexdump, line, rename, rev, taiff

In Command Prompt you dont get to copy & paste convenient enough. But fortunately in Git-Bash you copy and paste with ctrl+inst and shift+inst.

I am trying maintaining a list of all command-line tools available for windows & trying to make the list as much as comprehensive as possible.
Feel free to add comment if you believe I am missing any more tool :)


No comments:

Post a Comment