Skip to main content

A Beginners Guide To The Windows Command Line

command lineThis is not another post about smilies. This article deals with the Windows command line.
The command line lets you communicate directly with your computer and instruct it to perform various tasks. For this you have to use specific commands. The commands are not necessarily intuitive, so they have to be learned, just like words in a language. Fortunately, there are graphical user interfaces (GUIs) replacing most procedures that formerly required using the command line.
However, sometimes using the command line is quicker or even the only way to access certain information. Thus knowing how to use the command line can be extremely valuable. And that’s where this Windows command guide comes in.
To access the Windows command line in XP, click > START > Run, type cmd into the > Open: field, and click > OK.
run

Alternatively, you can go through > Start > All Programs > Accessories and select > command prompt.
This launches cmd.exe, a window that reminds us of the old days in computer history: pure white text on a uniform black background. Despite its resemblance to a DOS windows, cmd.exe merely is a command line interpreter merely similar to DOS.
command prompt
Now that you have successfully accessed the command prompt, what is there to do here?
To operate at command prompt level, you need to know some commands. Let me give you some basics to play with.

Help

First let me say that there is intrinsic help in the command prompt. If you’re not sure whether a certain command really exists or what it does or what switches there are to it, type the command followed by a /? and you shall be enlightened.

Switches

Switches are optional extensions to a command, which change the command’s behavior. We actually saw an example of a switch in the previous section. /? is a switch to any command, explaining its function rather than executing it in any way.
Note that you can add several switches to each command, but always leave a space between the command and each switch.
Now let’s get on with serious commands.

dir

The dir command lists the contents of the current directory.
There are some useful switches to it. For example dir /d (/d being the switch) will list the directory contents in up to three columns. Alternatively, you can use dir /w, which will sort the contents differently. With dir /p the information doesn’t scroll, but pauses at the end of the screen, until you hit a random key for the next screen full of data.
dir

cd

To change directories, use the cd command.
Pick a directory seen in the previous dir listing. Directories are indicated by
in the directory listing. For example type cd desktop and you will switch into the Desktop directory. Type cd.. to return to the previous directory. To go directly to a specific directory, rather than haggling your way through each single one, type in the entire path. Let’s say you went back to C:\> and want to return to the Desktop directory. Simply type cd documents and settings\administrator\desktop. Note that switching between drives doesn’t require the cd command. Simply type in the respective drive letter and a colon, e.g. d: to switch.

mkdir

This one is used to make a directory, i.e. create a new directory. Type mkdir name to create a directory called name.

rmdir

To remove a directory, use this command. So that would be rmdir name to remove a directory called name. Only empty directories can be removed.
You can of course create and delete directories located in any other directory, you just have to specify the respective path in your command, starting from where you are.
For example mkdir documents and settings\administrator\test when you’re in C:\ or mkdir administrator\test if you’re already in the documents and settings directory.

del

This is the command to delete files. It works similar to the mkdir and rmdir commands. So you type del example.exe to delete the file example.exe in your directory. If you’re not already in the right directory, you add the respective path.
This was a short list of commands to make you familiar with the command line environment. For an entire list of commands, please refer to this list.
command prompt
We will now look at some very helpful commands for tasks that can not easily be completed by any other means. For all of them you can use the /? switch, to find out what all you can do with these commands.

driverquery

For a list of all drivers installed on your system, driverquery is the quickest solution.

ping

Ping must be the most popular command line prompt. It’s used to check an IP address and see whether the respective computer is online or responding, i.e. whether network communication between your and that computer is possible.

ipconfig

Here you can reveal network data of your own computer, such as the name of your computer in the network, your IP address or your MAC address.

systeminfo

The command to retrieve extensive information about your system, including Windows serial number, computer model, and available RAM.
This Windows command guide can merely touch on the surface of what the command line can do. For more extensive information, please refer to The Command Line in Windows and PCStats’ WindowsXP Command Prompt Guide.
If you got hooked, you might want to check out the following MakeUseOf articles dealing with the command line. Varun wrote about 10 Windows Command Line Tips You Should Check Out and he introduced Nircmd – A Power Packed Command Line Tool. Mark explained how to Change the Windows User Password via Command Line.
What command do you find most useful?

Comments

Popular posts from this blog

Build Your Own Awesome Personal 3D Avatar with Avatara

Do you use social networks and want to build your own awesome 3D avatar? Maybe you want to send someone a cute cuddly image of yourself (kind of)? Or maybe you have your own ideas of what you would do with an Avatar… Well look no further than Avatara which I discovered from the MakeUseOf directory . You can create 3d avatars out of pre-set up templates or create your own from scratch. To start, visit Avatara’s homepage . You will see this screen: Click Get Started to umm, get started! That will take you to this screen: You see that you can build your own Avatar using an uploaded head shot like the Obama one above (just an example, guys). Or roll with one of their awesome avatars. I chose to start with a blank avatar by clicking Start with a blank avatar at the bottom of the screen. That takes you to here: I clicked on the filter at the top and told it to filter out everything but male characters and then I saw this: I rolled with Buck and continued. You need to click Select...

MoviePass drops pricing to under $7 per month, if you opt for the annual plan

MoviePass, the subscription service that lets consumers pay a monthly fee to see unlimited movies in theaters across the U.S., is slashing its prices yet again. The company announced today it’s now offering its service for $6.95 per month, down from the current price of $9.95 per month, when customers commit to a one-year subscription plan. That works out to a flat fee of $89.95 annually. The deal is a limited-time promotion, as opposed to a permanent pricing change, but MoviePass didn’t say how long the offer is valid. However, it is open to both new and existing subscribers – the latter who would receive a 25 percent savings on their current subscription if switching over to the annual plan. This is not the first time that MoviePass has dropped its pricing. When the company introduced its $9.95 per month, one-movie-per-day plan this August, down from $15 for 2 movies per month (or more in select markets like L.A. and NYC, and going as high as $50), it saw so many new sign-up...

ASUS VivoBook X202E Windows 8 Touchscreen Laptop Review And Giveaway

It wasn’t very long ago when prices of touchscreen Windows 8 laptops soared beyond $1000. Thankfully, those days are behind us, and portable computers can easily be purchased – touchscreen and all – for under $500. That’s precisely the demographic in which the ASUS VivoBook X202E falls. When compared to a high-end laptop, its specifications might seem modest, but for laptop buyers just looking for a way to browse the web, watch videos, use basic apps, and not spend too much money, something in this budget is perfectly suitable. The question is, of course, how does the ASUS VivoBook X202E compare to others on the market, and is it the one which you should be spending your hard-earned money on? Well, you’re just going to have to keep reading to find out. Best of all, we are giving away an ASUS VivoBook X202E to one lucky winner. Keep reading for your chance to take home this Windows 8 touchscreen laptop! Introducing the ASUS VivoBook X202E Laptop The ASUS VivoBook X202...