Login Register






The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.
Thread Rating:
  • 0 Vote(s) - 0 Average


[Explanation] CLI(Command Line Interface) Basics filter_list
Author
Message
[Explanation] CLI(Command Line Interface) Basics #1
This is one of MY Tuts I made official on another site.

UNDERSTAND THIS IS FOR REAL BEGINNERS

This is not a pointless thread. This is a real topic I hear people having issues with and I think its a prevalent topic in today's new GUI formatting. Normally people don't know what goes on behind the program and this topic will explain that in a more restricted sense toward the CLI format.

Foreward
Any person in the IT field needs to know basic CLI (Command Line Interface). Now, normally people who see that when they are in the middle of a hack go, "Why do we need to do this old stuff?" or "What is this bullshit, I have Windows 8 not Windows 3.1!" Anybody who is a SUCCESSFUL HACKER has to know these basics and honestly it wouldn't hurt to know things about this area.

Deciphering CLI


So, how does it work? Its just as if your having a IM(Instant Message) session with your computer. The Computer starts off the conversation with a specific set of characters called a Prompt.

Code:
Computer: Would you like to play a game?
Human: _

You proceed to type a command..

Code:
Human: What kind of game?
Computer: _

The PC then executes the command and most likely displays information about the command you specified.

Code:
Computer: A very fun game.
Human: _
(If you haven't caught on that's a scene from the movie War Game)

Once you get your new Prompt it means your able to put in your next instruction. Smile
In today's new GUI's (Graphic User Interface) you can just give command by clicking your mouse. CLI is just like using the Search Bar in Google. You type in your Keyword and your press Enter. However, programs are restricted to the certain keywords that are embedded into that program.

Example of CLI: Let's say you want to open up and view the contents of a specific folder. From the command line, you would type a command(in this case "dir", we will discuss that too), and the computer would respond with a screen like this one.
Spoiler:
[Image: 4d79924a03fe7388aacc87875d0830d9.png]

In GUI, you would navigate to your C Drive(like a normal person) look for Users and then your name. Then it will display the same folders, just with more pizazz and pretty colors.
Spoiler:
[Image: 7f843cef0317db715f4655b6da802dcc.png]

The point is that whichever interface you might use, the output is essentially the same.

Accessing the Command Line


There are several ways to get the Command Line using the Run Dialog Box

Windows XP: Click Start -> Select Run -> Type "cmd" or "command" (without the quotes) -> Press Enter (on your keyboard)
Windows Vista or 7: Locate the search bar in Start -> type "cmd" or "command" (without the quotes) and press Enter (on your keyboard)
Windows 8: On the keyboard hold down the windows key (4 tiles button) and press "R" -> type in "cmd" or "command" -> press Enter (on your keyboard)

Alternatively in the start menu under programs, there's an accessories link and you should click on the Command Prompt application.

If you take time to notice in this picture:
Spoiler:
[Image: 4d79924a03fe7388aacc87875d0830d9.png]

The default location the CLI refers to is the C:/Users/UserName.

At any point in the CLI you can type in the command "exit" and press Enter and the Window will close.

Command Prompt


Command Prompt is always focusd on a specific directory or folder (as most will call it). Any commands you give will be focused only on the objects found at where the command prompt is focusing. If you see a prompt look like this:

Code:
C:/>

You should know that it is focused in the C Drive.

If the prompt looks like this:
Code:
C:/Users/303315

It will be focused on the 303315 location.


File Names and File Formats


Windows recognizes each program and data as an individual file. Each file has a name, which is stored with the file on the drive.

Fun Fact: In true Windows DOS file types, none can be longer than 8 characters long. The file extensions can only be 3 characters long. Most computer programmers still honor those limits in reference to the basic Lets look at the unacceptable characters that cannot be included in the file name. Examples: ( / \ [ ] | + = ; , * ? ). The Period or dot is ALWAYS going to separate the file name and the file extension. This format or system was known as the "8.3 Naming System". (The name being 8 character and 3 character to represent the actual format)

All file types that are accepted throughout the system are based on Microsoft DOS. If we look at those file types by referencing the above information:

Code:
john.exe
system.ini
test2.doc
driver.sys
logo [no extension just makes it a file]
teln.h
Those are the acceptable true file types that you can find on every OS.

Other File Types like:

Quote:4charext.exec
waytoolong.fil
bad?char.bat
.no
These are not acceptable True file types. (inside the file names i showed the reason they were not true. char is short for character)

The extension is the MOST important part of the file type. The reason why is because the extension tells Windows what program the file should open with.
Program files use ".exe" (for executable) or ".com" (for command)
Anything that is not a program is some form of data to help support that program. Different programs use different types of files. For instance, Microsoft Word uses ".docx" (or .doc for versions prior to 2007), while WordPerfect uses ".wpd" and Powerpoint uses ".pptx" (or .ppt for older versions before 2007)

Changing the Extension of a file does NOT change its contents. All it does is confuse Windows into not knowing what program to open it with.

All files are stored on the hard drive in binary(Click here for info: http://bit.ly/11rIRMw) format. But every program has its own way of reading and writing this binary data. Every unique method of binary organization is called a file format. In order for programs to understand each others format, there had to be a common database of binary. This is now called "Ascii" or "American Standard Code for Information Interchange. Ascii defines 256 eight-bit characters. Alphabet letters, numbers, symbols.

Ascii was great for a base of communication. Soon after, people around the world were being involved with computers and they needed their own version that incorporates their language. Eventually, the Unicode is invented and now it incorporates every character in most languages. the first 256 will always be the same as a tribute to Ascii.

Drives and Folders


When working with a CLI environment, you need to be able to focus the prompt at a specific drive and then the specific folder thast contains the programs and files you need to access. This can be a bit more complicated than it sounds like.

When Windows is booted, drives get assigned a letter(or name) to each hard drive partition(click here for info http://bit.ly/141ssE2) and to each disc or floppy drive. This is the order they are booted
Code:
A:/   <- Floppy
B:\   <- Floppy (if installed)
C:\   <-Hard drive
all the way to
Z:\   <- Hard drive (if have more than one installed)

Optical Drives (or Disc Drives) are labelled a letter right after the last hard drive is installed

Whatever the Drive may be called, Windows uses a Hierarchical directory to organize the contents of those drives. All files are pulled into a group called a Folder. You'll hear techies say "Directory" instead. That's a term used in the DOS days. A folder can be inside another folder (called subfolders). However, 2 files cannot be named the same thing. Any folder that starts as the first folder of many more is called the "root".

When you describe a drive, you use its letter and a colon.
Quote:Code:

The C drive
C:
To describe as a root you add a backslash
C:\

The exact location of a file is called its Path.

Code:
Possible paths
C:\Program Files
C:\WINNT\System32
B:\Reports
D:\


This was created by me(303315) on another forum. I allow people to use this for EDU purposes only. Copying and pasting is fine as long as you refer to me please.
[Image: twyq7AI.gif]

Reply

RE: [Explanation] CLI(Command Line Interface) Basics #2
welcome is a little bit of extension

Reply

RE: [Explanation] CLI(Command Line Interface) Basics #3
(07-07-2013, 09:30 AM)dontdull Wrote: welcome is a little bit of extension

What are you talking about sir? i dont know what you mean at all...
[Image: twyq7AI.gif]

Reply

RE: [Explanation] CLI(Command Line Interface) Basics #4
The only other thread I could find of this was on HF, and by him. Well done, OP.
[Image: F4Z9Dqw.png]

Reply

RE: [Explanation] CLI(Command Line Interface) Basics #5
(07-12-2013, 03:22 PM)BreShiE Wrote: The only other thread I could find of this was on HF, and by him. Well done, OP.

<3 thanx breshi Smile took me a while to make it
[Image: twyq7AI.gif]

Reply

RE: [Explanation] CLI(Command Line Interface) Basics #6
it's cool tutorial for CLI, love it Biggrin
[Image: KApAKtG.jpg]

Reply

RE: [Explanation] CLI(Command Line Interface) Basics #7
I didn't read all of the OP both because I don't use windows, and because I learned batch scripting and the windows CLI when I was actually on windows. I have one question; are there really people out there that think that a CLI is outdated that want to crack and hack on things? Or people that do actually actually get into cracking on windows but have never touched the Windows CLI? Pretty surprising to me to be honest.

Very nice tutorial, OP, high quality and informative for someone looking to start using the Windows CLI.

Reply







Users browsing this thread: 1 Guest(s)