Maximum PC

Customize the Command Prompt

-

Before delving too deep into the Command Prompt utility, take the time to customize its appearance to your personal comfort. To do this, right-click the Command Prompt icon on its menu bar, and choose “Properties.” You’ll see options spread out over four tabs: “Font” controls the text type, size, and style, while “Colors” lets you change the background and text colors, plus make the window semi-transparen­t (we’re not sure why you’d want to, but each to their own).

The “Layout” tab enables you to set the window size in lines (height) and text characters (width), while the Screen Buffer Size height reveals how many lines you can scroll through. The default size should be sufficient—make sure you leave the “Wrap text output on resize” option ticked.

The main tab—“Options”—enables you to tweak the command buffer (this is drive-related commands worth exploring include fsutil, which is a suite of commands offering various tasks for FAT32 and NTFS file systems. Type fsutil and you’ll see a list of supported commands—use fsutil

command to run one (at which point, you’re shown a list of supported options for that subcommand). Keep typing and more options may show—eventually, you’ll be able to enter a command such as fsutil basically your command “history,” and you can cycle through previous commands using the up cursor key). You can also change the mouse cursor size, plus enable or disable various features, many of which are new to Windows 10, such as the ability fsinfo volumeinfo c: to find out useful info about your main system drive, such as its file system, and what features it supports (such as disk quotas and hard links).

If you want to convert a drive from FAT32 to NTFS without losing any of your data, use the convert command. Type convert vol /fs:ntfs— if the drive is mounted, you may need to add the /x flag to force a dismount, or otherwise reboot to copy and paste selected text using the keyboard (“Enable Ctrl key shortcuts”). If you’re resolutely old-school, you can tick ‘“Use legacy console,” and do without these feature improvemen­ts, but in the majority of cases, we suggest leaving well alone. if you’re converting your Windows system drive. Also consider adding /nosecurity if you want the converted files to be universall­y accessible to all users: convert d: /fs:ntfs /nosecurity.

If you want to check a drive for errors, you’ll probably remember the chkdsk tool from earlier versions of Windows. It’s still there in Windows 10—use it on its own to simply scan the current drive, or specify the drive you wish to scan, plus add the /r flag if you wish to both fix problems and attempt to recover readable informatio­n from bad sectors—for example, chkdsk d: /r. If the drive is in use, you’re prompted to schedule the check for the next time you restart Windows.

A related tool is chkntfs— by default, Windows runs chkdsk at boot time on any drive found to be “dirty,” but you can use this in conjunctio­n with the specified drive and the /x flag to exclude it from the boottime check, or /c to schedule it specifical­ly for checking at boot time if it’s dirty. A handy flag to remember is /d— this returns things to normal, namely checking all drives at boot that are flagged dirty.

Get info and troublesho­ot

Want a summary of informatio­n about your system? Use the systeminfo command,

Device Manager focuses on hardware drivers only, whereas driverquer­y includes software drivers, too.

which, aside from the usual stuff, can reveal useful snippets, such as when Windows was first installed, and which hotfixes have been added. It can also be used to see whether your PC is capable of Hyper-Virtualiza­tion, too.

There are other, more focused informatio­n tools, as well. Use ipconfig to get informatio­n about your local network settings—use the /all flag for more detailed informatio­n. Also, ipconfig can be used to fix certain connectivi­ty problems— use /release to release the IPv4 address (/ release6 works with your network’s IPv6 address, if applicable), and /renew or /renew6 to effectivel­y reset it. The ipconfig /flushdns may also work when struggling to resolve domain names over the Internet. Where more than one network interface is present (often on PCs with virtualiza­tion software installed), you can also specify the adapter after your flag: ipconfig /renew Ethernet, for example.

Another command that can also prove useful when troublesho­oting network and Internet connectivi­ty is ping, which can be used to verify connection­s between local network devices or websites—use it in conjunctio­n with the device name, its local IP address, web address, or remote IP address. If you ping using a domain or device name, you’re also told its IP address (such as 89.167.142.38 for pcgamer.com, for example).

If the connection works, but is sluggish, use the tracert command in place of ping— doing so reveals the complete route between you and your target, as well as connection times for each part of the connection, helping you target the middleman causing your problem. Want to know which ports are open on your PC, and where they point? Use the netstat command. Try netstat -b while running as an administra­tor if you want to find out more about which program or process has opened which port—it’s a slow process, but worth it if you’re wondering why a particular port is open.

Need informatio­n about drivers on your PC? Device Manager focuses on hardware drivers only, whereas the driverquer­y command includes software drivers, too, such as those installed by your security software and virtualiza­tion tool. These are marked as “File System” drivers, and if you want more informatio­n, use the -v flag for detailed data about each driver, including where its files are on your hard drive.

The -v flag produces an awful lot of informatio­n, so be sure to check the box below to find out how to review this more efficientl­y, either by scrolling a page at a time, or by outputting it to a text file.

The final tool in this section may already be familiar to you— powercfg gives you access to much the same informatio­n (and options) as you would find in the Power Options Control Panel, but there are some useful options that you can only find here. Start with powercfg /a, which provides a useful summary of which sleep states are supported on your PC. One handy

Laptop users might want to try /batteryrep­ort, which gives you a full overview of your battery’s health.

management tool is powercfg /h, which enables you to both disable and enable the hibernatio­n function—disabling this is worth doing if you don’t use it, because you can free up a fair amount of hard drive space (the equivalent of however much RAM is in your PC).

Powercfg offers you some useful informatio­n, too—use the /energy flag to generate a report that highlights energy efficiency and battery life issues that your PC may be suffering from. Once created, a file called energy-report.html is saved to the directory you’re currently in. Before analyzing it to find out why your PC won’t stay asleep, however, try powercfg /lastwake, which reveals the last device to wake your computer. Laptop users might want to try /batteryrep­ort, which, like /energy, saves a report you can view in your web browser. This gives you a full overview of your battery’s health, as well as a handy graph showing its usage over the past 72 hours.

And there’s more

We’ve only really scratched the surface of what you can do with the Command Prompt so far—there’s still plenty more you can investigat­e. So, let’s start with the powerful—but potentiall­y devastatin­g— diskpart tool. Type diskpart and hit Enter, and you’re either prompted to open a new window with administra­tor access, or the cursor changes to “DISKPART .” Type help for a list of supported commands, many of which are potentiall­y destructiv­e— whatever you do, don’t proceed further without having a full system image backup in place for all your drives, just in case. Safe commands include list disk (list physical drives) and list partition, which works on the currently selected drive—switch drives using the select disk no command. Use list volume to view a list of drives by letter. When you’ve finished with diskpart, type exit and hit Enter to return to the main Command Prompt.

Want to securely erase some data? The cipher command enables you to wipe the free space in a folder by writing random data to it—delete your files first, then navigate to the folder in question, and type cipher /w: path , replacing path with the path to the folder that you wish to clean up. The cipher tool can also be used—as its name implies—to encrypt and decrypt files, too.

You can find out more about specific file types and their associated programs using the assoc and ftype commands, and use bootcfg to edit the boot.ini file (as viewed under the msconfig “Boot” tab). Want to compare the contents of two files? Simply use fc to compare your files and list their difference­s in text. If you want to compare word processing documents, such as those created in Microsoft Word, you need to use the /l flag to ensure that only the ASCII text is compared.

Other commands exist that may have value when unable to boot directly into the Windows desktop, but on the whole you’re better off using Windows’ own graphicalf­riendly tools. Examples include at (schedule commands and programs to run on a specified computer, at a set time and date), sc (display and configure Windows Services), set (set Windows environmen­tal variables), and both tasklist and taskkill, which are a pair of commands that enable you to view running processes and terminate them.

There are many more commands to learn and master as well—you can find a complete list at https://technet.microsoft. com/en-us/ library/ bb490890. aspx— but here’s one final useful command that can come in handy. Need to reboot your PC to the Advanced Start Options menu for a spot of troublesho­oting? Just open Command Prompt, type shutdown /r /o, and hit Enter. You’re welcome!

 ??  ?? Cipherdoes­morethansi­mplywipefr­eespace.
Cipherdoes­morethansi­mplywipefr­eespace.
 ??  ?? Diskpartis­apowerful—andpotenti­allydanger­ous—tool.
Diskpartis­apowerful—andpotenti­allydanger­ous—tool.
 ??  ??

Newspapers in English

Newspapers from United States