Introduction to concept of windows command line :: DigitalStage Blogs

Hello everyone having trouble with command line in windows. Most likely you are here because you found that to forward your knowledge on something related to computers(like programming and such) you found that you need to understand the usage of command line. So, here's this little article to help you with that.

As I have mentioned in other articles, a command line shell is an alternative to modern day graphical imterface also known as GUI. The article talking about the difference between a GUI and command line interface or CLI can be found in the link below:

Introduction to Windows Command Line Interface (CLI)

Some basic concepts before you start:

What is a File?

A file in computer terms is a collection of data or information that can be recodnized with a name known as filename. In a computer, there can be many different types of files, like a data file, a text file, a program file or directory file. A file can traditionally be thought as a file that one would find in a office cabinet.

Whatever program created or uses a file is responsible for being able to read and write it's content. Similar types of files are said to be of a common "format." In most cases, the easiest way to determine a file's format is to look at the file extension. For example, these days your Microsoft Word files are stored as a docx format, excel file is stored in a xlsx format a text file a txt format and C++ file could have a cc format. Generally a file format is three characters(Could be more or less) after the last dot character in filename.

What is a directory?

In windows, a directory and folder is referred interchangeably. Normally, a directory in computer is a container that is used to organize folders and files into a hierarchical structure. Again, traditionally you can think of a directory as a cabinet in office that contains folders inside and then files inside them. The top most directory is called a root directory. In windows root directory is normally known as C Drive otherwise written as C:

Different partition in windows create different root directory. These root directory is normally known with a letter in windows, as C:, D: and so on.

What are Environmental Variables?

Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.

They are part of the operating environment in which a process runs. For example, a running process can query the value of the TEMP environment variable to discover a suitable location to store temporary files, or the HOME or USERPROFILE variable to find the directory structure owned by the user running the process. [Courtesy: Wikipedia]

Using these environmental variables, currently running process, in our case, the cmd window can find out what are the commands that it can use.

What is Internal and External Commands?

In MS-DOS or command line in windows, there basically is two way to executing an command: Internally and Externally. An internal command is an command is embedded in the command.com itself. For example commands like cd (Change directory), cls (Clear Screen) and so on. And in contrast, an external command in windows are the commands that require some external files and are not originally included in command.com.  For example chkdsk, ping and so on.

After you have that concept in your head, let's get started with Command Line in Windows.

To start a command line shell in windows, which is XP or lower, you can goto:

Start -> Run

And then type in 

cmd

In Vista and above, just press the windows key and type in cmd and press enter and you will get to see a window like below:

\\"\\"

After you have that window then you are in a command line mode in windows. With this window you have all the power an operating system can possibly give you. Here you will type in commands to do certain tasks that you would normally click some mouse buttons to perform. Like creating a new directory, a new file, to see what is in current directory or location for example in your "My Documents" folder and so on.

Here are some basic commands in cmd line commands:

[To be finished...]

Other Articles:

someImageHello everyone,

This is a very basic tutorial that involves on showing you how to get started with writing on C++ programming languages. I have a complete video on this. You can find it here: Getting started to C++.(Opens in new window).


Last modified: 11 years ago By: Suzzett

Let's say hello to C++ programming world:
#include<iostream>
using namespace std;
int main()
{
  cout << "Hello World" << endl; 
}

Last modified: 11 years ago By: Suzzett

This article is a bit of a explanation for my third video in C++ tutorial series. I will explain what are variable and data types in C++ and what you need to know about them while programming. So, let's get into it.

You can get to video here


Last modified: 11 years ago By: Suzzett

Hello Guys, I have had a lot of peoples coming to me asking about command line tutorials or at least have a little bit of understanding of command line so that they can get to my C++ programming tutorial series. So, this particular article is dedicated to those proples having trouble understanding why we use the Command Line Interface or otherwise known as CLI. I hope you will be able to make use of this tutorial to kick start your improved knowledge for computers.


Last modified: 11 years ago By: Suzzett




Comments:

Please login to post your thoughts!
 

There are no commnets yet!
 

Login

Username:
Password:
Don't have an account?
Register here
Register

Subscribe Youtube



Network DigitalStage.org


Some interesting stuffs