Header Ads Widget

Ticker

15/recent/ticker-posts

CMD Commands


The Command Prompt (CMD) is a powerful tool in Windows that many users overlook. While it may seem intimidating at first, CMD can actually help you perform a variety of tasks quickly and efficiently. From managing files to networking and troubleshooting, there are countless tricks that can make your computer experience smoother. Here are 10 cool CMD tricks that every Windows user should know.

1. Open CMD in Any Folder

One of the simplest yet most useful CMD tricks is opening the Command Prompt in any folder you choose, rather than navigating through the file tree.

  • How to do it:
    • Open the folder where you want to run the CMD.
    • In the address bar at the top, type cmd and press Enter.
    • This will launch the Command Prompt directly in that folder.

This trick saves you from having to use the cd (change directory) command to navigate to the right folder.

2. Quickly Shutdown or Restart Your PC

Sometimes, you just want to shut down or restart your computer quickly. Instead of going through the Start menu, you can use the shutdown command.

  • How to do it:
    • To shut down your PC immediately, Type:
      bash

      shutdown /s /f /t 0
      • /s tells the system to shut down.
      • /f forces any open applications to close.
      • /t 0 sets the shutdown time to 0 seconds, meaning it will happen immediately.
    • To restart your computer:
      Type
      shutdown /r /f /t 0

You can also schedule a shutdown by changing the time in /t (e.g., /t 60 for a 60-second delay).

3. Create a Wi-Fi Hotspot with CMD

Did you know that you can turn your PC into a Wi-Fi hotspot using CMD? This trick is particularly useful if you’re in a pinch and need to share your internet connection with another device.

  • How to do it:
    1. Open CMD as Administrator.
    2. Type the following command to check if your device supports hosted networks
      sql
      netsh wlan show drivers
      Look for "Hosted network supported"—if it says "Yes," you're good to go.
    3. Now, to start the hotspot, 
    4. Type:
      vbnet

      netsh wlan set hostednetwork mode=allow ssid=YourNetworkName key=YourPassword
      • ssid=YourNetworkName is the name of your Wi-Fi network.
      • key=YourPassword is the password to connect to your network.
    5. Finally, start the hotspot with:
      Type
      netsh wlan start hostednetwork

Now your computer is a Wi-Fi hotspot, and other devices can connect to it using the password you specified!

4. View Your Computer's IP Configuration

If you need to check your computer’s IP address or troubleshoot network issues, CMD can quickly show this information.

  • How to do it:
    • Type
      ipconfig

This will display your computer’s IP address, subnet mask, and default gateway. You can use ipconfig /all to see more detailed network information, including DNS servers and MAC addresses.

5. Ping a Website or Server

Pinging is a basic but useful diagnostic tool for testing network connectivity. It helps you determine whether your computer can connect to a particular website or server.

  • How to do it:
    • Type
      ping www.google.com

CMD will send packets to Google's servers and show you the response time. If there is no response, you may have an internet connection issue.

6. Find Files or Folders with dir Command

Looking for a specific file or folder in your system? The dir command in CMD can help you quickly locate files, even in large directories.

  • How to do it:
    • Navigate to the folder where you want to search or open CMD in that folder.
    • Type
    • dir /s /b filename
      • /s searches all subdirectories.
      • /b displays the search results in a clean list format without extra details.

For example, to find all .txt files on your system, you would type:

Type 

dir /s /b *.txt

7. Use the tree Command to Visualize Your Folder Structure

The tree command displays a graphical representation of your directory structure, helping you visualize all the files and subfolders in a directory.

  • How to do it:
    • Type:

      tree

This will show the entire folder tree of the current directory. You can also add the /f flag to list files within each folder:

Type

tree /f

8. Generate a System Information Report

If you need detailed information about your computer’s hardware, software, and configuration, the systeminfo command can provide everything you need in one place.

  • How to do it:
    • Type:

      systeminfo

This command will display information about your OS, memory, network adapter, and more.

9. Check Your Computer’s Performance with tasklist

To monitor the processes running on your computer and view their resource usage, use the tasklist command.

  • How to do it:
    • Type:
      tasklist

This will display all the running processes on your system along with their memory usage. If you need to filter this list (e.g., looking for a specific process), you can use the /fi flag:

Type
tasklist /fi "imagename eq chrome.exe"

10. Flush the DNS Cache

If you’re having trouble accessing websites, it might be due to outdated DNS information stored on your computer. Flushing the DNS cache can resolve many connectivity issues.

  • How to do it:
    • Type:
      ipconfig /flushdns

This will clear your DNS cache and force your computer to retrieve fresh DNS data the next time you visit a website.


Bonus Trick: Create a Custom Command Prompt Shortcut

You can make CMD even more efficient by creating custom shortcuts that execute specific commands. For example, you can create a shortcut to open a folder with just a double-click:

  • Right-click on your desktop, select "New > Shortcut."
In the location box,  
type:
cmd /k "cd C:\Your\Folder\Path"
  • Name your shortcut and click Finish.

This will create a shortcut that, when opened, will immediately take you to the specified folder in CMD.


Conclusion

The Command Prompt may seem old-school, but it’s an incredibly powerful tool that can help you manage your Windows PC more efficiently. Whether you’re troubleshooting network issues, managing files, or automating tasks, these CMD tricks will save you time and make you feel like a true tech pro. So, the next time you're working on your PC, try using one of these tricks to streamline your workflow. Happy typing!