≡ Menu

Linux commands for Windows

It’s very common scenario in IT field that people who are familiar with one OS have to learn/work with another OS. I do see many people, who are familiar with Linux commands, looking for their equivalent commands in Windows OS.  Below I have attempted to list down the Windows commands for most widely used Linux commands. If I have missed any, please write in the comments section and let me know.

Ls :       The Windows equivalent one is dir.  ‘Dir‘ has many  switches to list files based on different attributes, sort the list on size or date modified etc.

Grep : Findstr is the closet matching one for grep. find is also for searching strings in files, but it does not have many options.

Adduser:  We can use net user  to manage user accounts.

Useradd: net localgroup can be used to manage user groups. Net group can be used to manage active directory (domain) groups.

Uname  : ver command shows Windows OS version.  Systeminfo shows lot of hardware and software information.
Ps  : The closest matching command is tasklist, though it’s not as feature rich as ps.

Echo : echo. Very much similar to Linux’s echo.
Md :   mkdir

rm:     Del deletes files whereas  rmdir can be used to delete directories.
Du :    du can be used to monitor the disk usage.  However, this tool is not part of Windows OS. We need to install it separately. See the link for more information.
Df   :  Net use. We can list the network shares mapped on the computer.
Mount :    Net use . Map network share to local drive
Cat    :  Type  print the contents of a text file in the console/command prompt.
Head :   there’s no equivalent command I am aware of.
Tail   :   Tail resource kit tool.
touch: Fsutil can be used to create files of require size.

I will add few more commands to the list soon…If you are searching for some specific command and do not find it here, please let me know.

7 comments… add one
  • Pat

    http://getgnuwin32.sourceforge.net/ has a bunch of *nix commands compiled for windows and they work quite well

  • Dalia

    Thanks, very useful. Hadn’t used Windows in many years and needed a quick translator to complete a few simple tasks. Exactly what I needed.

  • Linh

    i use the following in my terminal setup script

    doskey ls=dir /b $*
    doskey ll=dir $*
    doskey grep=findstr /i /s /p /n /c:$*

    with this i can use those Unix commands on Windows, just in case i forget that i am on Windows :)

    • admin

      Nice tip. Thanks you Linh for sharing with us.

  • Swathi Venkatesh

    Thank you so much

  • Selva

    I couldn’t find command for opening a folder or a directory , I tried using Open command but it’s showing error in Windows , Could you share your inputs on it.

  • Vivek Rao

    For Unix cp Windows has copy and xcopy.

Leave a Comment