window-cli Cheat sheet
Environment Variables
Display the value of an environment variable
echo %VARIABLE%
Display all environment variables
set
System Basic
Find user profile path
echo $env:USERPROFILE
C:\Users\WIN 10
Get Help
help
Navigation
Change directory
cd
Change to the specified directory
cd [directory]
cd Users folder
cd C:\Users
C:\Users
Go to home directory
cd ~
C:\Users\WIN 10
List files and directories in the current directory
dir
Create a new directory
mkdir [directory]
Remove a directory
rmdir [directory]
Clear content
cls
Clear content
clear
File Operations
Delete a file
del [file]
Copy a file
copy [source] [destination]
Move a file
move [source] [destination]
Rename a file
ren [old_name] [new_name]
Display the contents of a file
echo [content] > [file]
Examples:
echo [content] > [file]
Display the contents of a file
type [file]
System Information
Display detailed configuration information about the computer and its operating system
systeminfo
Display IP configuration information
ipconfig
Display a list of currently running processes
tasklist
Terminate a process by its process ID
taskkill /PID [process_id]
Miscellaneous
Display text on the screen
echo [text]
Start a program or open a file
start [program]
Shutdown the computer
shutdown
Get help about a specific command
help [command]