DEV Community

Kanani Nirav
Kanani Nirav

Posted on

35 Windows Commands you NEED to know with examples and explanation

Here are 35 Windows Commands you NEED to know with example and explanation

  1. dir - Display a list of files and folders in a directory.

  2. cd - Change the current directory.

  3. copy - Copy one or more files to another location.

  4. del - Delete one or more files.

  5. type - Display the contents of a text file.

  6. ren - Rename a file or directory.

  7. rmdir - Remove an empty directory.

  8. md - Create a new directory.

  9. pushd - Change the current directory and push the current directory onto a stack.

  10. popd - Change the current directory to the topmost directory on the stack.

  11. netstat - Display active TCP connections and ports on which the computer is listening.

  12. ipconfig - Display the current TCP/IP configuration.

  13. ping - Test the connection to a remote host.

  14. tracert - Trace the route to a remote host.

  15. telnet - Connect to a remote host using the Telnet protocol.

  16. nslookup - Query DNS to resolve a hostname to an IP address or vice versa.

  17. tasklist - Display a list of currently running processes.

  18. taskkill - Terminate a running process.

  19. systeminfo - Display system information.

  20. driverquery - Display a list of installed device drivers.

  21. net - Manage network resources.

  22. netdom - Manage Active Directory domains and trusts.

    • Example: netdom join contoso / /userd:contoso\admin /passwordd:password
    • Explanation: This command will join the computer to the contoso domain using the contoso\admin user and password.
  23. sfc - Scan and repair system files.

  24. chkdsk - Check a disk for errors and repair them.

  25. diskpart - Manage disks, partitions, and volumes.

  26. bcdedit - Manage the boot configuration data store.

  27. bootrec - Repair the boot configuration data store.

    • Example: bootrec /fixboot
    • Explanation: This command will repair the boot configuration data store and write a new boot sector to the system partition.
  28. shutdown - Shut down the computer.

  29. logoff - Log off the current user.

  30. powercfg - Configure power options.

    • Example: powercfg /hibernate on
    • Explanation: This command will enable the hibernate feature.
  31. wmic - Execute Windows Management Instrumentation (WMI) commands.

  32. reg - Manage the registry.

  33. cmdkey - Manage stored user names and passwords.

  34. certutil - Manage certificates.

  35. schtasks - Schedule tasks to run at a specific time.

If You are using Medium Please support and follow me for interesting articles. Medium Profile

If this guide has been helpful to you and your team please share it with others!

Top comments (1)

thumbone profile image
Bernd Wechner

What's with the hyped headlines and lacking intros lately on

  1. I don't NEED to know these at all, sorry. Nice to skim a reminder I'd grant you, and the article I like, it's a nice neat summary of a lot of useful commands.

  2. What is a Windows Command? Put it into context. There's cmd.exe, powershell and increasingly WSL bash all available on windows (admittedly all these look like they'll work on cmd.exe or powershell). Still.