Windows & Linux Commands

Command comparison reference - Essential command-line equivalents for Windows Command Prompt, PowerShell, and Linux terminals.

About Command Line Interfaces

Command-line interfaces (CLI) provide direct text-based access to operating system functions and are essential for system administration.

  • Windows: Command Prompt (cmd), PowerShell, Windows Terminal
  • Linux: Bash, Zsh, Fish shells with terminal emulators
  • Essential for automation, remote administration, and advanced system management

Command Converter

File Operations

List: dir (Win) / ls (Linux)

Copy: copy/xcopy (Win) / cp (Linux)

Move: move (Win) / mv (Linux)

Delete: del (Win) / rm (Linux)

Network Commands

Ping: ping (Both)

IP Config: ipconfig (Win) / ifconfig (Linux)

DNS Lookup: nslookup (Both)

Trace Route: tracert (Win) / traceroute (Linux)

System Information

System Info: systeminfo (Win) / uname (Linux)

Processes: tasklist (Win) / ps (Linux)

Disk Usage: dir (Win) / df (Linux)

Memory: systeminfo (Win) / free (Linux)

User Management

Current User: whoami (Both)

User List: net user (Win) / users (Linux)

Groups: net localgroup (Win) / groups (Linux)

Switch User: runas (Win) / su (Linux)

Complete Command Comparison

FunctionWindows (CMD)Windows (PowerShell)LinuxDescription
List Directory ContentsdirGet-ChildItemls -laDisplay files and directories
Change DirectorycdSet-LocationcdNavigate to different directory
Create DirectorymkdirNew-Item -Type DirectorymkdirCreate new directory
Copy FilescopyCopy-ItemcpCopy files or directories
Move/Rename FilesmoveMove-ItemmvMove or rename files
Delete FilesdelRemove-ItemrmDelete files or directories
Display File ContenttypeGet-ContentcatShow contents of text file
Find Text in FilesfindstrSelect-StringgrepSearch for text patterns
Network ConfigurationipconfigGet-NetIPConfigurationifconfigDisplay network settings
Test Network ConnectivitypingTest-NetConnectionpingCheck network connectivity
Display Running ProcessestasklistGet-Processps auxShow active processes
Kill ProcesstaskkillStop-ProcesskillTerminate running process
System InformationsysteminfoGet-ComputerInfouname -aDisplay system details
Current Userwhoami$env:USERNAMEwhoamiShow current user name
Environment VariablessetGet-ChildItem Env:envDisplay environment variables
Disk UsagedirGet-PSDrivedf -hShow disk space usage
Archive/ExtractcompactCompress-ArchivetarCreate or extract archives
Schedule TasksschtasksRegister-ScheduledTaskcrontabSchedule automated tasks