101 Windows CLI Command Shortcuts Every Beginner Must Know

Windows CLI Command Shortcuts

101 Windows CLI Command Shortcuts Every Beginner Must Know

In today’s digital world, knowing your way around the command-line interface (CLI) can be a valuable skill for any computer user, whether you’re a developer, system administrator, or just someone who wants to streamline their workflow. While graphical user interfaces (GUIs) are often preferred for their ease of use, the CLI provides a powerful way to interact with your computer, execute tasks, and manage files and directories quickly and efficiently.

If you’re new to Windows CLI, it can seem intimidating at first, with its text-based interface and long lists of commands and parameters. However, with a little practice and some knowledge of essential commands and shortcuts, you’ll be able to navigate the CLI with ease and perform tasks that would be difficult or impossible using the GUI.

In this blog post, we’ll introduce you to 101 Windows CLI command shortcuts that every beginner should know. We’ll cover a wide range of commands, from basic file management and navigation to network diagnostics and system configuration. By the end of this post, you’ll have a solid understanding of the Windows CLI and be well on your way to mastering this essential tool.

    1. cd – This command changes the current directory to the specified directory. Sample command: cd
      CD C:\Users\Username\Desktop
    2. cls – This command clears the command prompt screen. Sample command:
      cls
    3. ping – This command tests the connectivity between your computer and a remote host. It sends packets of data to the remote host and measures the response time. Sample command:
      ping google.com
    4. ipconfig – This command displays the IP address, subnet mask, and default gateway for all network adapters on your computer. Sample command:
      ipconfig
    5. netstat – This command displays active network connections and their status. It can also display statistics such as the number of packets sent and received. Sample command:
      netstat
    6. tasklist – This command displays a list of all running processes on your computer. It can also display additional information such as process ID, memory usage, and CPU usage. Sample command:
      tasklist
    7. taskkill – This command allows you to terminate a running process. You can specify the process name or process ID to be terminated. Sample command:
       taskkill /im notepad.exe
    8. mkdir – This command creates a new directory. You can specify the name and location of the new directory. Sample command:
      mkdir C:\Users\Username\Desktop\NewFolder
    9. del – This command deletes one or more files. You can specify the name and location of the file(s) to be deleted. Sample command:
       del C:\Users\Username\Desktop\OldFile.txt
    10. chkdsk – This command checks the file system and the status of the hard disk drive. It can identify and fix disk errors, bad sectors, and file system corruption. Sample command:
      chkdsk C:
    11. systeminfo – This command displays detailed information about your computer’s hardware, software, and system components. Sample command:
      systeminfo
    12. net user – This command allows you to manage user accounts on your computer. You can create, modify, or delete user accounts, as well as change passwords and group memberships. Sample command:
      net user John /add
    13. net share – This command displays a list of all shared folders on your computer. It can also allow you to create or delete shared folders and modify permissions. Sample command:
      net share SharedFolder=C:\Users\Username\Documents /grant:Everyone,FULL
    14. diskpart – This command allows you to manage disk partitions, volumes, and drives. You can create, delete, or resize partitions, as well as assign drive letters and format volumes. Sample command:
      diskpart
    15. robocopy – This command allows you to copy large amounts of files and directories with advanced options such as mirroring, multi-threading, and file verification. Sample command:
      robocopy C:\SourceFolder D:\DestinationFolder /mir
    16. schtasks – This command allows you to create, modify, or delete scheduled tasks on your computer. You can specify the task name, description, trigger, and action. Sample command:
      schtasks /create /tn "MyTask" /tr "C:\Program Files\MyApp\MyApp.exe" /sc daily /st 09:00
    17. tree – This command displays a hierarchical tree of all directories and subdirectories in the current directory. It can also display file sizes, attributes, and dates. Sample command:
      tree /f
    18. cipher – This command allows you to encrypt or decrypt files and folders on your computer. It can also wipe free space on your hard drive to securely delete deleted files. Sample command:
      cipher /e C:\SecretFolder
    19. netstat -ano – This command displays active network connections, their status, and the process ID (PID) of the associated process. It can help you identify which process is using a specific network port. Sample command:
       netstat -ano | findstr :80
    20. net view – This command displays a list of all computers on your network. It can also display shared resources and the status of the Computer Browser service. Sample command:
       net view
    21. net use – This command allows you to connect to shared resources on remote computers. You can specify the resource name, user name, and password. Sample command:
      net use \RemoteComputer\SharedFolder /user:John Password123
    22. diskmgmt.msc – This command opens the Disk Management console, which allows you to manage disks, partitions, and volumes on your computer. Sample command:
       diskmgmt.msc
    23. perfmon – This command opens the Performance Monitor console, which allows you to monitor system performance, resource usage, and event logs. Sample command:
      perfmon
    24. shutdown – This command allows you to shut down or restart your computer. You can specify the shutdown type, time, and reason. Sample command:
      shutdown /s /t 0
    25. regedit – This command opens the Registry Editor, which allows you to view, modify, and export registry keys and values. Note: Caution must be taken when editing registry keys as it can potentially harm the system. Sample command:
      regedit
    26. sc – This command allows you to manage Windows services on your computer. You can start, stop, pause, resume, and query services. Sample command:
      sc query W32Time
    27. chcp – This command allows you to change the active code page on your computer. It can help you display non-English characters correctly. Sample command:
       chcp 65001
    28. set – This command displays or modifies environment variables on your computer. It can be useful for managing system paths, file locations, and other settings. Sample command:
      set PATH=C:\Program Files\MyApp;%PATH%
    29. xcopy – This command allows you to copy files and directories with advanced options such as recursive copying, file filtering, and timestamp preservation. Sample command:
       xcopy C:\SourceFolder D:\DestinationFolder /s /e /h
    30. dism – This command allows you to manage Windows images and features on your computer. You can add, remove, or update features, drivers, and packages. Sample command:
      dism /online /enable-feature /featurename:IIS-WebServerRole
    31. sfc – This command allows you to scan and repair system files on your computer. It can identify and fix corrupted or missing files. Sample command:
      sfc /scannow
    32. taskmgr – This command opens the Task Manager, which allows you to manage running processes, services, and performance on your computer. Sample command:
      taskmgr
    33. wevtutil – This command allows you to manage event logs on your computer. You can query, export, or clear logs, as well as create or delete event sources. Sample command:
      wevtutil qe Application
    34. md – This command allows you to create a new directory or folder on your computer. You can specify the directory name and the parent directory. Sample command:
      md C:\MyFolder
    35. rd – This command allows you to remove a directory or folder on your computer. You can specify the directory name and the parent directory. Sample command:
      rd C:\MyFolder
    36. type – This command allows you to display the contents of a text file on your computer. You can specify the file name and the output format. Sample command:
      type C:\MyFile.txt
    37. netsh – This command allows you to manage network settings and configurations on your computer. You can configure interfaces, routing, firewalls, and wireless networks. Sample command:
      netsh interface ipv4 show addresses
    38. powercfg – This command allows you to manage power settings and energy usage on your computer. You can configure sleep, hibernate, and power plans. Sample command:
      powercfg /hibernate on
    39. subst – This command allows you to create a virtual drive or a drive alias on your computer. You can map a path to a drive letter for easier access. Sample command:
      subst X: C:\MyFolder
    40. doskey – This command allows you to create macros or shortcuts for frequently used commands on your computer. You can save time and reduce typing errors. Sample command:
      doskey mycmd=dir /w
    41. format – This command allows you to format a disk or a volume on your computer. You can specify the file system type, allocation unit size, and volume label. Sample command:
      format D: /fs:NTFS /v:DataDrive
    42. diskperf – This command allows you to enable or disable disk performance counters on your computer. It can help you monitor disk activity, throughput, and latency. Sample command:
      diskperf -y
    43. driverquery – This command displays a list of all installed device drivers on your computer. It can also display driver details such as name, version, and file location. Sample command:
      driverquery
    44. hostname – This command displays the name of the computer on which the command is executed. Sample command:
      hostname
    45. logoff – This command allows you to log off the current user from a remote computer. You can specify the computer name and user name. Sample command:
      logoff /server:RemoteComputer /user:John
    46. memtest – This command allows you to test your computer’s memory for errors. It can help you identify and troubleshoot memory-related issues. Sample command:
      memtest /C /V
    47. net localgroup – This command allows you to manage local groups on your computer. You can add or remove users, modify group membership, and view group properties. Sample command:
      net localgroup Administrators /add John
    48. compact – This command displays or alters the compression state of files and directories on NTFS partitions. Sample command:
      compact /c C:\Users\Username\Documents
    49. date – This command displays or sets the date on the system. Sample command:
      date
    50. find – This command searches for a specific string of text in one or more files. Sample command:
      find "password" C:\Users\Username\Documents*.txt
    51. help – This command displays Help information for Windows commands. Sample command:
      help dir
    52. ipconfig /renew – This command releases and renews the IP address of the specified network adapter. Sample command:
      ipconfig /renew
    53. move – This command moves one or more files from one location to another. Sample command:
      move C:\Users\Username\Documents\OldFile.txt D:\Backup
    54. net localgroup – This command allows you to manage local groups on your computer. You can add, remove, or modify group members. Sample command:
      net localgroup Administrators John /add
    55. netsh – This command allows you to configure and display network settings. Sample command:
      netsh interface ipv4 show addresses
    56. at – This command schedules commands and programs to run at a specified time and date. Sample command:
      at 12:30 /every:M,T,W,TH,F "notepad.exe"
    57. attrib – This command displays or modifies file attributes such as hidden, read-only, and archive. Sample command:
      attrib +h C:\SecretFolder
    58. break – This command allows you to enable or disable the extended Ctrl+C checking feature. Sample command:
      break on
    59. cacls – This command displays or modifies access control lists (ACLs) for files and directories. Sample command:
      cacls C:\SecretFolder /e /p John:F
    60. call – This command allows you to call a batch file from another batch file. Sample command:
      call anotherbatchfile.bat
    61. choice – This command allows you to prompt the user to make a choice between two options. Sample command:
      choice /c YN /m "Do you want to continue?"
    62. debug – This command allows you to test and edit assembly language programs. Sample command:
      debug myprogram.exe
    63. defrag – This command allows you to defragment and optimize the file system on a volume. Sample command:
      defrag C: /h /u /v
    64. diskuse – This command displays a graphical representation of disk space usage. Sample command:
      diskuse C:
    65. echo – This command displays messages or turns command echoing on or off. Sample command:
      echo Hello World
    66. endlocal – This command ends the localization of environment changes in a batch file. Sample command:
      endlocal
    67. eventcreate – This command allows you to create a custom event in the Windows event log. Sample command:
      eventcreate /t ERROR /id 100 /d "Disk space is low"
    68. expand – This command allows you to extract files from a compressed cabinet (.cab) file. Sample command:
      expand myarchive.cab -f:* C:\ExtractedFolder
    69. for – This command allows you to loop through a set of files, folders, or commands. Sample command:
      for /r C:\ %%G in (*.txt) do type "%%G"
    70. fsutil – This command allows
    71. bcdedit – This command allows you to view and modify boot configuration data. It can help you troubleshoot and repair boot-related problems. Sample command:
      bcdedit
    72. convert – This command allows you to convert the file system of a volume from FAT to NTFS. It can help you improve performance, security, and reliability. Sample command:
      convert C: /fs:ntfs
    73. fc – This command compares two files or sets of files and displays the differences between them. It can help you verify file integrity and synchronize data. Sample command:
      fc file1.txt file2.txt
    74. gpresult – This command displays the Resultant Set of Policy (RSoP) for a user or computer. It can help you diagnose Group Policy-related problems. Sample command:
      gpresult /r
    75. icacls – This command allows you to view and modify file and folder permissions. It can help you manage access control and security. Sample command:
      icacls C:\MyFolder /grant John:(OI)(CI)F
    76. mountvol – This command allows you to create, delete, or list volume mount points. It can help you manage storage and file access. Sample command:
      mountvol C:\MyFolder /d
    77. netdom – This command allows you to manage Active Directory domains and trusts. It can help you administer user accounts and computer objects. Sample command:
      netdom join MyComputer /domain:MyDomain /userd:John /passwordd:Password123
    78. openfiles – This command displays a list of all files that are opened remotely on a computer. It can help you identify and close files that are preventing system shutdown. Sample command:
      openfiles /query /s MyServer
    79. query – This command allows you to display information about active sessions, processes, and services. It can help you monitor system activity and resource usage. Sample command:
      query session
    80. reg – This command allows you to import or export registry keys and values. It can help you transfer settings between computers or backups. Sample command:
      reg export HKEY_LOCAL_MACHINE\Software\MyApp C:\MyBackup.reg
    81. route – This command displays or modifies the local routing table. It can help you configure network routing and connectivity. Sample command:
      route print
    82. sc config – This command allows you to modify the configuration of a Windows service. It can help you tune performance and security settings. Sample command:
      sc config MyService start= auto
    83. shutdown /m – This command allows you to shut down or restart a remote computer. You must have administrative credentials on the remote computer. Sample command:
      shutdown /m \MyComputer /s
    84. icacls – This command is used to display or modify access control lists (ACLs) for files and directories.
      Sample command:

      icacls C:\Users\Username\Documents\example.txt /grant Users:(R)
    85. hostname – This command is used to display the name of the current host.
      Sample command:

      hostname
    86. whoami – This command is used to display the username of the current user.
      Sample command:

      whoami
    87. diskshadow – This command is used to create and manage snapshots of volumes for backup and recovery purposes.
      Sample command:

      diskshadow.exe
    88. assoc – This command is used to display or modify file associations.
      Sample command:

      assoc .txt
    89. mountvol – This command is used to create, remove, or display volume mount points.
      Sample command:

      mountvol C:\MountPoints /D
    90. shutdown – This command is used to shut down or restart the computer.
      Sample command:

      shutdown /s
    91. typeperf – This command is used to display performance counter data.
      Sample command:

      typeperf "\Processor(_Total)% Processor Time"
    92. pnputil – This command is used to manage the driver store.
      Sample command:

      pnputil /add-driver C:\Drivers\Example.inf /install
    93. netsh advfirewall – This command is used to configure the Windows Firewall.
      Sample command:

      netsh advfirewall firewall add rule name="Block ICMPv4" protocol=icmpv4:any,any dir=in action=block
    94. ver – This command is used to display the version of the operating system.
      Sample command:

      ver
    95. netstat -s – This command is used to display statistics for TCP/IP protocols.
      Sample command:

      netstat -s
    96. netstat -a – This command is used to display all active TCP connections.
      Sample command:

      netstat -a
    97. netstat -o – This command is used to display all active TCP connections and their associated process IDs.
      Sample command:

      netstat -o
    98. netsh int ip reset – This command is used to reset the TCP/IP stack to its default state.
      Sample command:

      netsh int ip reset
    99. netsh interface ip delete arpcache – This command is used to clear the Address Resolution Protocol (ARP) cache.
      Sample command:

      netsh interface ip delete arpcache
    100. netsh winsock reset – This command is used to reset the Winsock Catalog to its default state.
      Sample command:

      netsh winsock reset
    101. ipconfig /all – This command is used to display all TCP/IP configuration information.
      Sample command:

      ipconfig /all
    102. ipconfig /displaydns – This command is used to display the contents of the DNS client resolver cache.
      Sample command:

      ipconfig /displaydns
    103. ipconfig /flushdns – This command is used to clear the contents of the DNS client resolver cache.
      Sample command:

      ipconfig /flushdns

       

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *