20 Best Command Prompt Tricks

Introduction

20 Best Command Prompt Tricks. The Command Prompt (CMD) may seem outdated, but it’s a powerful tool that can make managing your PC much easier. Knowing a few useful tricks can save you time and help you troubleshoot issues more efficiently. Whether you’re new to CMD or an experienced user, these 20 Command Prompt tricks will help you get the most out of your Windows experience.


Open Command Prompt in Any Folder

Right-Click and Open Command Window

One of the most convenient tricks is opening Command Prompt directly in a specific folder. Instead of manually navigating to the folder using the cd command, just hold down the Shift key, right-click on the folder, and select “Open Command Window Here.” This saves time when you need to perform operations in a particular directory.


Check Your System Information

Use the systeminfo Command

Need a detailed rundown of your system’s specs? Type systeminfo into the Command Prompt, and you’ll get a list of details including your operating system, hardware specs, and even network configurations. It’s a great way to quickly access key information about your computer.


Check Your IP Address

Use ipconfig to View Network Information

If you need to find out your local IP address or troubleshoot network issues, just type ipconfig into the Command Prompt. It will display your current network settings, including your IP address, subnet mask, and default gateway.


Quickly Change Directory

Use cd Command to Navigate Folders

The cd (change directory) command is one of the most frequently used in Command Prompt. You can quickly move between directories by typing cd followed by the folder path. For example, cd C:\Users\YourName\Documents will take you directly to your Documents folder.


View Hidden Files

Use dir /a:h to See Hidden Files

Windows often hides important system files from view, but you can easily view them using the Command Prompt. Just type dir /a:h in the directory you’re working in, and it will show all hidden files. This is especially useful for troubleshooting or accessing files that you can’t see through the normal File Explorer.


Run Multiple Commands at Once

Use Double Ampersand &&

You can execute multiple commands in one line using the double ampersand (&&). For example, cd Documents && dir will change the directory to Documents and then immediately list its contents. This trick is handy for performing multiple tasks without having to retype each command.


Use Tab to Auto-Complete

Quick Folder Navigation with Tab

Tired of typing out long file or folder names? Use the Tab key to auto-complete file names. Start typing the first few letters of the file or folder name, then press Tab to let the Command Prompt auto-complete it for you. This is a huge time-saver when working with lengthy file paths.


Create Folders in Batches

Use mkdir folder1 folder2 folder3

Need to create multiple folders at once? Instead of creating them one by one, you can use the mkdir command followed by a list of folder names. For example, mkdir folder1 folder2 folder3 will create three separate folders in one go.


Watch Star Wars in ASCII

Use the Telnet Command

This is a fun trick to impress your friends! If you enable Telnet on your computer, you can watch an ASCII version of Star Wars in Command Prompt. Just type telnet towel.blinkenlights.nl and enjoy the show. Note: You may need to enable Telnet first via Control Panel > Programs > Turn Windows features on or off.


Use the tree Command

View Folder Structure in Tree Format

The tree command allows you to see a visual representation of your folder structure. Type tree in any directory, and you’ll get a graphical overview of the folder and its subfolders in a tree-like structure.


Check Disk Health

Use chkdsk to Analyze Your Hard Drive

Concerned about your hard drive’s health? The chkdsk command checks the file system and disk integrity, identifying any potential issues. Use chkdsk C: (or replace “C” with the drive letter you want to check) to analyze your drive.


Create a Wi-Fi Hotspot

Use netsh to Create a Wireless Network

Did you know you can turn your PC into a Wi-Fi hotspot? By using the netsh wlan set hostednetwork mode=allow ssid=YourNetworkName key=YourPassword command, you can set up a wireless network. Then start it with netsh wlan start hostednetwork. Perfect for sharing your internet connection with other devices.


Run Command Prompt as Administrator

Right-Click to Run CMD with Admin Privileges

Many commands require administrative privileges to run. To open Command Prompt with admin rights, simply right-click the Start button and select Command Prompt (Admin). You’ll have full control over your system with elevated permissions.


Create a Shortcut to Open CMD

Customize a Hotkey for Quick Access

If you use Command Prompt frequently, you can create a custom keyboard shortcut to open it. Right-click on the CMD icon, go to Properties, and assign a hotkey, such as Ctrl+Alt+C. This way, you can open Command Prompt instantly without navigating through menus.


Check System Uptime

Use net statistics workstation

Want to know how long your PC has been running without a restart? The command net statistics workstation shows a detailed report, including your system’s uptime. Look for the line that says “Statistics since” to see when the PC was last booted.


Get a List of Installed Programs

Use wmic product get name

Need to see all the programs installed on your computer? Use the command wmic product get name to generate a list of installed applications. This is especially useful for identifying unnecessary software that you may want to uninstall.


Shut Down Your PC with CMD

Use shutdown /s /f /t

You can shut down your computer directly from Command Prompt by typing shutdown /s /f /t 0. The /s flag stands for shut down, /f forces all applications to close, and /t specifies the time delay (in seconds) before shutting down. In this example, it’s set to 0 seconds.


Run Power Diagnostics

Use `powercfg /energy’

If you’re having issues with power management, you can run a diagnostic report using the command powercfg /energy. It will generate a report analyzing your computer’s power efficiency and potential problems that may affect battery life or energy consumption.


Conclusion

Mastering the Command Prompt is a great way to improve your tech skills and streamline your Windows experience. From basic commands like changing directories to more advanced tricks like setting up a Wi-Fi hotspot or running diagnostics, CMD offers endless possibilities for power users. Try out these 20 best Command Prompt tricks, and you’ll be navigating your system like a pro in no time.


FAQs

1. How do I run Command Prompt as an administrator?
Right-click the Start button and select “Command Prompt (Admin)” to run with elevated permissions.

2. What is the most useful Command Prompt command?
While it depends on the task, ipconfig is highly useful for viewing network settings, and chkdsk is great for checking disk health.

3. How can I create a Wi-Fi hotspot using CMD?
Use netsh wlan set hostednetwork mode=allow ssid=YourNetworkName key=YourPassword to create a Wi-Fi hotspot and start it with netsh wlan start hostednetwork.

4. Can I watch movies in Command Prompt?
Yes, you can watch Star Wars in ASCII by typing telnet towel.blinkenlights.nl after enabling Telnet.

5. How do I check my PC’s uptime?
Type net statistics workstation to see your system’s uptime.

Leave a Comment