Blog

CMD Command Line – Commands You Should Know

CMD Command Line – Commands You Should Know

The command line is a special program that allows users to enter commands for the operating system to execute. The command line, as the cmd.exe program, is a component of nearly all Windows systems since Windows 2000, including the latest Windows 10 and Windows 11 systems. It also exists in a very similar form in all distributions of the Linux operating system under the common names command line or terminal.

While in various Linux distributions, becoming comfortable with the terminal is one of the most important skills that significantly impacts the ease of managing and using the system (especially in distributions like Debian, Arch Linux, or Fedora, as opposed to simpler ones like Ubuntu or Mint), in Windows, the average user rarely encounters the command line. 

That doesn’t mean, however, that it isn’t worth getting to know the command line better—this minimalist program may seem unfriendly and primitive at first glance, but with a little effort and a grasp of the basic commands, it can significantly speed up certain tasks performed on a computer. It’s also a great place to learn a bit more about operating systems and how computers work in general—the Windows command line operates at a slightly “deeper” level than typical graphical user interfaces.



How do I open the Command Prompt in Windows?

In Windows XP, you had to use the Run option and then type the program name, which is cmd. In newer versions, it’s much easier to find and open the command prompt. Windows 7 is much simpler in this regard—just open the Start Menu, search for cmd.exe, and run it—the command prompt will then appear on the screen. Windows 10 and 11 look identical in this regard—all you need to do is select the program from the list of applications or search for it using the keyboard.

Windows Command Prompt - Commands and Running Programs

The CMD.exe program isn’t particularly graphically advanced—it consists of a black background and text displayed on the screen. You can enter various commands there. Below, we present a list of the most useful commands for everyday computer use, along with their descriptions and instructions.

Good to know: The command line is not case-sensitive, so the commands `CALC` and `calc` will be interpreted the same way. However, this does matter when renaming files using the command line.

CMD commands - running programs

You can use the command line to run any program installed on your hard drive. However, you need to know its location and first navigate to it using the `cd` command.

cont. "C:\Users\Key-Soft\Desktop\

The command will then display the new location—instead of the default (for example, C://users/Key-Soft will be replaced by C:\Users\Key-Soft\Desktop\

Then type

Run program_name.exe

However, basic programs do not require a path to be specified. This means that to launch the most basic system applications, you only need to enter their short name. These include, among others:

  • calc - the basic Windows calculator
  • charmap - displays a character map - you can use it to copy special characters (such as characters from other alphabets) that aren't available on the keyboard
  • explorer - launches File Explorer
  • notepad - opens Notepad
  • cleanmgr - runs the disk cleanup tool
  • control - opens the control panel
  • defrag - runs the disk defragmenter - while this isn't particularly important today, just a dozen or so years ago, operating systems required regular disk defragmentation
  • perfmon - launches a panel with tools for monitoring your computer's status and performance. There you'll find data on the hard drive, CPU, cache, and more.



Other CMD commands

  • copy “file path” - copies the specified file and places the copy in the same folder as the original file. The file path is the file’s location on the disk, for example, “C:\Users\Keysoft\Desktop\file1.jpg”, and must be enclosed in quotation marks.
  • del “file path” - deletes the file from its location.
  • " folder path" - displays the files located in the specified folder.
  • ipconfig - displays information about the Internet connection (or connections) on the operating system.
  • mkdir “path to folder” - creates a folder at the specified location.
  • net user - displays a list of users (profiles) in the operating system along with their permissions
  • ping [web address] - displays the connection time to the server. Interestingly, the command works without the http:// or https:// prefixes—you only need to enter the domain name itself, for example, key-soft.pl. In the 1990s, when launching a web browser was a proportionally more resource-intensive operation than it is today due to significantly lower computer performance, this command was often used to check the status of an internet connection.
  • print “file path” – prints the specified file. This function works only if a default printer has been set beforehand.
  • rename “ file path” new_filename - renames the file. After the rename command, the file path must be enclosed in quotation marks and separated by a single space before the new filename.
  • systeminfo - displays information about the operating system and the computer. The command shows both basic information, such as the computer name and Windows version, as well as more technical details, such as the BIOS version.
  • shutdown ( commonly referred to as "cmd shutdown")—allows you to manage the shutdown or restart of your computer and requires a specific parameter following the basic command—for example, `shutdown /s` will immediately shut down the system, while `shutdown /l` will log out the current user.
  • type “path to text file” – displays the contents of a text file directly in the command line. This command only works with Notepad files, i.e., files whose names end with the .txt extension
  • date - displays the current date and allows you to set a different one.
  • time - works similarly to the date command mentioned above - displays the current time retrieved from the system and allows you to change it.

Command Line - Commands for the CMD interface

  • cls - clears the command line of previous commands, leaving the terminal screen blank.
  • color - changes the text color in the command line. After the color command, enter a numeric value—for example, 0 is black, 1 is blue, 4 is red, 5 is purple, and 7 is white—the full list will be displayed in the command line after entering the basic command.
  • exit - exits the command line.

Add a comment

Sign in

Megamenu

Your shopping cart

Your cart is empty. Add items