The Windows UI makes it easy to manage your PC, especially with the new Settings app replacing the Control Panel. However, terminal commands still exist in Windows, and once you start using them, you won’t believe how easy managing your PC gets.
5
Basic file management
If you spend a lot of time in the Windows File Explorer, clicking around a bunch trying to copy multiple files and folders can get exhausting. And if you misclick a file or folder, it’s a mess to deal with.
Thankfully, Windows includes some handy file management commands that you should know. The first one is called dir and lets you see the contents of the active directory in seconds. You can use the cd command followed by the file path to switch directories. These commands make it incredibly easy to navigate directories and folders in the Windows Command Prompt.
For example, you can use the following command to go to your Windows Documents folder:
cd C:Users[YourName]Documents
Once you’re there, just type dir to show the directory contents. You can also use cd.. to go back a folder in the terminal. If you want to see a directory’s folder structure, feel free to use the tree command. Instead of having to expand folders in Explorer, this command shows everything laid out perfectly.
For copying files, the xcopy command is a game-changer. Simply type xcopy [source path] [destination path] /s, and the command will copy files and all subdirectories to the destination path. The transfers also tend to happen faster than the usual copy-pasting via the File Explorer, so you can end up saving hours in the long run.
4
Network troubleshooting
Wi-Fi and networking can act up without any clear reason in Windows. Fixing these issues usually requires running troubleshooters or navigating through multiple menus to try fixes like resetting your Windows network settings.
One of the most basic and well-known commands for network troubleshooting in Windows is ipconfig. The command shows you IP and MAC addresses for all the connections to your PC in addition to DNS addresses, default gateways, and more. It’s also the easiest way to find your router’s IP address if you want to make some changes.
Another handy command is ipconfig /flushdns. This command clears the DNS cache and is often recommended as one of the first troubleshooting steps when dealing with connectivity issues on Windows.
You can also use ping [URL] to ping a particular website or server and check whether you can connect to an external server or not. The command sends signals to a server (or website) and waits for a response. The output can help you check whether you’re the one with internet problems or the server is facing issues. Additionally, the tracert command can show you exactly where your web packets are going, to help rule out any routing issues. However, these are usually more advanced problems, and you’re unlikely to come across them in daily usage.
3
Disk maintenance
Thanks to modern SSDs, disk maintenance isn’t something you’ll actively need to think about. However, if you’re working on an older PC or have a few corrupted files on your active system, these commands can save you a lot of time and effort.
To simply check if all’s well on your disk, you can use the chkdsk command followed by the partition letter to check the disk and get real-time updates. For example, if you want to scan your default Windows drive for errors, you’d use the following command:
chkdsk C:
For cleanup, run the cleanmgr command. It launches Windows’ built-in Disk Cleanup utility, which is actually quite good and lightweight. You simply select the drive you want to clean, and Windows takes care of the rest.
Finally, the sfc /scannow command can automatically find and fix corrupted files on your system. If you’re experiencing problems with Windows, this is a must-run command as it can often save you the hassle of working with recovery menus or even installing Windows. It’s also a good idea to run this command as part of regular computer maintenance from time to time.
These tools might feel a little complicated to understand at first, but when you do, they’ll make system maintenance much simpler. The first command you should be using here is tasklist. It gives you a clean, searchable list of every process running on your system, along with its process ID. Want to shut something down? Type taskkill /pid [process ID] and you’re good to go. No more hunting for tasks in the Task Manager.
Some important system tools can take several clicks to access. You can skip that navigation by using commands like:
- devmgmt.msc: Opens the Device Manager
- diskmgmt.msc: Opens Disk Management
- eventvwr.msc: Opens the Event Viewer
- taskmgr: Opens the task manager.
The best part is that you can run these commands from the Windows Command Prompt, Terminal, or the Run prompt, which can be accessed by pressing the Windows key + R. Over time, using these commands will save you hours by not having to go through multiple menus and clicks.
1
Set it and forget it automation
This is where things get really powerful. You can create batch files in Windows that can automate tasks using the commands described above. These files are also universal, meaning you can create them on one PC and run them on any other Windows machine to get the same results.
For example, here’s a simple batch file script I use to clear my temporary folders without touching my mouse:
@echo off
echo Cleaning up temporary files...
del /q "%temp%*"
echo Done!
pause
The script clears the Windows temp folder and pauses after it’s done, so I can check if it worked. You can, of course, add more maintenance commands, delete other folders, and automate system maintenance that would otherwise eat up your weekends. Make sure to write all contents in a text file and save it with a .bat extension. Notepad is all you need in this situation.
Microsoft has also launched the Windows Terminal—a much neater terminal experience compared to the old Command Prompt. You can download the Windows Terminal from the Microsoft Store. Once downloaded, you can set it as your default terminal and even customize it with a custom background image or create a custom color scheme.
If you’ve been sticking to Windows’ graphical interface, it’s about time you start learning the ins and outs of the terminal. It still exists in modern versions of Windows for a reason, and once mastered, can make managing your PC far easier than it ever was.