Windows Cheatsheet

Learning .NET development means that I'm spending a lot of time in Windows virtual machines. I cannot stand the cumbersome, ill-featured, pampering environment that Windows provides so I've written this cheatsheet to help myself and other *nix refugees cope. This page is a work in progress and suggestions for improvement are always welcome!

System Information

  • Windows Version:: Start -> right-click Computer -> Properties

Linux to DOS commands

Although there are tens of DOS-to-*nix tables littering the web, they mostly are concerned with users familiar with DOS who need to get by in Linux. I need just the opposite table. Here is a short table of the common commands and options that I use.

Bash command / description Windows CLI equivalent Notes
cat type
cd cd /d The /d flag must be used when cd'ing to a different drive letter.
cd ~ cd %userprofile%
cd %homepath%
cp copy
cp -R xcopy
free mem
grep find "needle" Needs quotes
history F7
ifconfig ipconfig
less more
ls dir
man -help or /?
mv move
rm del
pwd cd "cd" with no arguments returns the current working directory.
shutdown -r reboot
top tasklist
vim edit VIM can be installed in Windows.

More commands (from DOS to Linux):

Other Windows CLI tips

  • Change window size: mode 160,80 (width,height)
  • "cd" to a new directory and store pwd: pushd C:\new\path
  • Return to directory from pushd: popd
  • Run CLI as administrator: Start -> Search -> "cmd" -> Ctrl+Shift+ Enter
  • Send command output to the Windows clipboard: somecommand | clip
  • Place the contents of a text file into the Windows clipboard: clip < somefile.txt
  • Find out how much space System Restore points occupy: vssadmin list shadowstorage
  • Enable QuickEdit mode to enter the contents of the clipboard by right-clicking in the command window.

Date Published: 2011-07-23



 



[email protected] [email protected] [email protected] [email protected] [email protected]

eXTReMe Tracker