Ugo's Blog


5 CMD Commands You Should Know

5 CMD Commands That You Will Find Very Helpful

Author: Ugochukwu E. Nwachukwu
 Sept. 6, 2023    514 views  


The content of this blog post is for informational purposes only and should not be considered as professional advice or endorsement.




The Command Prompt (CMD) in Windows is a powerful tool that allows users to interact with their operating system using text-based commands. 

 

Whether you're a novice or an experienced user, understanding some essential CMD commands can enhance your productivity and help you manage your system more effectively. 

 

 

How To Open Command Prompt

 

1. With the Start Menu

  • Click on the Windows Start button or press the Windows key on your keyboard.
  • In the search bar, type "cmd" or "Command Prompt."
  • You will see "Command Prompt" or "cmd.exe" in the search results. Click on it, and the Command Prompt window will open.

 

2. With the Run Dialog

  • Press the Windows key + R on your keyboard. This will open the Run dialog.
  • In the Run dialog, type "cmd" and press Enter.
  • The Command Prompt window will open.

 

 

 

5 Useful CMD Ccommands

 

1. cd - Change Directory

The `cd` command is short for "Change Directory". It allows you to navigate the file system. To use it, open CMD, type `cd`, followed by the path of the directory you want to move to, and press Enter. For example, to switch to the Documents folder, you can type:

   cd C:\Users\YourUsername\Documents

 

To go to the parent directory of your current directory, use:

cd ..

 

Let's say you have a directory similar to this:

Folder1

  • SubFolder1
  • SubFolder2

 

If you are currently in the Folder1 directory and want to move to SubFolder1, you can run the following command:

cd SubFolder1

 

You could also use a relative path like this:

cd ./SubFolder1

 

You can use this when you want to perform specific commands in a particular directory.

 

 

2. md and mkdir - Create Directories

Creating new folders in Windows is a breeze with the `md` (short for "Make Directory") or `mkdir` command. To create a new directory, simply open CMD and type `md` or `mkdir`, followed by the desired folder name. For example:

   md NewFolder

 

Doing this will create a folder named "NewFolder" in the current directory. You could even use it to add subdirectories within the new folder. Here is an example:

mkdir "Folder1/Folder2/Folder3"

 

NB: md and mkdir are interchangeable.

 

 

3. "explorer" command

This command helps to open the file explorer in a particular path. To use it, you open up the Command Prompt, then type "explorer", followed by your desired directory. For example:

explorer "C://Users/User 1/Documents/Folder 1/"

 

If the directory you provided does not exist, or if you just typed "explorer", it opens up the "Documents" directory.

 

If you want to open up the file explorer in your current working directory in the Command Prompt, use:

explorer .

 

 

4. ipconfig - Network Configuration

The "ipconfig" command is invaluable for diagnosing network issues and retrieving network-related information. By entering "ipconfig" in CMD and hitting "Enter", you can view details about your network adapters, IP addresses, subnet masks, and more. It's an essential command for troubleshooting network connectivity problems.

ipconfig

 

To see all you can do with this command, type:

ipconfig help

 

 

5. color - Change Console Text Color

The "color" command allows you to customize the appearance of the Command Prompt by changing the text and background colours. 

 

You specify the colour attributes with two hexadecimal digits. The first corresponds to the background; the second is the foreground. Each digit can be any of the following values:

  • 1 = Blue
  • 2 = Green
  • 3 = Aqua
  • 4 = Red
  • 5 = Purple
  • 6 = Yellow
  • 7 = White
  • 8 = Gray
  • 9 = Light Blue
  • A = Light Green
  • B = Light Aqua
  • C = Light Red
  • D = Light Purple
  • E = Light Yellow
  • F = Bright White

 

The example below changes the background to bright white and the foreground (text colour) to blue.

 color f1

 

Experiment with different colour codes to personalize your CMD experience. Providing only one digit will only affect the foreground. 

 

The below example will change only the foreground to light green:

color a

 

 

Conclusion

By becoming proficient with these five essential CMD commands, Windows users can improve their capability to manage files, directories, networks, and the appearance of the Command Prompt, thereby enhancing their overall computing experience.

 

ENJOY!






Liked this post? Share it to others!










Check Profile