The trusty command line has been a feature of windows since, well, before windows! In this article we look at 25 Popular Command Line Prompts and what they are used for, but first of all, what is the command prompt?
DOS faithful’s know all too well about the command line and it’s importance, seeing as that’s all they had before GUI (graphical user interfaces) were invented.
Modern Windows users, from Windows 1.0 onwards (OK, so Windows 1.0 isn’t that modern any more!) will likely refer to the command line as Command Prompt, as this is what it’s called in modern versions of windows, such as Windows 11.
Table of Contents
How to access the command prompt
You can access the Command Prompt by clicking on the Start menu, typing “cmd” into the search box, and then clicking on the Command Prompt application.
Once the Command Prompt is open, you can type in commands and press Enter to execute them.
The Command Prompt also supports many command-line options and arguments that can be used to modify the behavior of commands and scripts.
Popular Command Line Prompts
How many command prompts are there? There’s actually over 280 built in to Windows!
In this article we look at 25 popular command prompts, that are useful for home autometer’s.
- “dir” – Lists all files and folders in the current directory
- “cd” – Changes the current directory
- “mkdir” – Creates a new directory
- “rmdir” – Deletes an empty directory
- “del” – Deletes a file
- “copy” – Copies a file
- “xcopy” – Copies multiple files and directories
- “type” – Displays the contents of a text file
- “rename” – Renames a file
- “cls” – Clears the command prompt screen
- “ping” – Tests connectivity to a specified host
- “ipconfig” – Displays IP configuration information
- “netstat” – Shows active network connections
- “nslookup” – Queries a DNS server for information about a domain
- “tracert” – Traces the route taken to a specified host
- “shutdown” – Shuts down the computer
- “tasklist” – Lists currently running processes
- “taskkill” – Ends a running process
- “systeminfo” – Displays system information
- “powercfg” – Configures power settings on the computer
- “chkdsk” – Checks the integrity of a disk
- “sfc” – Scans and repairs system files
- “diskpart” – Manages disk partitions
- “bcdedit” – Edits the Windows boot configuration
- “net” – Manages network settings and connections
Command Prompt Modifiers
Command prompt modifiers (also known as command switches or options), are parameters that can be added to your command to modify its behaviour or output.
They are usually preceded by a forward slash (/) or a dash (-) and can be used to specify additional options, such as displaying hidden files, sorting the output, or controlling the format of the output.
Here are some examples of command prompt modifiers:
- /p : Pauses the output after each screenful.
- /w : Displays the list of files and directories in wide format, where the information is displayed in multiple columns.
- /a : Lists all files and directories, including hidden and system files.
- /s : Lists the files and directories in the current directory and all subdirectories.
- /b : Displays the list of files and directories in bare format, which shows only the names of the files and directories and not their attributes or other information.
- /l : Displays the file information in lowercase.
- /o : Sorts the files and directories based on various criteria such as name, size, type, and time.
- /t : Sorts the files and directories based on the time.
- /x : Displays the short names of the files and directories, if they have one.
- /on : Sorts the files and directories by name.
These are just a few examples of command prompt modifiers and each command has its own set of options.
Some commands even have their own unique switches which are specific to that command!
For example if you run the command
By default the command will ping that IP address 4 times and then stop;
But if you add a modifier, such as -t
ping 188.8.131.52 -t
It will ping that IP address indefinitely!
Long live the command prompt!
Whilst the command prompt can seem daunting, it’s exceptionally useful and well worth spending some time to learn.
There are so many benefits of the command prompt, especially for automations and repetitive tasks.
In summary, the command prompt is a really powerful tool that you should learn to use, isn’t going anywhere, and remains popular because it provides a powerful and flexible way to interact with the operating system, allows for scripting and automation, is compatible with most versions of Windows, and is really useful for sysadmins, home autometer’s, and geeks conducting system maintenance and troubleshooting.