If you scratch the surface of Windows (and macOS), you'll find a command-line console underneath, a remnant of these operating systems' early days as user-friendly graphical wrappers atop text-based, monochrome interfaces.
If you're as old as I am, you might remember having to launch apps and games on a computer by typing text commands rather than pointing and clicking. The modern methods are much easier, of course, but the old methods are still available – and they're actually still useful for multiple tasks, as the list below shows.
Initially, Windows kept the Command Prompt utility as a reminder of its MS-DOS roots. Later, PowerShell (Command Prompt with Tools) was added, and in the latest versions of Windows 11, Command Prompt and PowerShell are now both combined into one tool called Windows Terminal.
Windows Terminal supports all the original Command Prompt commands and you can launch it from the Start menu. It's very simple:
- Search for Terminal.
- Right-click on the program icon and select Run as administrator to ensure that all functions are available to you.
Now that you have opened the Windows Terminal, here are some commands that might be of interest to you. To use them, type the text shown and then press Input.
1. Shut down your computer after a certain time
Shutting down your computer from the Start menu isn't difficult, of course, but Terminal gives you a few more options, such as timed shutdown. The above command will order a shutdown (“/s”) instead of a reboot after a time (“/t”) of 600 seconds. Just adjust the time as needed.
Another handy option is “shutdown -r -o” (without quotes), which will restart your computer (“-r”) and open the Advanced Boot Options menu – very useful for troubleshooting. Just type “shutdown” alone to see other flags you can use.
2. View a visualization of your folders
Enter “tree” and press Input to display a visual representation of the folders and subfolders on your system – very useful for seeing how your Windows drive is organized. You can specify a drive and folder path (e.g. “C:\Program Files\”) to limit the listing to a specific area of the drive, and use the “/f” flag to display both files and folders listed.
3. Fix network problems
The ipconfig command is often used to troubleshoot network problems. Using it alone will show you your router's current IP address. But add the /flushdns flag and it will reset the connections between your computer and the websites you visit (via the DNS server). This can be useful if websites aren't loading as they should.
You can also use “ipconfig /release” and then “ipconfig /renew” to get a new IP address for your computer – which may resolve connectivity issues between your Windows device and your router or your device and the Internet.
4. Get more information about your system
The classic systeminfo command tells you pretty much everything you want to know about your system and more: It returns your Windows 11 version and CPU model, the amount of RAM and storage installed, any currently detected active network connections, and even how long your PC took to boot up the last time.
5. Check your Windows 11 drive for errors
The chkdsk command has long been a favorite of IT technicians and appears in many troubleshooting guides. Essentially, it checks your system disk for errors and can fix some of the most basic errors. For example, if you're having trouble accessing files and folders or booting up your PC, chkdsk may be able to help.
There are also many flags you can use with it. The command itself just checks for errors, but add a space and “/r” to the end and the utility will try to fix those errors, recovering whatever data it can in the process. Use “chkdsk /?” to see other options.
The tasklist command gives you more or less the same information as Task Manager, showing you which applications are putting the most strain on your system. Using the displayed process ID numbers (or PIDS), you can then force-kill apps using taskkill /pid.
7. Analyze the power status of your computer
This is another classic command prompt that, with the “/a” flag, will return all the sleep states your computer supports (such as hibernation and fast startup). You can also get a detailed battery report via “powercfg /batteryreport” – this will be saved in the default folder for the current user account.
Dig deeper and you'll find more: for example, “powercfg /devicequery s1_supported” lists all devices connected to your system that can wake it from standby. Change this “s1” if you need to analyze a different standby state – the codes will be listed when you run the original “powercfg /a” command.
8. Check the system integrity of Windows 11
Like many other command line prompts, this one is very useful in troubleshooting. It checks the integrity of important operating system files and applies fixes when needed. If you're experiencing errors and crashes all over Windows 11, this is one of the first steps recommended in many troubleshooting guides.
9. Get advanced network information
Another simple word that hides a host of useful diagnostic tools: use “netstat” alone and it will tell you about all the devices your computer is connected to, from printers to smart speakers (use Ctrl+C if you want to stop it).
As with many other commands, you can tweak the command in countless ways (see “netstat /?” for a full list). For example, you can use “netstat -b” to see which apps are currently communicating with the Internet, which can help you identify programs that are more active online than they should be.