Go retro with these powerful commands.
Beneath the sleek user-friendly interface of Windows (and macOS) lies a command-line console—a throwback to the days when computers were primarily text-based. Before the age of polished graphical user interfaces, the command line was the way you interacted with computers, typing out commands to launch apps, games, and manage system functions.
If you’re old enough to remember these times, you might recall the charm of typing instructions into a monochrome screen. While today’s click-and-go methods are undeniably more intuitive, command-line tools are far from obsolete. In fact, they remain incredibly useful for a range of tasks, and learning how to use them can give you a deeper level of control over your computer.
In Windows, Command Prompt was once the primary way to interact with this underlying structure, a nostalgic nod to the days of MS-DOS. Over the years, it was supplemented with PowerShell, offering more advanced features. Now, in Windows 11, both Command Prompt and PowerShell are unified under a powerful, versatile tool: Windows Terminal.
Windows Terminal is a modern, customizable interface that allows you to use all the command-line utilities you’ve come to rely on, including both Command Prompt and PowerShell, all from one central hub. Whether you’re looking to automate tasks, troubleshoot issues, or just explore your system in more detail, Windows Terminal has you covered.
Here’s how you can get started and a few commands that can make your life easier.
How to Access Windows Terminal
Before diving into what Windows Terminal can do, let’s start with the basics: how to launch it.
- Search for Terminal: Open the Start menu and search for “Terminal.”
- Run as Administrator: Right-click on the Windows Terminal icon and choose “Run as administrator” to ensure you have full access to its features.
With Terminal now open, you’re ready to begin exploring its capabilities. Below are some useful commands that will help you harness the power of Windows Terminal.
1. Schedule a Timed Shutdown
The shutdown command is handy when you want to power down your computer on a schedule. For example, if you want your computer to shut down after 10 minutes, type the following:
bashCopy codeshutdown /s /t 600
This command initiates a shutdown (/s
) after a delay of 600 seconds (/t
). You can adjust the time by changing the number of seconds.
For more control, try:
arduinoCopy codeshutdown -r -o
This command will restart (-r
) your computer and launch the Advanced Startup Options, which is particularly useful for troubleshooting issues. Running shutdown
without any parameters will show you additional flags you can use.
2. Visualize Your Folder Structure
If you want a better understanding of how your directories are organized, try the tree command:
Copy codetree
This will display a visual representation of all folders and subfolders, giving you a clear picture of your system’s hierarchy. You can add a specific path, such as tree C:\Program Files
, to view a specific directory. For a more detailed look, use the /f
flag to include files in the listing.
bashCopy codetree /f
3. Troubleshoot Network Issues
If your internet connection is acting up, you can use the ipconfig command to help diagnose the issue. Running:
Copy codeipconfig
Will display your current network configuration, such as your router’s IP address. To reset your DNS cache, which can solve issues with websites not loading correctly, use:
bashCopy codeipconfig /flushdns
You can also release and renew your IP address with the following commands, which might help resolve connectivity problems:
bashCopy codeipconfig /release
ipconfig /renew
4. Retrieve Detailed System Information
Want to know everything about your system in one go? The systeminfo command provides a comprehensive overview of your machine, including your Windows version, CPU model, amount of RAM, network connections, and even your last boot time.
Copy codesysteminfo
This command is invaluable when troubleshooting or just wanting to take a deep dive into your system’s specs.
5. Scan and Repair Your Hard Drive
The chkdsk command is a long-time favorite for diagnosing and repairing issues with your hard drive. Simply typing chkdsk
will scan your drive for errors, but adding /r
will allow it to not only find but also fix those errors while recovering readable data.
bashCopy codechkdsk /r
Running chkdsk
can be a lifesaver if you’re dealing with corrupted files, slow boot times, or other disk-related issues.
6. View and Manage Running Tasks
Ever wondered what’s going on behind the scenes? The tasklist command will show you all the currently running tasks, much like Task Manager does.
Copy codetasklist
It’s especially useful in conjunction with the taskkill command. If you know a specific process ID (PID) of a misbehaving application, you can kill it directly:
bashCopy codetaskkill /pid <PID> /f
This can be a powerful tool when dealing with stubborn programs that refuse to close through normal means.
7. Analyze Power and Battery Settings
With powercfg, you can analyze and tweak your computer’s energy states. The /a
flag will list the sleep states your machine supports:
bashCopy codepowercfg /a
If you’re troubleshooting sleep mode issues or optimizing battery life, you can get detailed reports with:
bashCopy codepowercfg /batteryreport
This generates a detailed battery report saved to your user folder, providing insights into your battery’s health and usage patterns.
8. Verify System File Integrity
If your system is acting up, the sfc command checks for corrupted or missing system files and automatically repairs them. Simply run:
bashCopy codesfc /scannow
If you’re dealing with crashes, bugs, or system instability, this command should be one of your first troubleshooting steps.
9. Get Advanced Networking Information
The netstat command provides a wealth of networking data, including all the active connections your computer is maintaining. Run:
Copy codenetstat
This will display a list of devices connected to your machine, including printers, smart devices, and servers. For more granular information, try:
cssCopy codenetstat -b
This variation shows which programs are currently communicating over the web—helpful for diagnosing suspicious activity or bandwidth-hogging apps.
Windows Terminal brings immense power to your fingertips, and while it may seem daunting at first, mastering even a few key commands can transform the way you interact with your PC. Whether you’re automating tasks, optimizing system performance, or troubleshooting issues, the Terminal is your gateway to deeper control and insight. So, go ahead, scratch the surface of your operating system—you’ll be surprised by what you find!