Windows vs Linux

  • /lib + /sbin = C:\Windows\system32

  • /home = C:\Users

  • /var = C:\ProgramData

  • /etc = registry

  • /tmp = C:\Windows\Temp, etc.

Windows command
Linux command
Notes

arp

cd

On Windows, cd alone prints the current directory, but on Unix cd alone returns the user to his home directory.

cd

On Windows, cd alone prints the current directory.

cls

clear Control-L

Clear the terminal screen

copy

assign

Create a file link

assoc

at

See also schtasks.

attrib

Sets ownership on files and directories

chkdsk

Checks filesystem and repairs filesystem corruption on hard drives.

date time

Date on Unix prints the current date and time. Date and time on Windows print the date and time respectively, and prompt for a new date or time.

del

deltree

rm -r

Recursively deletes entire directory tree

dir

"dir" also works on some versions of Unix.

doskey /h F7 key

The Unix history is part of the Bash shell.

edit

vi emacs etc.

edit brings up a simple text editor in Windows. On Unix, the environment variable EDITOR should be set to the user's preferred editor.

exit

exit Control-D

On Unix, pressing the control key and D simultaneously logs the user out of the shell.

explorer

nautilus etc.

The command explorer brings up the file browser on Windows.

find

ftp

help

"help" by itself prints all the commands

hostname

ipconfig /all

The /all option lets you get the MAC address of the Windows PC

mem

Shows system status

mkdir

move

net session

net statistics

nslookup

ping

print

lpr

Send a file to a printer.

reboot shutdown -r

regedit

edit /etc/*

The Unix equivalent of the Windows registry are the files under /etc and /usr/local/etc. These are edited with a text editor rather than with a special-purpose editing program.

rmdir

rmdir /s

rm -r

Windows has a y/n prompt. To get the prompt with Unix, use rm -i. The i means "interactive".

schtasks

set

Set on Windows prints a list of all environment variables. For individual environment variables, set <variable> is the same as echo $<variable> on Unix.

set Path

echo $PATH

Print the value of the environment variable using set in Windows.

shutdown

Without an option, the Windows version produces a help message

shutdown -s

Also need -f option to Windows if logged in remotely

sort

start

&

On Unix, to start a job in the background, use command &. On Windows, the equivalent is start command. See How to run a Windows command as a background job like Unix ?.

systeminfo

tasklist

"tasklist" is not available on some versions of Windows. See also this article on getting a list of processes in Windows using Perl

title

?

In Unix, changing the title of the terminal window is possible but complicated. Search for "change title xterm".

tracert

tree

find ls -R

On Windows, use tree | find "string"

type

ver

xcopy

cp -R

Recursively copy a directory tree

assign

ln -s

On Unix, a directory may not have multiple links, so instead a symbolic link must be created with ln -s.

Last updated

Was this helpful?