Show Menu
Cheatography

Windows equivalents of Linux commands Cheat Sheet (DRAFT) by

Common Commands between the two main OSes (WIP)

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Basic commands

Linux
Windows
Notes
ls
dir /b
The Windows command, by default, shows more inform­ation apart from names.
ls -l
dir /w
ls -l | grep ^d
dir /a:d
ls -a
dir /a:h
cp
copy
cp -f
copy /y
cp -r
xcopy
rm
del
rm -r
del
This is not wrong.
rm -f
del /f
clear
cls
Linux also supports this via Ctrl+L.
uname
ver
chmod
attrib
This one's tricky on Windows. Windows docs
whereis
where
cat
type
date
time
ps -aux
tasklist
kill <pi­d>
taskkill /pid <pi­d>
Windows uses process names by default, whereas Linux uses Process Identi­fiers (PIDs).
pkill <pn­ame>
taskkill <pn­ame>
kill -9 <pi­d>
taskkill /f /pid <pi­d>

Networking

Linux
Windows
Notes
ifconfig
ipconfig
ifconfig -a
ipconfig /all
ifdown <in­ter­fac­e>
ipconfig /release <in­ter­fac­e>
On Windows, if you do not specify an interface, it'll act on all of them.
ifup <in­ter­fac­e>
ipconfig /renew <in­ter­fac­e>
On Windows, if you do not specify an interface, it'll act on all of them.
traceroute
tracert
whoami
whoami
 

Invoking scripts from within scripts

On Linux, you just put the path to said script and it'll do the job. On Windows, you need the
call
command as a prefix. Works the same, though.

File permis­sions

chmod
parameter
attrib
parameter
Action
Notes
+r
+r
Allows for reading
-
+w
-r
Allows for writing
Windows considers you can have read-onnly files or writable files, not both like Linux does.
-
+a
Marks files as archived on a backup
-
-
+h
Marks files as hidden
-
-
+i
Allows file to be indexed
-
-
+p
Pins the file
-
+x
-
Allows the file to be executed
Windows considers all files and direct­ories executable if you can access them.