Main Commands for Windows Command Line

This topic may not be the most popular one among software testers. Nevertheless, if you are working with desktop applications, knowledge of the capabilities of the Windows console is a must. Moreover, this article may be of use for those who want to become confident Windows users. So make yourself comfortable and prepare to make notes. We’ll be sharing some of the helpful commands.

What Is the Command Line?

We’ll start with the information for newbies – what the command line is and for what you can use it.

The command line is a program that allows a user to communicate directly with the operating system. The command line has a text-based user interface, where all applications and programs are controlled by writing text commands.

How to Run the Command Line?

To run the command line, you can use one of the following methods:

  • Press StartRun or Win + R → enter cmd → press Enter.
  • Press StartAll ProgramsAccessories → Command Line.
  • Press StartSearchCommand Line.

How to Enter Commands?

To enter commands, use keyboard input. For example, if you enter help, you’ll receive information about all the available command options.

If you want to enter the path to a file manually, use the Tab key. Press it after entering the first letter of the folder you are looking for, and the system will autocomplete the path, letting you access a directory or a file in a few seconds.

To copy the text from the command line, you need to configure it in the settings. Copying is disabled by default. To change this, you need to do the following:

  1. Right-click on the command line window title and select Properties.
  2. Check Select with the mouse and Quick insert.

To copy a text from the command line to the clipboard, highlight this text and right-click. Right-clicking is also used to paste a text into the command line.

Commands in Windows

Now, we’ll share the list of frequently used commands that may be helpful for you during testing. Keep in mind that it is only a short list of commands. There are many more of them in the whole set.

The commands are arranged in alphabetical order. Each comes with a brief description telling about its purpose – in other words, what you can do using this particular combination of letters.

A
  • ARP – ARP tables viewing and modifying (ARP stands for Address Resolution Protocol).
  • ASSOC – viewing or modifying the file extension associations for applications.
  • AT – task scheduler management.
  • ATTRIB – file attributes changing.
  • Auditpol – audit policies management.
B
  • BASH – BASH shell for the Windows Subsystem for Linux (WSL).
  • BCDBOOT – copying the boot files to the system partition and creating a new boot configuration store (BCD).
  • BOOTSECT – boot sector editing to ensure NTLDR or BOOTMGR.
  • BREAK – enabling or disabling of the CTRL + C combination processing in DOS.
C
  • CACLS – file access control list editing (ACL is short for Access Control List).
  • CHGUSR – changing of the terminal server settings, similar to CHANGE USER.
  • CHCP – viewing or changing of the current code page.
  • CHKDSK – disk check.
  • CLS – command line screen clearing.
  • CMD – starting a new copy of the command line interpreter.
  • CMDKEY – username and password management (creating, displaying, deleting, and saving).
  • COLOR – changing text and background colors in the CMD window.
D
  • DevCon – command line device management.
  • DIANTZ – the same as MAKECAB, which is .cab archive creation.
  • DIR – displaying a list of files and directories.
  • DISKCOMP – comparing the contents of two floppy disks.
E
  • EXIT – exiting a procedure or batch file.
  • EXPAND – compressed CAB files unpacking.
  • EXTRACT – content extraction, unpacking of the CAB files in Windows (EXTRAC32).
F
  • FC – file content comparison.
  • FIND – searching for a character string in a file.
  • FINDSTR – searching for the strings in files using regular expressions.
M
  • MAKECAB – compressed CAB file creation.
  • MBR2GPT – conversion of MBR disks to GPT.
  • MEM – requesting information about memory usage in MS-DOS.
  • MD – creation of a new directory.
  • MKLINK – creation of a symbolic link to a file or directory.
  • MODE – system device configuration in the CMD environment.
  • MORE – paginated console output.
P
  • PROMPT – changing the prompt line in the console.
  • PUSHD – saving of the current directory path and going to the specified directory.
  • PSR – Problem Steps Recorder.
Q
  • QPROCESS – process status display.
  • QUERY – displays information about the status of processes and user sessions.
  • QUSER – displays information about user sessions.
S
  • SCHTASKS – task scheduler management.
  • SCLIST – displaying a list of system services.
  • SET – displaying and changing Windows environment variables.
  • SETLOCAL – local variables settings in a batch file.
  • SETX – utility for creating system variables.
  • SFC – Windows system file checking and restoring.
W
  • WHOAMI – displaying the current user’s name.
  • WINDIFF – file content comparison.
  • WinMgmt – WMI service starting (Windows Management Instrumentation).
  • WINRM – Windows Remote Management via the command line.
  • WINSAT – Windows Performance Checker.
  • WMIC – execution of the WMI command in the command line.
  • WSCollect – access to the CAB file with copies of Windows 10 desktop logs.

Advantages of Using the Command Line

The command line is used mainly by advanced users. With its help, a person can automate the execution of certain tasks of the same type. For example, if you need to move, copy, or rename files under certain conditions, you can do it easily by creating special batch files using the command line. Moreover, such operations will run without user intervention.
Long story short, the advantage of using the command line becomes evident when you need to perform the same operation with numerous files. You can also use the command line to obtain the necessary information about the operation of network devices and estimate what can potentially cause malfunctions and failures. That’s what allows you to keep track of the network activity and its health.

qaadmin

Recent Posts

Testing iOS Apps? Try These 11 Tools for Mobile QA

The saturated mobile app market makes businesses constantly reimagine the definition of quality. This never-ending…

12 months ago

Test Automation with Java: Why It’s Worth the Effort & How to Do It

Over half of the software companies use test automation. And almost all testing pros rely…

1 year ago

The One Swagger API Walk-Through to Answer All Your Questions

Imagine studying a language without dictionaries or manuals. Could you learn what each word means…

1 year ago

16 Interactive Platforms to Practice Your Software Testing Skills

For QA engineers, learning is a never-ending journey. While you can always expand and refresh…

1 year ago

How to Create Functional Tests with Extensive Coverage

Everyone can write decent functional test cases. Writing documentation for functional testing services that have…

1 year ago

How to Write Automation Scripts. The Basics AQA Engineers Should Know

Automation is now a priority. Nearly all QA specialists write automation scripts for their projects.…

1 year ago