Windows System Command Line

The command line, also called the Windows command line, command screen, or text interface, is a user interface that is navigated by typing commands at prompts, instead of using the mouse. For example, the Windows folder in a Windows command line is 'C:Windows>' (as shown in the picture) and in Unix or Linux, it may be '%' or '>' depending on the shell. Unlike a GUI (graphical user interface) operating system, a command line only uses a keyboard to navigate by entering commands and does not utilize a mouse for navigating.

  1. Command Line Commands
  2. Reboot Windows System Command Line
  3. Windows 10 Command Line Tools
  4. Windows System Log Command Line
  5. System Check Command Prompt Line
Line

Why do people use the command line?

Symantec helps consumers and organizations secure and manage their information-driven world. Our software and services protect against more risks at more points, more completely and efficiently, enabling confidence wherever information is used or stored.

Although using a command line interface requires the memorization of dozens of different commands, it can be valuable resource and should not be ignored. Using a command line, you can perform almost all the same tasks that can be done with a GUI. However, many tasks can be performed quicker and can be much easier to automate and do remotely.

Command Line Commands

For example, users who have Microsoft Windows may find a task such as renaming 100+ files in a folder, a very time intensive task. However, renaming 100+ files in a directory can be done in less than a minute with a single command in the command line. The task could also be automated using a batch file or other scripts to run instantly.

Example of doing a task in the command line

For someone with little or no experience with a command line, it may be difficult to grasp how the command line is used. Below is an overview to help demonstrate a task done in the Windows command line and in the Windows GUI.

Move all .txt files to a backup directory in a Windows command line

  1. Move to the directory containing the .txt files using the cd command. For example, you could move to the hope user's documents by typing 'cdusershopedocuments' at the prompt.
  2. Once in the directory, if a backup directory did not exist you could use the md command and type 'md backup' to make a new backup directory.
  3. Finally, to move all .txt files you could use the move command and type 'move *.txt backup' to move all .txt files to the backup folder. The * is used as a wildcard.

Move all .txt files to a backup folder in a Windows

For a comparison to the above command line steps. Below are the steps on how to perform the same action (moving .txt files) in Windows.

  1. Open the drive and folder containing the .txt files. For example, you could move into the C: drive and navigate down to the Users folder, Hope folder, and then the Documents folder to open the documents for the hope user.
  2. Once in the folder, if a backup folder did not exist, you could right-click in the folder, click New, select Folder, and name it 'backup' to create a new backup folder.
  3. If Windows Explorer is not showing the files in the Details view, click the View tab and select Details.
  4. Click the Type column to browse files by type.
  5. Right-click on the highlighted and select Cut.
  6. Open the backup folder and in that folder right-click and then click Paste to move all files into that folder.
Windows System Command Line

As demonstrated in the two examples above, performing the same task in a command line does require learning at least three commands. However, once these commands are known, it requires less steps in a command line than in Windows. These same commands could also be used in a batch file or other scripting language to automate the process. For example, you could automate the process of backing up files by copying the files instead of moving them. Once the commands have been written in a batch file, all you would need to do is double-click the batch file to perform all the copying.

Windows System Command Line

Command line commands

There are hundreds of different commands that can be used in a command line. Remembering all the commands, syntax, and options of every command would be impossible, which is why we've created the below pages. Below are links to our Windows command line, MS-DOS, Linux, and Unix command listings. Each of these pages has hundreds of commands with full syntax and examples of how to use each command.

Text interface with menus in a command line

A text interface can be made easier to navigate using menus created with text and ASCII extended characters. For example, many command line text editors use an interface with menus and shortcut keys that make navigating the file being edited easier. The picture below is an example of the MS-DOS editor used to edit files while at the MS-DOS or Windows command line.

Although a text interface with menus has a lot more visual appeal than the command line, this interface is still considered a text interface and not a graphical interface.

Should I learn a command line?

Reboot Windows System Command Line

We're strong believers that you should learn as much as you can about computers to make using a computer easier. Having a basic understanding of the command line from reading this page gives you a much greater advantage than someone who is unfamiliar with its capabilities. Below are some reasons you may want to learn even more about the command line.

  • You need ways to manage files faster and easier on a computer.
  • You work with computers remotely.
  • Manage files on a file server or web server (e.g., managing a web page).
  • Need to automate commonly performed tasks.
  • Want to learn even more about computers.

Should I use 'command line' or 'command-line' in my writing?

Both 'command line' and 'command-line' are acceptable and widely used in today's writing. When used as an adjective before a noun, you should use 'command-line' (with a hyphen) in your writing to help prevent confusion. For example, in the sentence 'Make sure you entered the correct command-line parameter.' the word 'command-line' is describing a type of parameter.

When used as a noun, use 'command line' (with no hyphen) in your writing. For example, in the sentence 'Open the command line.' the use of 'command line' is used as a noun.

Related command line pages

Argument, CUI, Elevated command prompt, MS-DOS, Operating system terms, Virtual real mode

Have you ever wondered why you can just type ipconfig into a command prompt and it works, but when you want to use a command line program you downloaded you have to navigate to its directory first? Here’s how to fix that using the Windows System PATH.

Windows 10 Command Line Tools

What Is the Windows System PATH?

If you’ve downloaded a program for the Command Prompt–like ADB, the Android Debugging Bridge–you can’t just type adb in the Command Prompt to run it, like you can with Windows’ built-in commands (e.g. ipconfig ). Instead, you have to tell Command Prompt where to find that file, by typing in the full path of the EXE:

That’s a lot of typing, though, especially for something you have to run often.

The Windows System PATH tells your PC where it can find specific directories that contain executable files. ipconfig.exe, for example, is found in the C:WindowsSystem32 directory, which is a part of the system PATH by default. When you type ipconfig into a Command Prompt, Windows doesn’t need to know where that EXE is–it’ll check all the folders in its PATH until it finds the right one.

Windows System Log Command Line

If you want the same convenience with a program you downloaded (like ADB), you need to add its folder to Windows’ system PATH. That way, when you need to run adb, you can just run:

No extra typing necessary.

How to Add a Folder to Your PATH

RELATED:How to Install and Use ADB, the Android Debug Bridge Utility

The first several steps of the process are the same for Windows 7, 8, and 10. Start by pressing the Windows key to open up the Start Menu or Start Screen, then search for “advanced system settings.” You can alternatively browse through Control Panel to System and Security > System and click on the Advanced system settings hyperlink in the left hand pane.

Once the System Properties window opens, click on the “Environment Variables” button.

System Check Command Prompt Line

In the “System Variables” box, look for a variable called Path. Select that and click on the “Edit” button.

This is where things are different between the versions of Windows—it’s the same for 7 and 8, but slightly different (and easier) in Windows 10.

In Windows 7 and 8

In 7 and 8, the variable value for Path is nothing more than a long string of text with various locations around the system. We’ve put the ADB executables in C:Androidplatform-tools on our machine, so that’s the location we’re going to add.

In order to add an entry to your path in Windows 7 and 8, you have to precede the folder with a semicolon, like so:

Add that exact line at the end of the variable value (make sure not to delete any of the existing text in the value!) without a space. Click OK, and you’re done. Simple.

In Windows 10

In Windows 10, this process is both easier and less confusing. Once you’ve clicked the edit button, a new dialog box will appear with each location in the path on a separate line. This is a dramatic improvement over the way previous versions of Windows handled path locations, and makes easy work of adding a new one.

First, click the ‘new’ button, which will add a line at the end of the list. Add your location— C:Androidplatform-tools in our example—and hit Enter. There is no need to add a semicolon like in Windows 7 and 8. Click the “OK” button and you’re finished.

The Android Debugging Bridge should now be accessible from any command prompt, no need to specify its directory.

READ NEXT
  • › Confirmed: Windows 10 Setup Now Prevents Local Account Creation
  • › How to Disable the Apple Watch’s Always-On Display
  • › How to Back Up Your Stuff and Switch to a New Mac
  • › Is the Mac Pro Overpriced Compared to a PC?
  • › Just Bought a Mac? 14 Essential Apps You Should Install