Now that you have understood what Command Prompt is, let’s dive into 10 practical commands you can try on a Windows computer.
These commands cover common tasks such as checking and listing directories, tracing a path between two systems, and troubleshooting Windows.
You do not need to be an IT expert to get started. Each command in this guide includes a brief explanation, example, and screenshot so you can understand what it does and practise it yourself.
-
Assoc command
It’s a command that is used to display or modify the current file extension associations.

1. cd(chdir) command
With this command, you can change your current working directory/folder to your specified directory. Cd <foldername>, cd..; cd are other uses of the cd command line.
2. cd(chdir) command
With this command, you can change your current working directory/folder to your specified directory. Cd <foldername>, cd..; cd are other uses of the cd command line.
|
cd<foldername>
|
cd ..
|
cd
|
|
Changes to the specified folder
|
Moves to the previous (parent) directory.
|
Moves to the root directory of the current drive.
|


3. dir command
Displays a list of subdirectories and files in the current or specified directory.

4. Color command
Sets the colours of the text and background of the command-shell window. The colour attributes are specified using two hex digits, the first corresponding to the background and the second to the foreground. Each digit can have any of the following values:

|
code
|
colour
|
code
|
colour
|
|
0
|
Black
|
8
|
Gray
|
|
1
|
Blue
|
9
|
Light Blue
|
|
2
|
Green
|
A
|
Light Green
|
|
3
|
Aqua
|
B
|
Light Aqua
|
|
4
|
Red
|
C
|
Light Red
|
|
5
|
Purple
|
D
|
Light Purple
|
|
6
|
Yellow
|
E
|
Light yellow
|
|
7
|
White
|
F
|
Light White
|
If no argument is given, this command restores the colour to what it was
when CMD.EXE started. This value either comes from the current console
window, the /T command line switch or from the DefaultColor registry
value.
The COLOR command sets ERRORLEVEL to 1 if an attempt is made to execute
the COLOR command with a foreground and background colour that are the
same.
For example, c:/>color A6 produces brighter lime green, spring green or chartreuse.
Example: c:>color 06 produces yellow on a black background

5. Copy command
Copies files from one location to another or concatenates files. ex. copy<filename><directory to move>

6. Ipconfig command
It’s a Windows CLI tool that displays the full TCP/IP configuration for all adapters, clears DNS cache, and refreshes your local IP address. The key commands include ipconfig, ipconfig /all, and ipconfig /flush.

Ipconfig /all is a Windows command to display the full TCP/IP network configuration, including physical addresses, DHCP settings, and DNS servers.

To flush your DNS cache on Windows, use ipconfig /flushDNS rather than ipconfig /flush.
7. Ping command
It is a fundamental command-line network utility used to test a host's reachability and measure the round-trip time (RTT) of data packets sent from your device to a destination. It operates by sending Internet Control Message Protocol (ICMP) echo request packets to a target IP address or domain name and waiting for an echo reply. For example, ping the IP address 8.8.8.8, ping a domain name google.com, etc.
Common uses
-
It can be used to identify issues
-
To check internet connectivity
-
To test communication between devices

8. Tracert command
Your website is down, and you realise it’s a DNS issue? You must fix it as fast as possible. In this case, the tracert command is what you need. It is Windows’ version of traceroute.
It is used for tracing the path between two systems. It will display the different routers or hops needed to travel from the source system to the destination system.


9. Tasklist command
TaskList helps display and run the background processes and services currently running on the Windows computer, along with their process IDs (PIDs). It can be used on both remote and local systems.
It is used to display a list of processes that are currently running and tasks on the system.

10. Cls command
The cls stands for clear screen. It is a Windows Command Prompt utility that erases the previously displayed text and output, returning the console to a blank state.
