Windows → Linux reference

Browse the complete command library

Select a command to open its complete guide. Each guide includes a description, common use cases, copyable Linux commands, options, examples and important warnings.

dirls ipconfigip addr tasklistps aux findstrgrep

Topic hubs

Browse commands by major topic

12 hubs

Browse

All command guides

605 commands

dirls -la List directory contents Lists files and folders in the current (or specified) directory. Open full guide → cdcd Change directory Navigates between directories. Same command name, but with important differences in path notation. Open full guide → copycp Copy files and folders Copies files or entire directory trees to another location. Open full guide → movemv Move or rename files Moves files to a new location, or renames them. In Linux, renaming IS moving. Open full guide → del / eraserm Delete files and folders Removes files or directories. Be very careful — Linux has no Recycle Bin by default. Open full guide → mkdirmkdir Create new directories Creates one or more new directories. Same name, but with a useful extra flag. Open full guide → typecat Display file contents Shows the contents of a text file in the terminal. Also used to combine files. Open full guide → ipconfigip addr show Show network configuration Displays IP addresses, network interfaces, and connection details. Open full guide → pingping Test network connectivity Sends ICMP echo requests to test if a host is reachable. Same name, but runs forever by default on Linux. Open full guide → tracerttraceroute Trace network route to host Shows each network hop between your machine and a destination, helping diagnose where connections slow down or fail. Open full guide → netstatss -tuln Show network connections Displays active network connections, listening ports, and socket statistics. Open full guide → chkdskfsck Check filesystem integrity Scans and repairs filesystem errors on a disk or partition. Open full guide → formatmkfs.ext4 Format a disk/partition Creates a new filesystem on a disk partition, erasing all existing data. Open full guide → diskpart / fdiskfdisk / parted Manage disk partitions Creates, deletes, and modifies disk partitions. Use with extreme care. Open full guide → tasklistps aux List running processes Shows all currently running processes, like the Processes tab in Task Manager. Open full guide → taskkillkill / killall Stop/terminate a process Ends a running process by its process ID (PID) or name. Open full guide → clsclear Clear the terminal screen Clears all text from the terminal window. Open full guide → echoecho Print text to terminal Displays a line of text. Also used in scripts for variable output. Open full guide → setexport / env View or set environment variables Lists or modifies environment variables available in the current session. Open full guide → findfind Search for files and directories Searches for files matching given criteria anywhere in the filesystem. Open full guide → findstrgrep Search text within files Searches for text patterns inside files. One of the most-used Linux commands. Open full guide → systeminfouname -a Display system information Shows OS version, hardware details, memory, and system configuration. Open full guide → shutdownshutdown Shutdown or restart the system Powers off, reboots, or schedules a shutdown of the Linux system. Open full guide → whoamiwhoami Show current username Displays the username of the currently logged-in user. Open full guide → runassudo Run command as administrator Executes a command with elevated privileges (as root/superuser). Open full guide → ren / renamemv / rename Rename files Renames a file or batch-renames multiple files matching a pattern. Open full guide → attribchmod / chown Change file permissions/attributes Controls who can read, write, or execute a file. Linux uses a more powerful permission model than Windows. Open full guide → xcopyrsync -av Advanced copy with sync & progress Copies directories with more control than cp — supports sync, progress display, resume, and remote copying. Open full guide → treetree Display directory tree Shows the directory structure as a visual tree. May need to be installed on Linux. Open full guide → pushd / popdpushd / popd Save and restore directory location Saves your current directory to a stack so you can jump back to it later after navigating elsewhere. Open full guide → moreless Page through large files Displays large text files one screen at a time, allowing you to scroll up and down. Open full guide → nslookupdig / nslookup Look up DNS records Queries DNS servers to resolve hostnames to IP addresses and inspect DNS records. Open full guide → ftpscp / sftp Transfer files over network Transfers files between computers over a network. Linux has several options with different security levels. Open full guide → net usemount / smbclient Connect to network shares Mounts a network share (Windows SMB/CIFS share or NFS) so you can access it like a local folder. Open full guide → netsh wlan show profilesnmcli Manage Wi-Fi connections Lists, connects to, and manages wireless network profiles. Open full guide → winget install / choco installapt install Install software packages Installs programs and tools from an online repository — like an App Store for the terminal. Open full guide → winget uninstallapt remove / purge Uninstall software packages Removes installed packages from the system. Open full guide → Windows Updateapt update && apt upgrade Update the system and all software Downloads and installs updates for the OS and all installed packages. Open full guide → wherewhich / whereis Find where a command is installed Locates the full path of an executable command or program. Open full guide → services.msc / net startsystemctl Manage system services Starts, stops, restarts, and checks the status of background services (like Windows Services). Open full guide → eventvwr / Event Viewerjournalctl View system logs Reads logs from the systemd journal — the Linux equivalent of Windows Event Viewer. Open full guide → sc querysystemctl list-units List all services and their status Shows all installed services and whether they are running, stopped, or failed. Open full guide → net useruseradd / usermod Create and manage user accounts Adds new users, changes user properties, and manages user accounts on the system. Open full guide → net localgroupgroupadd / groups Manage user groups Creates groups, adds users to groups, and lists group memberships. Open full guide → net user username /passwordreqpasswd Change user passwords Sets or changes a user account password. Open full guide → sortsort Sort lines of text Sorts the lines of a text file or input alphabetically, numerically, or by other criteria. Open full guide → fcdiff Compare two files Compares two files and shows the differences between them line by line. Open full guide → wc (word count — no Windows equiv)wc Count words, lines, characters Counts lines, words, and characters in a file or piped input. Very useful in scripts. Open full guide → clip / clip.exexclip / xsel Copy output to clipboard Pipes command output directly into the clipboard so you can paste it elsewhere. Open full guide → msconfig / Task Schedulercrontab -e Schedule recurring tasks Runs commands or scripts automatically on a schedule — like Windows Task Scheduler. Open full guide → msinfo32 / dxdiaglshw / inxi Full hardware information Displays detailed hardware inventory — CPU, RAM, motherboard, GPU, and more. Open full guide → perfmon / Resource Monitorvmstat / iostat Monitor system performance Shows real-time statistics on CPU, memory, disk I/O, and system activity. Open full guide → date /t & time /tdate Display or set date and time Shows the current date and time, or sets the system clock. Open full guide → doskey /historyhistory View command history Shows previously run commands. Linux keeps a much longer history than Windows. Open full guide → cmd /k (set title)alias Create command shortcuts (aliases) Creates short nicknames for long commands. Add them to ~/.bashrc to make them permanent. Open full guide → start (open file/URL)xdg-open Open files with default application Opens a file, folder, or URL with the appropriate default application — like double-clicking in the file manager. Open full guide → breakCtrl+C Interrupt a running command Stops a currently running command or script. Ctrl+C sends SIGINT to the foreground process. Open full guide → pauseread -p Pause a script and wait for keypress Halts a script and waits for the user to press a key before continuing. Used frequently in batch files. Open full guide → rem / ::# Add comments to scripts Adds human-readable comments to shell scripts that are ignored during execution. Open full guide → exitexit Exit the shell or return an exit code Closes the current shell session or exits a script, optionally with a numeric return code. Open full guide → ifif [ condition ]; then ... fi Conditional branching in scripts Tests a condition and executes different code depending on whether it is true or false. Open full guide → forfor ... in ...; do ... done Loop over a list or range Repeats a block of commands for each item in a list, range, or set of files. Open full guide → while (goto loop)while [ condition ]; do ... done Loop while a condition is true Repeatedly executes commands as long as a condition remains true. Open full guide → gotofunctions / break / continue Control flow — replace GOTO with functions Bash has no GOTO. Use functions, break, continue, or restructure logic with loops and conditionals. Open full guide → shiftshift Shift script argument positions Shifts positional parameters ($1, $2...) left by one. Used to process command-line arguments in scripts. Open full guide → %errorlevel%$? Check command success or failure exit code Reads the exit status of the last command. 0 means success; any non-zero value means failure. Open full guide → set /a (arithmetic)$(( expression )) Perform arithmetic calculations Evaluates mathematical expressions in scripts or at the command line. Open full guide → titleecho -ne "\033]0;My Title\007" Set the terminal window title Changes the title text shown in the terminal emulator's title bar. Open full guide → pathecho $PATH / export PATH View or modify the command search path Shows or modifies the list of directories the shell searches when you type a command. Open full guide → rd / rmdirrmdir / rm -r Remove directories Deletes empty directories (rmdir) or directories with all their contents (rm -r). Open full guide → copy concat > filename Create a file from keyboard input Lets you type content directly into a new file from the terminal, without opening an editor. Open full guide → verify / certutil -hashfilesha256sum Verify file integrity with checksums Generates or checks checksums to verify that files have not been corrupted or tampered with. Open full guide → mklinkln -s Create symbolic and hard links Creates symbolic links (shortcuts) or hard links pointing to files or directories. Open full guide → cacls / icaclsgetfacl / setfacl Advanced file access control lists (ACL) Views and sets fine-grained file permissions beyond the basic owner/group/other model. Open full guide → openfileslsof List open files and which process uses them Shows which files, sockets, and devices are currently open and by which processes. Open full guide → labele2label / tune2fs -L Set or view disk volume label Assigns a human-readable name (label) to a disk partition for easier identification. Open full guide → wbadmin / disk imagedd Create raw byte-for-byte disk images Creates a complete raw copy of an entire disk or partition — useful for backups, imaging, and forensics. Open full guide → diskpart clean / clean allwipefs / shred Wipe or sanitise a disk Removes filesystem signatures from a disk or securely overwrites all data to prevent recovery. Open full guide → dir /s /b (recursive list)find . -type f List all files recursively Recursively lists every file in a directory tree, one per line — no directories, just files. Open full guide → dir /od (sort by date)find . -mtime -1 Find recently modified files Locates files modified within a specific time window. Open full guide → findstr /r (regex)grep -E Search using extended regular expressions Searches text using extended regular expressions for complex pattern matching. Open full guide → type (first lines)head Display the first lines of a file Shows only the first N lines of a file — useful for quickly previewing large files. Open full guide → type (end of file / logs)tail Display the last lines of a file Shows the last N lines of a file. With -f, follows the file in real-time — essential for watching logs. Open full guide → findstr /v (invert)tac Print file in reverse line order Outputs a file with lines in reverse order — last line first. The name is 'cat' backwards. Open full guide → sort /uniquesort | uniq Filter duplicate adjacent lines Removes or counts duplicate lines. Must be used after sorting — it only removes adjacent duplicates. Open full guide → findstr (character replace — n/a)tr Translate or delete characters Replaces, deletes, or squeezes individual characters in text — a character-level find and replace. Open full guide → for /f (field parsing)cut Extract columns or fields from text Cuts out sections of each line — by delimiter-separated field number or character position. Open full guide → type (awk — no equiv)awk Process and extract columns from structured text A powerful text-processing tool that splits lines into fields and lets you extract, transform, and report on structured text. Open full guide → type file | clip (base64 — no equiv)base64 Encode or decode Base64 Converts binary data to Base64 text encoding and back. Common in APIs, certificates, and email attachments. Open full guide → ipconfig /flushdnssudo resolvectl flush-caches Flush the DNS resolver cache Clears locally cached DNS records, forcing fresh lookups on the next DNS request. Open full guide → ipconfig /release and /renewdhclient Release and renew DHCP lease Releases the current DHCP IP address and requests a new one from the DHCP server. Open full guide → net viewsmbclient -L / nmap -sn View computers and shares on the network Lists computers visible on the local network and shared resources on a specific host. Open full guide → net time / w32tmtimedatectl View and sync system time via NTP Shows time synchronisation status and synchronises the system clock with an NTP time server. Open full guide → getmacip link show Display MAC addresses of network interfaces Shows the hardware (MAC) address of each network interface card. Open full guide → netsh int ip set address (static IP)nmcli con mod CONNECTION ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.method manual Configure a static IP address Assigns a permanent static IP address to a network interface using NetworkManager. Open full guide → netsh advfirewall (firewall rules)ufw Manage firewall rules Controls which network traffic is allowed through the system's firewall. Open full guide → pathpingmtr Combined ping and traceroute with statistics Continuously monitors each network hop showing real-time packet loss and latency per hop. Open full guide → nmap (Nmap for Windows)nmap Network port scanner and host discovery Scans networks and hosts to discover open ports, running services, OS versions, and security issues. Open full guide → logofflogout / pkill -KILL -u username Log off the current user session Ends the current user session, closing all running processes owned by that user. Open full guide → hibernatesystemctl hibernate Hibernate — save state to disk and power off Saves the current RAM state to disk and powers off. On next boot, the session resumes exactly where you left off. Open full guide → cleanmgr (Disk Cleanup)package cache cleanup / journalctl vacuum Free up disk space Removes temporary files, old package caches, and other items that can safely be deleted to recover disk space. Open full guide → msconfig / systemd-analyzesystemd-analyze Analyse system boot performance Shows total boot time and which services took the longest to start. Open full guide → regsvr32 (register DLL)sudo ldconfig Update shared library cache Updates the dynamic linker cache after installing new shared libraries (.so files) — the Linux equivalent of registering a DLL. Open full guide → net session / query userwho / w / last See who is currently logged in Lists currently logged-in users, what they are doing, and recent login history. Open full guide → sc create / sc deletesystemd unit files in /etc/systemd/system/ Create a custom systemd service Defines a new system service by creating a unit file, then enables and starts it. Open full guide → wmic bios get serialnumbersudo dmidecode Read BIOS and hardware serial numbers Reads hardware information from the system BIOS/UEFI including serial numbers, model numbers, and firmware versions. Open full guide → powercfg /batteryreportacpi / upower Battery status and health Shows battery charge level, time remaining, and health information on laptops. Open full guide → wmic temperature / Core Tempsensors Read CPU and hardware temperatures Displays temperature readings from CPU, GPU, and motherboard sensors. Open full guide → winver / About Windowsneofetch / fastfetch Display OS info with ASCII art logo Shows system information in a visually attractive format — distro, kernel, uptime, CPU, RAM, and more. Open full guide → uptime (Task Manager → Performance)uptime Show how long the system has been running Displays how long the system has been running since the last boot, along with current CPU load averages. Open full guide → devmgmt.msc (Device Manager)lspci / lsusb / dmesg View hardware devices and drivers Lists hardware devices, their drivers, and status — the Linux equivalent of Device Manager. Open full guide → taskmgr (Task Manager)htop / btop Interactive process and resource monitor Opens a real-time interactive view of CPU, memory, disk, and network usage with process management. Open full guide → wmic memorychip getsudo dmidecode -t memory Display physical RAM module details Shows information about physical RAM modules including size, speed, type, and which slots are populated. Open full guide → wmic startup / msconfig Startupsystemctl list-unit-files --state=enabled List programs set to run at startup Shows all services and programs configured to start automatically when the system boots. Open full guide → dpkg -i / msiexec /iapt install ./package.deb Install a manually downloaded .deb package Installs a local .deb package file you have downloaded manually, rather than from a repository. Open full guide → gpupdate /forcepuppet / ansible / chef Apply configuration management policies Applies centralised configuration policies — the Linux equivalent of Group Policy Update. Open full guide → regedit (Windows Registry)/etc/ and ~/.config/ System and application configuration storage Linux stores all configuration in plain text files rather than a registry. System config is in /etc/, user config is in ~/.config/ and dotfiles. Open full guide → assoc / ftype (file extension to program)xdg-mime Manage file type associations Views or changes which application opens files of a particular type. Open full guide → Compress-Archivezip -r archive.zip folder/ Create a ZIP archive Compresses files or folders into a standard ZIP archive. Open full guide → Expand-Archiveunzip archive.zip Extract a ZIP archive Extracts files from a ZIP archive into the current directory or a chosen destination. Open full guide → tar.exe -cftar -cf archive.tar folder/ Create a TAR archive Combines files and directories into a TAR archive without necessarily compressing them. Open full guide → tar.exe -xftar -xf archive.tar Extract a TAR archive Extracts TAR, tar.gz, tar.xz and other tar-based archives. Open full guide → compact /cgzip file.log Compress individual files Compresses individual files using gzip or xz to reduce their stored size. Open full guide → compact /ugunzip file.log.gz Decompress individual files Restores files previously compressed with gzip or xz. Open full guide → 7z a7z a archive.7z folder/ Create a 7-Zip archive Creates 7z, ZIP and other supported archive formats with the 7-Zip command-line tool. Open full guide → 7z x7z x archive.7z Extract a 7-Zip archive Extracts 7z, ZIP, RAR and many other archive formats while preserving directory paths. Open full guide → PowerShell New-Item -ItemType Filetouch filename.txt Create an empty file Creates a new empty file or updates an existing file timestamp. Open full guide → PowerShell Get-Itemstat filename.txt Inspect file metadata Displays detailed metadata such as file size, permissions, timestamps, owner and inode number. Open full guide → PowerShell Resolve-Pathrealpath path/to/file Resolve an absolute path Converts a relative path or symbolic link into its normalized absolute path. Open full guide → fsutil file createnewtruncate -s 100M test.img Create a file of a chosen size Creates an empty or preallocated file with a specific size. Open full guide → substsudo mount --bind /source /mountpoint Map a directory to another path Makes an existing directory tree accessible at a second mount point. Open full guide → takeownsudo chown user:group path Change file ownership Changes the user or group that owns a file or directory. Open full guide → robocopyrsync -avh source/ destination/ Synchronize directory trees Copies and synchronizes directories efficiently, transferring only changed content when possible. Open full guide → PowerShell Set-Contentprintf "%s " "text" > file.txt Replace file contents Writes new content to a file, replacing the previous contents. Open full guide → PowerShell Add-Contentprintf "%s " "text" | tee -a file.txt Append content to a file Adds new text to the end of an existing file without replacing its current contents. Open full guide → PowerShell Get-FileHashsha256sum filename.iso Calculate a file checksum Calculates a cryptographic checksum used to verify downloads and detect file changes. Open full guide → PowerShell Test-Pathtest -e path Check whether a path exists Tests whether a file, directory or other path exists for use in shell scripts. Open full guide → dir /bls -1 List names only Prints one file or directory name per line without detailed metadata. Open full guide → arp -aip neigh show Show the neighbor table Displays recently discovered IP-to-MAC address mappings for devices on local networks. Open full guide → route printip route show Show the routing table Displays routes used to decide where network traffic should be sent. Open full guide → hostnamehostnamectl Show or change the computer name Displays the current host name and, with administrator privileges, changes the persistent system host name. Open full guide → netsh interface show interfaceip link show List network interfaces Displays network interfaces and whether each link is up or down. Open full guide → netsh wlan show interfacesnmcli device show Inspect the active Wi-Fi connection Shows wireless interfaces, connection state, SSID, signal and other Wi-Fi information. Open full guide → netsh wlan show networksnmcli device wifi list Scan for nearby Wi-Fi networks Lists visible wireless networks, channels, signal strength and security information. Open full guide → Test-NetConnectionnc -vz host port Test a TCP port or web endpoint Checks whether a remote host and port accept connections, or whether an HTTP endpoint responds. Open full guide → Resolve-DnsNamedig example.com Query DNS records Looks up DNS records such as A, AAAA, MX, TXT and NS entries. Open full guide → PowerShell Invoke-WebRequestcurl -LO URL Download or request web content Makes HTTP requests, downloads files and inspects server responses. Open full guide → bitsadmin /transferwget -c URL Download a file non-interactively Downloads files from HTTP, HTTPS or FTP sources from a script or terminal session. Open full guide → telnetnc host port Open a basic TCP connection Connects to a TCP host and port for simple protocol testing and troubleshooting. Open full guide → sshssh user@host Open a secure remote shell Connects securely to a remote Linux, Unix or SSH-enabled system. Open full guide → scpscp file user@host:/path/ Copy files over SSH Transfers files or directories securely between local and remote systems. Open full guide → pktmonsudo tcpdump -i any Capture network packets Captures packets from network interfaces for troubleshooting and protocol analysis. Open full guide → netsh winhttp show proxyenv | grep -i proxy Inspect proxy settings Shows proxy environment variables used by command-line applications and package managers. Open full guide → diskmgmt.mscgparted Manage disks graphically Provides a graphical interface for viewing disks, creating partitions, formatting volumes and managing mounts. Open full guide → fsutil volume diskfreedf -h Show free filesystem space Displays used and available capacity for mounted filesystems. Open full guide → PowerShell Get-Volumelsblk -f List volumes and filesystems Shows block devices, filesystem types, labels, UUIDs and mount points. Open full guide → PowerShell Get-PhysicalDisklsblk -d -o NAME,MODEL,SIZE,ROTA,TRAN Inspect physical drives Displays physical disks, model names, sizes, transport types and health information. Open full guide → defragsudo fstrim -av Optimize storage maintenance Discards unused SSD blocks or defragments an ext4 filesystem when appropriate. Open full guide → manage-bdesudo cryptsetup luksOpen /dev/sdb1 secure Manage encrypted volumes Creates, opens and closes LUKS-encrypted Linux block devices. Open full guide → mountvolfindmnt View or manage mount points Lists mounted filesystems and attaches or detaches a filesystem from the directory tree. Open full guide → wmic diskdrive get statussmartctl Check drive health Reads SMART health status and diagnostics reported by a physical disk. Open full guide → PowerShell Get-Processps aux Find running processes Lists running processes or searches for processes by name. Open full guide → PowerShell Stop-Processkill PID Stop a process Requests that a process exit or forcefully terminates it when necessary. Open full guide → PowerShell Start-Processnohup command > output.log 2>&1 & Start a detached process Launches a program in the background and optionally keeps it running after the terminal closes. Open full guide → timeout /tsleep 5 Pause a script Waits for a specified amount of time before continuing. Open full guide → start /bcommand & Run a command in the background Starts a command without blocking the shell from accepting additional input. Open full guide → start /waitwait PID Wait for background jobs Pauses a shell script until one or more background processes finish. Open full guide → wmic process get processidps -eo pid,comm,args List process IDs and commands Displays process IDs together with executable names and complete command lines. Open full guide → winget searchapt search / pacman -Ss / dnf search Search available packages Searches configured software repositories for packages matching a name or description. Open full guide → winget listdpkg -l / pacman -Q / dnf list installed List installed packages Displays packages currently installed through the system package manager. Open full guide → winget upgrade --allapt upgrade / pacman -Syu / dnf upgrade Upgrade installed packages Downloads and installs available updates from configured package repositories. Open full guide → winget source updateapt update / pacman -Sy / dnf makecache Refresh repository metadata Downloads the latest package lists and repository metadata without necessarily installing updates. Open full guide → choco outdatedapt list --upgradable / checkupdates / dnf check-update Check for available updates Lists installed packages for which newer repository versions are available. Open full guide → Add-AppxPackageflatpak install flathub APP_ID Install a sandboxed desktop application Installs a desktop application from a Flatpak repository such as Flathub. Open full guide → Get-AppxPackageflatpak list --app List sandboxed applications Lists installed Flatpak applications and runtimes. Open full guide → Remove-AppxPackageflatpak uninstall APP_ID Remove a sandboxed application Uninstalls a Flatpak application and optionally cleans unused runtimes. Open full guide → Microsoft Storeflatpak search QUERY Browse desktop applications Provides a central catalog of Linux desktop applications distributed as Flatpaks. Open full guide → msiexec /xapt remove / pacman -R / dnf remove Uninstall a package Removes software installed through the distribution package manager. Open full guide → PowerShell Get-Servicesystemctl list-units --type=service List system services Shows loaded services and their current active, inactive or failed state. Open full guide → PowerShell Start-Servicesudo systemctl start SERVICE Start a service Starts a systemd service immediately for the current boot. Open full guide → PowerShell Stop-Servicesudo systemctl stop SERVICE Stop a service Stops a running systemd service for the current boot. Open full guide → PowerShell Restart-Servicesudo systemctl restart SERVICE Restart a service Stops and starts a systemd service so configuration or runtime state is reloaded. Open full guide → PowerShell Set-Service -StartupTypesudo systemctl enable SERVICE Configure startup behavior Controls whether a systemd service starts automatically during boot. Open full guide → PowerShell Get-LocalUsergetent passwd List local and directory users Lists user accounts known through local files and configured identity services. Open full guide → PowerShell Get-LocalGroupgetent group List groups Lists local and directory-backed groups known to the system. Open full guide → PowerShell New-LocalUsersudo useradd -m USER Create a user account Creates a new local Linux user and optionally a home directory and login shell. Open full guide → PowerShell Add-LocalGroupMembersudo usermod -aG GROUP USER Add a user to a group Adds an existing user to a supplementary group. Open full guide → net user username /active:nosudo usermod -L USER Lock a user account Locks password-based login for a local account without deleting the account or its files. Open full guide → net user username /active:yessudo usermod -U USER Unlock a user account Re-enables password authentication for a previously locked account. Open full guide → runas /usersudo -u USER command Run a command as another user Executes one command or opens a login shell using another user account. Open full guide → PowerShell Select-Stringgrep PATTERN FILE Search text patterns Finds lines matching a string or regular expression in files or piped input. Open full guide → PowerShell Get-Content -Waittail -f FILE Follow a growing file Prints new lines as they are appended to a log or other text file. Open full guide → PowerShell Measure-Objectwc FILE Count lines, words and bytes Counts lines, words, bytes or characters in text files and streams. Open full guide → PowerShell Compare-Objectdiff -u old.txt new.txt Compare text files Shows line-by-line differences or compares two already sorted lists. Open full guide → PowerShell ForEach-Objectxargs COMMAND Run a command for each input item Consumes a list or stream and runs another command for each item. Open full guide → PowerShell Where-Objectawk CONDITION Filter records Keeps only lines or fields that satisfy a textual or numeric condition. Open full guide → PowerShell Out-Filecommand > output.txt Write command output to a file Saves standard output to a file, either replacing or appending to it. Open full guide → PowerShell Tee-Objectcommand | tee output.txt Display and save output Copies piped output both to the terminal and to one or more files. Open full guide → PowerShell ConvertFrom-Jsonjq EXPRESSION file.json Read and query JSON Parses JSON and selects fields, array elements or transformed output. Open full guide → PowerShell ConvertTo-Jsonjq -n OBJECT Create or transform JSON Builds JSON values or reshapes existing JSON data from the command line. Open full guide → cd with current pathpwd Print current directory Shows the current working directory, similar to checking the current folder in CMD. Open full guide → PowerShell Get-Locationpwd Show current directory Prints the absolute path of the current working directory. Open full guide → PowerShell Set-Locationcd /path/to/folder Change directory Moves the shell into another directory. Open full guide → PowerShell Get-ChildItem -Forcels -la List files including hidden files Shows normal and hidden dotfiles with detailed metadata. Open full guide → PowerShell Get-ChildItem -Recursefind . Recursively list files Walks a directory tree and prints matching files and folders. Open full guide → PowerShell Copy-Itemcp source destination Copy a file Copies files from one path to another. Open full guide → PowerShell Copy-Item -Recursecp -r source_dir destination_dir Copy folders recursively Copies a directory and its contents. Open full guide → PowerShell Move-Itemmv source destination Move files or folders Moves or renames paths. Open full guide → PowerShell Rename-Itemmv old_name new_name Rename a file Renames a file or directory. Open full guide → PowerShell Remove-Itemrm file Remove a file Deletes a file from the filesystem. Open full guide → PowerShell Remove-Item -Recurse -Forcerm -rf directory Force-remove a folder tree Deletes a directory tree without prompting. Open full guide → PowerShell Split-Pathdirname /path/to/file Return parent path Prints the directory portion of a path. Open full guide → PowerShell Split-Path -Leafbasename /path/to/file Return filename from path Prints the final component of a path. Open full guide → PowerShell Join-Pathprintf "%s/%s\n" "$dir" "$name" Join path components Combines directory and filename strings in shell scripts. Open full guide → dir /als -la Show all files Lists hidden and non-hidden files. Open full guide → dir /o:nls | sort Sort directory listing by name Sorts file names alphabetically. Open full guide → dir /o:sls -lS Sort directory listing by size Shows large files first. Open full guide → dir /qls -l Show file owner Displays owner and group in a long listing. Open full guide → copy /ycp -f source destination Copy and overwrite Copies while forcing overwrite of the target. Open full guide → move /ymv -f source destination Move and overwrite Moves while forcing overwrite of the target. Open full guide → del /qrm -f file Delete without prompting Removes a file without interactive confirmation. Open full guide → del /sfind . -name "PATTERN" -type f -delete Delete recursively by pattern Finds matching files under a tree and deletes them. Open full guide → xcopy /ecp -a source_dir destination_dir Copy directory tree Copies folders recursively while preserving common metadata. Open full guide → xcopy /drsync -au source/ destination/ Copy only newer files Copies files only when the source is newer than the target. Open full guide → robocopy /ersync -a source/ destination/ Robust recursive copy Mirrors a directory tree without deleting extra target files. Open full guide → robocopy /mirrsync -a --delete source/ destination/ Mirror directories Synchronizes a destination so it matches the source. Open full guide → robocopy /xorsync -au source/ destination/ Skip older source files Copies only files that are newer than existing destination files. Open full guide → robocopy /zrsync -a --partial --progress source/ destination/ Resume interrupted copy Keeps partial transfers and shows transfer progress. Open full guide → fsutil hardlink createln existing_file hardlink_name Create hard link Creates another directory entry pointing to the same file inode. Open full guide → mklink /Hln target hardlink_name Create file hard link Creates a Linux hard link for a regular file. Open full guide → mklink /Dln -s target link_name Create directory symlink Creates a symbolic link to a directory. Open full guide → mklink /Jmount --bind /real/path /mount/path Create junction-like bind mount Uses a bind mount for a directory-to-directory mapping. Open full guide → attrib +hmv file .file Hide a file Linux hides files by naming them with a leading dot. Open full guide → PowerShell Get-Aclgetfacl file Show ACL permissions Displays POSIX ACLs where ACL support is enabled. Open full guide → PowerShell Set-Aclsetfacl -m u:USER:rw file Set ACL permissions Modifies POSIX ACL entries for users or groups. Open full guide → icacls filegetfacl file View file ACLs Shows detailed access-control entries. Open full guide → icacls /grantsetfacl -m u:USER:rwx file Grant ACL permissions Grants explicit permissions to a user. Open full guide → icacls /resetsetfacl -b file Reset ACL entries Removes extended ACL entries from a file. Open full guide → takeown /rsudo chown -R USER:GROUP path Take ownership recursively Changes owner and group recursively. Open full guide → sdelete fileshred -u file Secure-delete a file Overwrites and removes a file when secure deletion is appropriate. Open full guide → compcmp file1 file2 Compare binary files Compares files byte-for-byte and reports the first difference. Open full guide → fc /bcmp file1 file2 Binary file compare Compares two files as binary data. Open full guide → tar.exe -tftar -tf archive.tar List tar archive contents Lists files inside a tar archive without extracting it. Open full guide → unzip -l on Windowsunzip -l archive.zip List zip archive contents Lists files in a zip without extracting them. Open full guide → zip recursive folderzip -r archive.zip folder Create recursive zip Compresses a folder tree into a zip file. Open full guide → gzip filegzip -k file Compress with gzip Creates a .gz file while optionally keeping the original. Open full guide → xz filexz -T0 file Compress with xz Creates a high-compression .xz file using available CPU threads. Open full guide → expand cabinet filecabextract file.cab Extract CAB archive Extracts Microsoft cabinet archives on Linux. Open full guide → findstr /sgrep -R "pattern" path/ Search recursively Searches files under a directory tree. Open full guide → findstr /igrep -i "pattern" file Case-insensitive search Matches text without case sensitivity. Open full guide → findstr /ngrep -n "pattern" file Show matching line numbers Prints line numbers beside matches. Open full guide → findstr /cgrep -F "literal text" file Search literal string Searches fixed text instead of regex syntax. Open full guide → findstr /bgrep "^pattern" file Match beginning of line Uses a regex anchor to match the start of lines. Open full guide → findstr /egrep "pattern$" file Match end of line Uses a regex anchor to match line endings. Open full guide → Select-String -NotMatchgrep -v "pattern" file Invert text search Prints lines that do not match a pattern. Open full guide → PowerShell Get-Content -Headhead -n 20 file Show first lines Prints the beginning of a file. Open full guide → PowerShell Get-Content -Tailtail -n 20 file Show last lines Prints the end of a file. Open full guide → PowerShell Select-Object -Firsthead -n 10 Keep first records Limits pipeline output to the first records. Open full guide → PowerShell Select-Object -Lasttail -n 10 Keep last records Limits pipeline output to the last records. Open full guide → PowerShell Select-Object -Uniquesort -u Keep unique records Sorts and removes duplicate lines. Open full guide → PowerShell Group-Objectsort | uniq -c Group and count records Groups identical lines and counts occurrences. Open full guide → PowerShell -replacesed "s/old/new/g" file Replace text with regex Performs stream text substitution. Open full guide → PowerShell Format-Tablecolumn -t Align tabular text Formats delimited text into aligned columns. Open full guide → sort /rsort -r file Reverse sort Sorts lines in reverse order. Open full guide → sort /+Nsort -k N file Sort by field Sorts text using a field key. Open full guide → Get-Uniqueuniq Remove adjacent duplicates Filters repeated neighboring lines. Open full guide → fc /ndiff -u file1 file2 Compare text with context Shows unified differences between text files. Open full guide → PowerShell Compare-Object -IncludeEqualcomm file1 file2 Compare sorted files Compares sorted files and can show common lines. Open full guide → certutil -encodebase64 file Base64 encode a file Encodes binary data as base64 text. Open full guide → certutil -decodebase64 -d file.b64 Base64 decode a file Decodes base64 text back to binary data. Open full guide → PowerShell ConvertFrom-Csvmlr --icsv cat file.csv Read CSV records Processes CSV as structured records with Miller when installed. Open full guide → PowerShell Export-Csvmlr --ocsv cat > file.csv Write CSV records Writes structured records as CSV with Miller when installed. Open full guide → PowerShell ConvertFrom-Json object fieldjq ".field" file.json Read JSON field Extracts a field from JSON. Open full guide → PowerShell ConvertTo-Json compactjq -c . file.json Compact JSON Prints compact one-line JSON. Open full guide → hexdump in PowerShell Format-Hexxxd file Hex dump a file Displays binary files as hexadecimal bytes. Open full guide → PowerShell Format-Hexhexdump -C file Canonical hex dump Shows offsets, hex bytes and printable text. Open full guide → strings.exestrings file Extract printable strings Prints readable strings from binary files. Open full guide → PowerShell Out-Stringcat Emit text stream Passes file or command text through stdout. Open full guide → PowerShell Out-GridViewfzf Interactive filtering Uses fuzzy finder for interactive terminal filtering. Open full guide → PowerShell Select-Object propertyawk "{print $1}" Select fields Prints selected fields from structured text. Open full guide → PowerShell ForEach-Object splitcut -d: -f1 Cut delimited fields Extracts fields from delimiter-separated lines. Open full guide → paste filespaste file1 file2 Merge lines side by side Combines corresponding lines from multiple files. Open full guide → join filesjoin file1 file2 Join sorted files Joins lines from two sorted files on a common field. Open full guide → split large filesplit -b 100M file part_ Split a large file Splits a file into fixed-size chunks. Open full guide → PowerShell Get-Random linesshuf file Shuffle lines Randomizes the order of lines. Open full guide → nl filenl -ba file Number lines Adds line numbers to file output. Open full guide → fold long linesfold -w 80 file Wrap long lines Wraps long text lines to a target width. Open full guide → expand tabsexpand -t 4 file Convert tabs to spaces Expands tab characters into spaces. Open full guide → unexpand spacesunexpand -t 4 file Convert spaces to tabs Converts leading spaces back into tabs. Open full guide → ipconfig /allip addr && nmcli device show Show full network configuration Displays addresses, interfaces, DNS and connection details. Open full guide → ipconfig /displaydnsresolvectl statistics Inspect DNS resolver cache status Shows resolver/cache statistics on systemd-resolved systems. Open full guide → netsh interface ipv4 show dnsserversnmcli device show | grep DNS Show DNS servers Displays DNS servers assigned to active network devices. Open full guide → netsh interface ipv4 set dnsnmcli con mod "CONNECTION" ipv4.dns "1.1.1.1 8.8.8.8" Set DNS servers Configures DNS servers for a NetworkManager connection. Open full guide → netsh wlan show profile key=clearnmcli connection show "SSID" --show-secrets Show saved Wi-Fi profile Shows saved Wi-Fi connection details and secrets when permitted. Open full guide → netsh wlan connectnmcli device wifi connect "SSID" password "PASSWORD" Connect to Wi-Fi Connects to a wireless network from the terminal. Open full guide → netsh wlan delete profilenmcli connection delete "SSID" Delete saved Wi-Fi profile Removes a saved NetworkManager connection profile. Open full guide → netsh wlan export profilenmcli connection export "SSID" Export connection profile Exports a NetworkManager connection profile. Open full guide → netsh wlan add profilenmcli connection import type wifi file profile.nmconnection Import connection profile Imports a NetworkManager connection profile. Open full guide → arp -dsudo ip neigh flush all Clear ARP/neighbor cache Flushes the neighbor table. Open full guide → arp -ssudo ip neigh add IP lladdr MAC dev IFACE Add static neighbor entry Adds a static IP-to-MAC neighbor mapping. Open full guide → route addsudo ip route add 10.0.0.0/24 via 192.168.1.1 Add route Adds a route to the kernel routing table. Open full guide → route deletesudo ip route del 10.0.0.0/24 Delete route Removes a route from the kernel routing table. Open full guide → route changesudo ip route replace 10.0.0.0/24 via 192.168.1.254 Replace route Changes a route atomically by replacing it. Open full guide → netstat -anoss -tunlp Show listening ports and processes Lists TCP/UDP sockets with process information. Open full guide → netstat -absudo ss -tulpn Show programs using ports Shows listening sockets and process names with privileges. Open full guide → netstat -rnip route Show routing table Prints routes in the kernel routing table. Open full guide → netstat -sss -s Show socket statistics Summarizes TCP/UDP socket state counts. Open full guide → PowerShell Get-NetTCPConnectionss -tuna List TCP connections Lists active TCP sockets and states. Open full guide → PowerShell Get-NetIPAddressip addr show List IP addresses Shows IP addresses assigned to network interfaces. Open full guide → PowerShell Get-NetAdapterip link show List network adapters Shows network interfaces and link state. Open full guide → PowerShell Get-DnsClientServerAddressresolvectl dns Show resolver DNS servers Prints DNS servers known to systemd-resolved. Open full guide → PowerShell Set-DnsClientServerAddressnmcli con mod "CONNECTION" ipv4.dns "1.1.1.1" Set DNS resolver Sets DNS servers on a NetworkManager connection. Open full guide → Resolve-DnsName -Type TXTdig TXT example.com Query TXT records Looks up TXT DNS records. Open full guide → Resolve-DnsName -Type MXdig MX example.com Query MX records Looks up mail-exchanger DNS records. Open full guide → PowerShell Test-Connectionping host Send ICMP echo requests Tests reachability with ICMP pings. Open full guide → Test-NetConnection -Portnc -vz host 443 Test TCP port Checks whether a TCP port accepts connections. Open full guide → Test-NetConnection -TraceRoutetraceroute host Trace network route Shows hop-by-hop path to a target. Open full guide → portqrync -vz host port Query TCP port Tests if a remote TCP port is reachable. Open full guide → curl.exe -Lcurl -L URL Follow redirects Downloads or requests a URL while following redirects. Open full guide → curl.exe -ocurl -L -o file URL Download URL to file Saves an HTTP response to a local file. Open full guide → Invoke-WebRequest -OutFilecurl -L -o file URL Download web file Downloads a URL to a specific output file. Open full guide → curl.exe headerscurl -I URL Show HTTP headers Requests only HTTP response headers. Open full guide → openssl TLS testopenssl s_client -connect host:443 -servername host Inspect TLS connection Connects to a TLS service and prints certificate details. Open full guide → pktmon startsudo tcpdump -i any Capture packets Captures packets on all interfaces. Open full guide → pktmon stoppkill tcpdump Stop packet capture Stops a running tcpdump process. Open full guide → nbtstat -Anmblookup -A IP Query NetBIOS name table Looks up NetBIOS names for a host. Open full guide → net view \serversmbclient -L //server -U user List SMB shares Lists shares exposed by an SMB server. Open full guide → net use Z: \server\sharesudo mount -t cifs //server/share /mnt/share -o username=user Mount SMB share Mounts a Windows/Samba share into the Linux filesystem. Open full guide → net use Z: /deletesudo umount /mnt/share Unmount SMB share Unmounts a mounted SMB/CIFS share. Open full guide → net sharenet usershare list List Samba user shares Lists Samba user shares on Linux. Open full guide → mstscxfreerdp /v:HOST /u:USER Remote desktop client Connects to an RDP server from Linux. Open full guide → tasklist /svcps -eo pid,comm,args List processes and services Shows processes with command names and arguments. Open full guide → tasklist /vps auxww Verbose process list Shows detailed process information without truncating commands. Open full guide → tasklist /fi imagenamepgrep -a PROCESS Filter process list Finds running processes matching a name. Open full guide → taskkill /f /impkill -9 PROCESS Force-kill process by name Terminates matching processes with SIGKILL. Open full guide → taskkill /pid /tpkill -TERM -P PID Kill child processes Signals child processes under a parent PID. Open full guide → wmic process call createnohup command >/tmp/command.log 2>&1 & Start detached process Starts a process that survives terminal logout. Open full guide → start commandcommand & Start background process Runs a command in the background. Open full guide → start /affinitytaskset -c 0,1 command Run process on CPU cores Sets CPU affinity for a command. Open full guide → start /realtimesudo chrt -f 99 command Run with real-time priority Starts a command with real-time scheduler priority. Open full guide → wmic process get commandlineps -p PID -o args= Show process command line Displays the full command used to start a process. Open full guide → PowerShell Get-Process -Idps -p PID -f Show process by PID Shows details for one process ID. Open full guide → PowerShell Wait-Processtail --pid=PID -f /dev/null Wait for process exit Blocks until a process exits. Open full guide → Get-Countervmstat 1 Show live system counters Prints live CPU, memory and IO counters. Open full guide → resmonbtop Interactive resource monitor Opens an interactive process and resource monitor. Open full guide → procdumpcoredumpctl dump PID Dump process core Retrieves a coredump for debugging where coredumpd is active. Open full guide → handle.exelsof file Show process using file Lists processes with an open handle to a file. Open full guide → listdllspmap PID Show process memory mappings Shows mapped libraries and memory regions for a process. Open full guide → sc startsudo systemctl start SERVICE Start service Starts a systemd service. Open full guide → sc stopsudo systemctl stop SERVICE Stop service Stops a systemd service. Open full guide → sc restart equivalentsudo systemctl restart SERVICE Restart service Restarts a systemd service. Open full guide → sc qcsystemctl cat SERVICE Show service configuration Prints a systemd unit file and drop-ins. Open full guide → sc configsudo systemctl edit SERVICE Edit service override Creates or edits a systemd override file. Open full guide → sc failuresudo systemctl edit SERVICE Configure service restart policy Sets Restart= behavior in a systemd override. Open full guide → sc query state= allsystemctl list-units --type=service --all List all services Lists loaded active and inactive services. Open full guide → net start servicesudo systemctl start SERVICE Start named service Starts a system service. Open full guide → net stop servicesudo systemctl stop SERVICE Stop named service Stops a system service. Open full guide → services.msc startup type disabledsudo systemctl disable --now SERVICE Disable startup service Stops a service now and prevents future autostart. Open full guide → system event log filterjournalctl -p warning..alert Show warning and error logs Filters system logs by priority. Open full guide → Event Viewer current bootjournalctl -b Show current boot logs Prints journal entries for the current boot. Open full guide → Event Viewer follow logjournalctl -f Follow system logs Streams new journal entries live. Open full guide → Event Viewer service logjournalctl -u SERVICE -f Follow service logs Streams logs for a specific systemd service. Open full guide → schtasks /querysystemctl list-timers --all List scheduled tasks Lists systemd timers and their next run times. Open full guide → schtasks /createsystemd-run --on-calendar="*-*-* 02:00" command Create scheduled task Creates a transient scheduled systemd job. Open full guide → schtasks /deletesystemctl disable --now TIMER.timer Disable scheduled task Stops and disables a timer unit. Open full guide → shutdown /r /t 0sudo reboot Restart computer Reboots the system immediately. Open full guide → shutdown /s /t 0sudo poweroff Shut down computer Powers off the system immediately. Open full guide → shutdown /asudo shutdown -c Cancel shutdown Cancels a pending shutdown request. Open full guide → net user username /deletesudo userdel -r username Delete user account Removes a local user and optionally their home directory. Open full guide → net localgroup group /addsudo groupadd group Create group Creates a local Unix group. Open full guide → net localgroup group user /deletesudo gpasswd -d user group Remove user from group Deletes a user membership from a group. Open full guide → net user username passwordsudo passwd username Change user password Sets or changes a local user password. Open full guide → net user username /expiressudo chage -E YYYY-MM-DD username Set account expiry Sets an expiration date for a user account. Open full guide → net accounts /maxpwagesudo chage -M DAYS username Set password maximum age Configures password aging for a local account. Open full guide → whoami /allid && sudo -l Show identity and privileges Shows user/group IDs and sudo privileges. Open full guide → whoami /userid -un Show current username Prints the current user name. Open full guide → whoami /groupsid Show group memberships Shows current user and group IDs. Open full guide → whoami /privsudo -l Show elevated privileges Lists allowed sudo commands for the current user. Open full guide → auditpol /getsudo auditctl -s Show audit status Displays Linux audit subsystem status. Open full guide → auditpol /setsudo auditctl -w /path -p wa -k KEY Add audit watch Creates an audit rule for file writes/attribute changes. Open full guide → secpol.msc password policychage -l username Inspect password aging Shows password-aging settings for a user. Open full guide → certmgr.msctrust list List trusted certificates Lists trusted certificate anchors where p11-kit trust is used. Open full guide → certutil -verifyopenssl verify -CAfile ca.pem cert.pem Verify certificate Checks a certificate against a CA file. Open full guide → cipher /egpg -c file Encrypt file symmetrically Encrypts a file with a passphrase using GnuPG. Open full guide → cipher /dgpg -d file.gpg > file Decrypt file Decrypts a GPG-encrypted file. Open full guide → manage-bde -statussudo cryptsetup status mapper_name Check encrypted volume Shows status for a LUKS mapping. Open full guide → manage-bde -unlocksudo cryptsetup open /dev/sdXn mapper_name Unlock encrypted volume Opens a LUKS encrypted block device. Open full guide → manage-bde -locksudo cryptsetup close mapper_name Lock encrypted volume Closes a LUKS encrypted mapping. Open full guide → ssh-keygen on Windowsssh-keygen -t ed25519 -C "you@example.com" Create SSH key Generates an Ed25519 SSH key pair. Open full guide → ssh-add on Windowsssh-add ~/.ssh/id_ed25519 Load SSH key into agent Adds a private key to the SSH authentication agent. Open full guide → Get-AuthenticodeSignaturegpg --verify file.sig file Verify file signature Verifies a detached GPG signature. Open full guide → sigcheckdebsums Verify installed package files Checks installed files against package checksums. Open full guide → netsh advfirewall show allprofilessudo Show firewall status Displays firewall state and active rules. Open full guide → netsh advfirewall firewall add rulesudo Add firewall allow rule Allows inbound traffic to a port. Open full guide → netsh advfirewall set allprofiles state offsudo Disable firewall Disables the firewall frontend. Open full guide → wf.mscgufw Open graphical firewall Opens a graphical firewall frontend when installed. Open full guide → chmod numeric modechmod 755 file Set numeric permissions Sets Unix permissions using octal mode. Open full guide → chmod symbolic modechmod u+x script.sh Set symbolic permissions Adds or removes permission bits symbolically. Open full guide → chgrpsudo chgrp group file Change file group Changes group ownership. Open full guide → umaskumask 027 Set default permissions mask Controls default permissions for newly created files. Open full guide → visudosudo visudo Safely edit sudoers Edits sudo policy with syntax checking. Open full guide → passwd -lsudo passwd -l username Lock password login Locks a user password. Open full guide → passwd -usudo passwd -u username Unlock password login Unlocks a user password. Open full guide → getcapgetcap -r / 2>/dev/null List file capabilities Shows Linux file capabilities. Open full guide → setcapsudo setcap cap_net_bind_service=+ep /path/to/bin Grant file capability Gives a binary a specific kernel capability. Open full guide → veruname -r Show kernel version Prints the running Linux kernel release. Open full guide → tzutil /gtimedatectl show --property=Timezone --value Show timezone Prints the configured system timezone. Open full guide → tzutil /ssudo timedatectl set-timezone Region/City Set timezone Changes the system timezone. Open full guide → control timedate.cpltimedatectl Show time settings Displays time, timezone and NTP sync settings. Open full guide → intl.cpllocalectl status Show locale settings Displays system locale and keyboard settings. Open full guide → PowerShell Set-TimeZonesudo timedatectl set-timezone Region/City Set timezone from shell Changes system timezone from the terminal. Open full guide → sfc /scannowdebsums Verify system package files Checks installed package files against package metadata. Open full guide → DISM RestoreHealthsudo Reinstall damaged package files Linux repair usually means verifying and reinstalling affected packages. Open full guide → driverquerylspci -k Show hardware drivers Lists PCI devices and active kernel drivers. Open full guide → pnputil /enum-driverslsmod List loaded drivers/modules Lists loaded Linux kernel modules. Open full guide → pnputil /disable-devicesudo modprobe -r MODULE Unload driver module Removes a kernel module when possible. Open full guide → powercfg /acat /sys/power/state Show supported sleep states Lists sleep states exposed by the kernel. Open full guide → powercfg /energysudo powertop Analyze power usage Opens a power diagnostics tool. Open full guide → powercfg /hibernate offsudo systemctl mask hibernate.target hybrid-sleep.target Disable hibernation targets Masks hibernate-related systemd targets. Open full guide → bcdedit /enumbootctl Show boot configuration Shows systemd-boot status where systemd-boot is used. Open full guide → bcdedit /set defaultsudo grub-set-default 0 Set default boot entry Sets the default GRUB boot entry. Open full guide → msconfig bootsystemctl get-default Show default boot target Shows the default systemd target. Open full guide → msconfig safe bootsudo systemctl set-default rescue.target Set rescue target Configures boot into rescue mode. Open full guide → wmic logicaldisk get sizedf -h Show disk free space Displays filesystem usage in human-readable units. Open full guide → fsutil fsinfo driveslsblk List block devices Lists disks, partitions and block devices. Open full guide → fsutil fsinfo volumeinfofindmnt -no SOURCE,FSTYPE,OPTIONS / Show mounted volume info Shows source device, filesystem and mount options. Open full guide → mountvol /lfindmnt List mounted filesystems Lists current mount points. Open full guide → diskpart list disklsblk -d -o NAME,SIZE,MODEL List physical disks Shows disk devices and models. Open full guide → diskpart list volumelsblk -f List volumes/filesystems Shows partitions with filesystems and UUIDs. Open full guide → diskpart assign lettersudo mount /dev/sdXn /mnt Mount filesystem Mounts a filesystem at a directory. Open full guide → diskpart remove lettersudo umount /mnt Unmount filesystem Unmounts a mounted filesystem. Open full guide → defrag /Lsudo fstrim -av Trim SSD filesystems Runs discard/TRIM on mounted filesystems that support it. Open full guide → winsat diskfio --name=test --filename=testfile --size=1G --rw=readwrite Benchmark disk Runs a configurable disk benchmark with fio. Open full guide → wmic diskdrive get modellsblk -d -o NAME,MODEL,SIZE Show disk model Prints disk model and size. Open full guide → chkdsk /fsudo fsck -f /dev/sdXn Force filesystem check Checks and repairs a filesystem while unmounted. Open full guide → chkdsk /rsudo badblocks -sv /dev/sdX Scan for bad blocks Scans a block device for bad sectors. Open full guide → format /qsudo mkfs.ext4 -F /dev/sdXn Quick format filesystem Creates a new filesystem on a partition. Open full guide → cipher /w free spacesudo zerofree /dev/sdXn Zero free space Zeros unused blocks on a supported unmounted filesystem. Open full guide → systeminfo CPUlscpu Show CPU details Displays CPU architecture, cores and flags. Open full guide → systeminfo memoryfree -h Show memory usage Shows RAM and swap usage. Open full guide → wmic memorychip capacitysudo dmidecode -t memory Show memory modules Displays DIMM slot and module information. Open full guide → dxdiag displayglxinfo -B Show graphics renderer Displays OpenGL renderer and driver information. Open full guide → Reliability Monitorjournalctl -p err -b Show current boot errors Lists error-level log entries for current boot. Open full guide → winget showapt Show package details Displays repository package metadata. Open full guide → winget source listgrep List package sources Lists configured package repositories. Open full guide → winget source resetsudo Refresh package metadata Refreshes package repository metadata. Open full guide → winget exportapt-mark Export installed package list Saves a list of manually installed packages. Open full guide → winget importxargs Install packages from list Installs packages from a saved package list. Open full guide → winget pin addsudo Hold package version Prevents a package from being upgraded automatically. Open full guide → winget pin removesudo Remove package hold Allows a package to upgrade again. Open full guide → choco installsudo Install package Installs software from distro repositories. Open full guide → choco upgrade allsudo Upgrade all packages Updates the installed system packages. Open full guide → choco list --local-onlyapt List installed packages Shows installed packages. Open full guide → choco infoapt Show package info Shows package metadata from repositories. Open full guide → choco uninstallsudo Uninstall package Removes an installed package. Open full guide → Programs and Features listapt List installed software Lists packages installed through the system package manager. Open full guide → Programs and Features uninstallsudo Remove installed software Uninstalls software managed by the package manager. Open full guide → msiexec repairsudo Repair installed package Reinstalls package files from the repository. Open full guide → msiexec quiet installsudo Non-interactive install Installs package without interactive prompts where supported. Open full guide → dpkg list files equivalentdpkg List package files Shows files installed by a package. Open full guide → find package owning filedpkg Find owner package Finds which package installed a file. Open full guide → show package dependenciesapt-cache Show package dependencies Displays direct package dependencies. Open full guide → remove unused dependenciessudo Remove orphaned dependencies Cleans packages installed only as dependencies. Open full guide → clean package cachesudo Clean package cache Deletes downloaded package cache files. Open full guide → list package updatesapt List available upgrades Shows packages that can be upgraded. Open full guide → install local package filesudo Install local package file Installs a downloaded local package file. Open full guide → install Flatpak appflatpak install flathub APP_ID Install Flatpak app Installs a sandboxed desktop application from Flathub. Open full guide → update Flatpak appsflatpak update Update Flatpak apps Updates installed Flatpak applications. Open full guide → list Flatpak appsflatpak list List Flatpak apps Lists installed Flatpak applications. Open full guide → remove Flatpak appflatpak uninstall APP_ID Remove Flatpak app Uninstalls a Flatpak application. Open full guide → snap installsudo Install Snap package Installs software from Snap Store where snapd is enabled. Open full guide → snap listsnap list List Snap packages Lists installed Snap packages. Open full guide → snap removesudo snap remove PACKAGE Remove Snap package Uninstalls a Snap package. Open full guide → help commandman command Open command manual Shows the manual page for a command. Open full guide → command /?command --help Show command help Prints built-in command help when supported. Open full guide → where /rfind /path -name "name" Search recursively for file Finds files by name under a directory tree. Open full guide → colorprintf "\033[32mgreen\033[0m\n" Print colored terminal text Uses ANSI escape sequences for terminal color. Open full guide → promptexport PS1="\u@\h:\w\$ " Set shell prompt Changes the shell prompt format. Open full guide → chcplocale charmap Show terminal encoding Displays the active character encoding. Open full guide → mode constty -a Show terminal settings Displays terminal line discipline settings. Open full guide → doskey /macrosalias List shell aliases Lists defined aliases. Open full guide → doskey macro=valuealias name="command" Create command alias Creates a temporary shell alias. Open full guide → %USERNAME%echo "$USER" Show username variable Prints the current username environment variable. Open full guide → %USERPROFILE%echo "$HOME" Show home directory variable Prints the current user home directory. Open full guide → %TEMP%echo "${TMPDIR:-/tmp}" Show temp directory Prints the temporary directory path. Open full guide → setx PATHecho "export PATH="$PATH:/new/path"" >> ~/.bashrc Persist PATH change Adds a PATH modification to a shell startup file. Open full guide → call script.batsource script.sh Run script in current shell Sources a shell script so it can modify current shell state. Open full guide → start cmd /cbash -c "command" Run command string Executes a command through Bash. Open full guide → choiceread -r -p "Continue? [y/N] " answer Prompt for choice Reads an interactive answer from the user. Open full guide → timeout /nobreaksleep 10 Wait for seconds Pauses script execution for a number of seconds. Open full guide → for /rfind . -type f -exec command {} \; Loop files recursively Runs a command for each matching file under a tree. Open full guide → forfilesfind . -mtime +7 -exec rm {} \; Run command on matched files Finds files by criteria and runs a command on them. Open full guide → dir | findcommand | grep "pattern" Pipe output to search Sends command output to a text filter. Open full guide → && operatorcommand1 && command2 Run next command on success Runs the second command only if the first succeeds. Open full guide → || operatorcommand1 || command2 Run fallback command Runs the second command only if the first fails. Open full guide → > redirectioncommand > file Redirect stdout Writes command output to a file. Open full guide → 2> redirectioncommand 2> errors.log Redirect stderr Writes error output to a file. Open full guide → 2>&1 redirectioncommand > all.log 2>&1 Merge stdout and stderr Writes normal and error output to the same file. Open full guide → & command separatorcommand1; command2 Run commands sequentially Runs commands one after another regardless of success. Open full guide → %1 batch argumentecho "$1" First script argument Reads the first positional parameter in a shell script. Open full guide → %* batch argumentsprintf "%s\n" "$@" All script arguments Expands all positional arguments safely. Open full guide → %~dp0 script directorycd "$(dirname "$0")" Script directory Changes to the directory containing the script. Open full guide → PowerShell Get-Commandcommand -v name Find command path Checks whether a command exists and where it resolves. Open full guide → PowerShell Get-Helpman command Read command help Opens the manual page for a command. Open full guide → PowerShell Get-Datedate Show date and time Prints current date and time. Open full guide → PowerShell Get-Randomshuf -i 1-100 -n 1 Generate random number Prints a random number from a range. Open full guide → PowerShell Get-ComputerInfohostnamectl && uname -a Show computer information Shows host, OS and kernel details. Open full guide → PowerShell Clear-Historyhistory -c Clear shell history Clears the current shell history list. Open full guide → PowerShell $env:PATHecho "$PATH" Show PATH variable Prints the executable search path. Open full guide → PowerShell $env:USERPROFILEecho "$HOME" Show home directory Prints the Linux home directory variable. Open full guide → PowerShell New-TemporaryFilemktemp Create temp file Creates a safely named temporary file. Open full guide → PowerShell Start-Sleepsleep 5 Pause execution Sleeps for a number of seconds. Open full guide → PowerShell Read-Hostread -r variable Read user input Reads a line of input from the terminal. Open full guide → PowerShell Write-Hostprintf "%s\n" "text" Print text Writes text to standard output. Open full guide → PowerShell Start-Jobcommand & Start background job Runs a command in the background. Open full guide → PowerShell Get-Jobjobs List shell jobs Lists background jobs in the current shell. Open full guide → PowerShell Receive-Jobwait %1 Wait for background job Waits for a background job to complete. Open full guide → PowerShell Stop-Jobkill %1 Stop background job Stops a shell background job. Open full guide → PowerShell Invoke-RestMethodcurl -s URL | jq . Call JSON API Fetches an API response and parses JSON. Open full guide → PowerShell New-Guiduuidgen Generate UUID Creates a new UUID/GUID. Open full guide → PowerShell Test-Jsonjq empty file.json Validate JSON Checks that JSON parses successfully. Open full guide → PowerShell Compress-Archive folderzip -r archive.zip folder Compress folder Creates a zip archive from a directory tree. Open full guide → PowerShell Expand-Archive fileunzip archive.zip Extract zip archive Extracts a zip archive. Open full guide → git status on Windowsgit status Show Git working tree status Shows changed, staged and untracked files in a repository. Open full guide → git clone on Windowsgit clone URL Clone Git repository Downloads a repository into a new local directory. Open full guide → git add on Windowsgit add path Stage changes Stages file changes for the next commit. Open full guide → git commit on Windowsgit commit -m "message" Create Git commit Records staged changes in repository history. Open full guide → git push on Windowsgit push Push Git commits Uploads local commits to the configured remote. Open full guide → git pull on Windowsgit pull --ff-only Pull Git changes Fetches and fast-forwards from the remote branch. Open full guide → git log on Windowsgit log --oneline --graph --decorate Show Git history Displays compact commit history. Open full guide → git diff on Windowsgit diff Show unstaged Git changes Displays line changes not yet staged. Open full guide → git branch on Windowsgit branch -a List Git branches Lists local and remote branches. Open full guide → git switch on Windowsgit switch BRANCH Switch Git branch Moves the working tree to another branch. Open full guide → git stash on Windowsgit stash push -m "work in progress" Stash Git changes Temporarily shelves uncommitted changes. Open full guide → git remote on Windowsgit remote -v Show Git remotes Lists configured repository remotes. Open full guide → Visual Studio build tools makemake Run Makefile build Executes build rules from a Makefile. Open full guide → MSBuild equivalent simple projectcmake --build build Build CMake project Builds an already configured CMake build directory. Open full guide → cmake configure on Windowscmake -S . -B build Configure CMake project Generates build files in a separate build directory. Open full guide → ninja build on Windowsninja -C build Run Ninja build Builds a project with Ninja. Open full guide → cl.exe compile Cgcc main.c -o app Compile C program Compiles a C source file into an executable. Open full guide → where pythonpython3 --version Check Python version Prints the installed Python version. Open full guide → py -m venvpython3 -m venv .venv Create Python virtual environment Creates an isolated Python environment. Open full guide → pip install on Windowspython3 -m pip install PACKAGE Install Python package Installs a Python package into the active environment. Open full guide → pip freeze on Windowspython3 -m pip freeze List Python packages Prints installed Python packages and versions. Open full guide → pipx install on Windowspipx install PACKAGE Install Python CLI app Installs a Python command-line app in an isolated environment. Open full guide → node --version on Windowsnode --version Check Node.js version Prints Node.js version. Open full guide → npm install on Windowsnpm install Install project dependencies Installs dependencies from package.json. Open full guide → npm install -g on Windowsnpm install -g PACKAGE Install global npm package Installs a global Node.js CLI package. Open full guide → npx on Windowsnpx PACKAGE Run npm package command Runs an npm package binary without permanent global install. Open full guide → go version on Windowsgo version Check Go version Prints Go toolchain version. Open full guide → go build on Windowsgo build ./... Build Go packages Builds Go packages in the current module. Open full guide → go test on Windowsgo test ./... Run Go tests Runs Go tests recursively. Open full guide → cargo version on Windowscargo --version Check Cargo version Prints Rust Cargo version. Open full guide → cargo build on Windowscargo build Build Rust project Builds a Rust package. Open full guide → cargo test on Windowscargo test Run Rust tests Runs Rust project tests. Open full guide → java -version on Windowsjava -version Check Java runtime Prints Java runtime version. Open full guide → javac on Windowsjavac Main.java Compile Java source Compiles a Java source file. Open full guide → mvn test on Windowsmvn test Run Maven tests Runs test phase for a Maven project. Open full guide → gradle build on Windowsgradle build Build Gradle project Runs a Gradle build. Open full guide → code . on Windowscode . Open VS Code in folder Opens the current folder in VS Code when installed. Open full guide → notepad source filenano file Edit text file in terminal Opens a text file in a terminal editor. Open full guide → Docker Desktop docker psdocker List running containers Lists currently running Docker containers. Open full guide → Docker Desktop docker imagesdocker List container images Lists local Docker images. Open full guide → Docker Desktop docker rundocker Run container Starts a container from an image. Open full guide → Docker Desktop docker execdocker Open shell in container Runs an interactive shell inside a running container. Open full guide → Docker Desktop docker logsdocker Follow container logs Streams logs from a container. Open full guide → Docker Desktop docker builddocker Build container image Builds an image from a Dockerfile. Open full guide → Docker Desktop docker pulldocker Pull container image Downloads an image from a registry. Open full guide → Docker Desktop docker compose updocker compose up -d Start Compose stack Starts services from a compose file in the background. Open full guide → Docker Desktop docker compose downdocker compose down Stop Compose stack Stops and removes Compose containers/network. Open full guide → Docker Desktop docker compose logsdocker compose logs -f Follow Compose logs Streams logs from Compose services. Open full guide → Docker Desktop docker volume lsdocker List Docker volumes Lists named Docker volumes. Open full guide → Docker Desktop docker network lsdocker List Docker networks Lists Docker networks. Open full guide → Docker Desktop system prunedocker Clean unused Docker data Removes unused containers, networks, images and cache. Open full guide → podman on Windowspodman ps List Podman containers Lists running Podman containers. Open full guide → podman run on Windowspodman run --rm IMAGE Run Podman container Runs a container with Podman. Open full guide → Hyper-V Get-VMvirsh list --all List virtual machines Lists libvirt virtual machines. Open full guide → Hyper-V Start-VMvirsh start VM Start virtual machine Starts a libvirt VM. Open full guide → Hyper-V Stop-VMvirsh shutdown VM Shutdown virtual machine Requests a graceful shutdown of a libvirt VM. Open full guide → Hyper-V checkpointvirsh snapshot-create-as VM SNAPSHOT Create VM snapshot Creates a libvirt VM snapshot. Open full guide → VBoxManage list vmsVBoxManage list vms List VirtualBox VMs Lists registered VirtualBox virtual machines. Open full guide → Device Manager PCI deviceslspci List PCI devices Lists PCI hardware such as GPUs, network cards and controllers. Open full guide → Device Manager USB deviceslsusb List USB devices Lists connected USB devices. Open full guide → Device Manager treelshw -short Show hardware tree Summarizes hardware devices and classes. Open full guide → pnputil loaded moduleslsmod List loaded kernel modules Shows currently loaded Linux kernel modules. Open full guide → driver detailsmodinfo MODULE Show kernel module info Displays metadata and parameters for a kernel module. Open full guide → enable driver modulesudo modprobe MODULE Load kernel module Loads a Linux kernel module. Open full guide → disable driver modulesudo modprobe -r MODULE Unload kernel module Removes a loaded kernel module when not in use. Open full guide → Device Manager eventsdmesg -w Follow kernel messages Streams kernel log messages live. Open full guide → Bluetooth settingsbluetoothctl Bluetooth control shell Pairs, trusts, connects and manages Bluetooth devices. Open full guide → airplane moderfkill list Show blocked radios Lists Wi-Fi and Bluetooth soft/hard block state. Open full guide → disable Wi-Fi radiosudo rfkill block wifi Block Wi-Fi radio Soft-blocks Wi-Fi devices. Open full guide → enable Wi-Fi radiosudo rfkill unblock wifi Unblock Wi-Fi radio Re-enables soft-blocked Wi-Fi devices. Open full guide → dxdiag GPUglxinfo -B Show OpenGL GPU info Shows renderer, vendor and OpenGL driver details. Open full guide → vulkaninfo on Windowsvulkaninfo --summary Show Vulkan info Summarizes Vulkan devices and driver capabilities. Open full guide → nvidia-smi on Windowsnvidia-smi Show NVIDIA GPU status Shows NVIDIA driver, GPU utilization and memory usage. Open full guide → Display Settings identifyxrandr --listmonitors List monitors on X11 Lists connected monitors in X11 sessions. Open full guide → Display Settings resolutionxrandr Show display modes on X11 Shows connected displays and available modes. Open full guide → Wayland monitor infokscreen-doctor -o Show KDE Wayland outputs Lists KDE display outputs and modes. Open full guide → sound settings deviceswpctl status Show PipeWire audio devices Lists PipeWire audio devices and streams. Open full guide → volume mixerpavucontrol Open PulseAudio/PipeWire mixer Opens a graphical audio mixer. Open full guide → printer settingslpstat -p -d Show printers Lists configured CUPS printers and default printer. Open full guide → add printer driversudo lpadmin -p PRINTER -E -v URI -m everywhere Add IPP printer Adds a modern driverless IPP printer. Open full guide → Device Manager udev infoudevadm info --query=all --name=/dev/DEVICE Show udev device info Displays udev properties for a device node. Open full guide → refresh udev rulessudo udevadm control --reload-rules && sudo udevadm trigger Reload udev rules Reloads and applies udev rules. Open full guide →

Getting started

How to use Windows commands on Linux

Search by the command you already know

Enter a Windows command such as ipconfig, tasklist or findstr. Win-Linux.com shows the closest Linux command and explains important behavioral differences.

Check your Linux distribution

Core shell tools are broadly available, but package managers and service commands can vary between Debian, Ubuntu, Fedora, Arch Linux and other distributions.

Review commands before running them

Paths, usernames, network interfaces and disk device names are examples. Commands using sudo, deletion, formatting or partitioning deserve extra verification.

Quick answers

Windows-to-Linux command FAQ

Are Linux commands case-sensitive?

Yes. Command names, options and file paths are generally case-sensitive. For example, Documents and documents can refer to different directories.

Do I need sudo for every command?

No. Use sudo only when a task requires administrator privileges, such as changing system files, managing services or installing system packages.

Will every command work on every Linux distribution?

Most standard shell commands work widely. Package-management, networking and service-management tools can differ, so each guide should be read in the context of your distribution.