Go Back   PCMech Forums > Linux Support > Linux OS and Software Assistance

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 01-25-2007, 05:11 PM   #1
Member (9 bit)
 
darkside's Avatar
 
Join Date: Jul 2003
Location: Sheffield, UK
Posts: 292
the purpose of command line?

hi there, i dont know if this question is really suited to here but i figure you guys will have the best knowledge.

Whats the command line used for?

like i mean in an every day situation, i use XP and its simple, all i do it switch it on and point and click to what i want to use. if i need to change a setting i can tick a checkbox or select an option or whatever.

i know all im doing is using a graphical interface for something i could do in the command line but why go to the effort of typing out various commands when i can make a few clicks here and there?

i see how using command line would be quicker for the computer, besause it doesnt have to mess about with loading all the various parts of the GUI, but for me surely a GUI is quicker and easyer to use than having to memorize all the possible commands?

lets for instance say i want to browse the web, i look at my computer and click the appropriate icon, and my browser is loaded.

if im doing it the other way i have to know the path/filename of my browser and then type it all out.

and heres where i get confused, when you arent using a GUI in linux and you want to browse the web, what happens then? you can open it but how does it display web pages? does it load a broswer in a window with all the pretty buttons and menus or does it somehow do it in a text based way? i cant see how it could load with all the nice features without having a GUI, and i dont see how you can browse the web with only text when even this page im writing in contains about 50 seperate image files.

and if you are using a GUI with linux, then why bother using the command line to launch your browser in the first place??????

all i use my computer for is surfing the net, talking on MSN, listening to music and playing the odd game. but i do like to mess about with it and see what i can do, even if i dont really need to, i guess this is why i want to know what the CMD is used for....i just like to mess around.

i dont see any reason to touch the CMD at all, i guess i dont have to in windows, but what about in linux, is there a REAL need to use it or is it just something people do just so they can say they do?

cheers for any replies, im just sort of intrigued
Nathan
darkside is offline   Reply With Quote
Old 01-25-2007, 06:39 PM   #2
Member (10 bit)
 
Kareeser's Avatar
 
Join Date: Mar 2006
Location: Toronto, Canada
Posts: 810
The original operating system (more or less) was DOS. That was a command line.

The first windows (1.0) was a program that you ran off DOS. Hence, everything relied on the command line functionality.

I believe it was either Windows 95 or 98 that got rid of having DOS has a prerequisite, which is why you have an MS-DOS Prompt, which is sort of a pacified version of a real command line.

Simply put, command lines came first. That's all.

As to your query about why use the command line interface at all, this is simply because it takes extra work to create a GUI frontend for a command line program (and all programs are command line programs).

Imagine you had a program that changes the display resolution, bit depth, DPI, etc, of an image on the monitor.

Not only do you have to mess with X number of resolutions and Y number of bit depths, but also Z number of DPI, and countless other variables that give virtually limitless permutations of settings, you have to program all of that into the GUI, and incorporate every single command, or make a program interpret user input to translate into a string that the machine can understand.

That takes time, money, and disk space.

Now, imagine that same program, using a command line interface. All the user has to do is specify (not the author! The user specifies) what he or she wants, inputs the complete string, and out pops the image. Much smaller file size. Much quicker. Much leaner.

(That's example 1. :P)
Kareeser is offline   Reply With Quote
Old 01-25-2007, 07:06 PM   #3
Member (9 bit)
 
darkside's Avatar
 
Join Date: Jul 2003
Location: Sheffield, UK
Posts: 292
hmm, i see what you mean, when i think of programming i think of visual basic, which is a tool with a gui for making programs gui's....... if your coding in a language that isnt that simple i can now see where the problems are.

but still, what kind of everyday program would i be better using with the command line, i can only see the command line being useful for specialist applications that dont need a lot of user input.

I guess it comes down to how you learned. If you were around in dare i say it, 'the old days' then i can see how you would be used to working without a GUI, but for people such as me and people younger who only started using computers when win95 was around, then you dont learn how to use the command line, becuase you dont have to, everything is made simple for you.
darkside is offline   Reply With Quote
Old 01-25-2007, 07:19 PM   #4
Member (11 bit)
 
Join Date: Apr 2003
Posts: 1,525
The original operating system was not DOS. That was microsoft's original operating system for the PC which they obtained from a third party and resold to IBM. Prior to that, mainframes usually ran proprietary operating systems or some flavor of unix, all of which were command line driven.
The current windows command line and prior ones from MS are very poor compared to their *nix cousins. In fact, vista was suppose to have a new unix style command line environment, but that got shelved along with most of the other cool features that were suppose to be in vista.
The fact is, you can do things from a command line that you cannot easily do from a gui because of the command line's flexibility. With a gui program, you are stuck with whatever was programed into the interface while the underlying command line tools typically have many more options available. You just can't include that many options in a gui without having a mess for a gui. Command line tools in a *nix environment can be chained or combined together to do some incredibly sophisticated things that are impossible to easily reproduce in a gui. Of course, in order to get that kind of detailed control, you have to be very familiar with a lot of commands and their options which most people don't want to do.
kilgoretrout is offline   Reply With Quote
Old 01-25-2007, 08:33 PM   #5
Come in Ray...
 
faulkner132's Avatar
 
Join Date: Sep 2004
Posts: 1,668
Reasons the command line is useful and important:

1. Command line scripts
2. Quickly generate system output to text
3. "Piping" output of one command directly into another
4. Extremely flexible and fast
5. Perform menial tasks *much* quicker than using a GUI

This is justing thinking about it for 30 seconds too. The command line is *essential* for system administrators, both Windows and Linux.
faulkner132 is offline   Reply With Quote
Old 01-25-2007, 09:29 PM   #6
Lest we forget
 
ghost2003's Avatar
 
Join Date: Jun 2003
Location: Ontario, Canada
Posts: 1,870
Quote:
Originally Posted by darkside
and heres where i get confused, when you arent using a GUI in linux and you want to browse the web, what happens then? you can open it but how does it display web pages? does it load a broswer in a window with all the pretty buttons and menus or does it somehow do it in a text based way? i cant see how it could load with all the nice features without having a GUI, and i dont see how you can browse the web with only text when even this page im writing in contains about 50 seperate image files.
If you try to load firefox, opera,etc... without a graphical shell of some sort (x-windows) it will just give you an error. There are text browsers (lynx). It can be useful to access documentation but these days, not much more.

Quote:
Originally Posted by darkside
and if you are using a GUI with linux, then why bother using the command line to launch your browser in the first place??????
A gui and a desktop arent the same thing. All it does is give you a graphical interface. It can be a full desktop with lots of pretty icons or a simple gray window that does nothing more than display your applications. Most window managers will let you make shortcuts of some kind to your applications but it will not replace a command shell, not by a long shot. Nor should it. I love command shells, if you're used to it many tasks can be done even faster than with a gui.

Even in windows CMD is useful. I use it all the time for all sorts of things.

Here's something you could try for fun. Go in google images and search for "fluxbox" (or any other window manager). Notice how almost every screenshot has a command shell window open.
__________________
redqueen: Antec Sonata, Pentium-D 2.5GHz, MSI G31M3-L, 2GB ram, 320 GB HDD, OpenBSD
hal9000: Lenovo T61, 2GB ram, 120 GB HDD, FreeBSD
ghost2003 is offline   Reply With Quote
Old 01-25-2007, 09:30 PM   #7
Member (8 bit)
 
Join Date: Oct 2006
Location: Northern California
Posts: 128
you can use it to run game servers which is allot faster than going though c drive to find application

command line can be your best friend if you program the code correctly
piff263 is offline   Reply With Quote
Old 01-25-2007, 09:34 PM   #8
Staff
Premium Member
 
rjfvillarosa's Avatar
 
Join Date: Sep 2004
Location: Cardiff, Wales. UK
Posts: 6,105
Quote:
Originally Posted by darkside
If you were around in dare i say it, 'the old days'
__________________
Niwa no niwa ni wa, niwa no niwatori wa niwaka ni wani o tabeta.
rjfvillarosa is offline   Reply With Quote
Old 01-26-2007, 01:03 AM   #9
Member (10 bit)
 
Kareeser's Avatar
 
Join Date: Mar 2006
Location: Toronto, Canada
Posts: 810
Quote:
Originally Posted by kilgoretrout
The original operating system was not DOS. That was microsoft's original operating system for the PC which they obtained from a third party and resold to IBM.
I'm aware of that, which is why I included a "more or less". I'm careful with my wording

If you really think about it, DOS was probably the first commercially successful operating system for home users...
Kareeser is offline   Reply With Quote
Old 01-26-2007, 08:36 AM   #10
Member (11 bit)
 
Join Date: Apr 2003
Posts: 1,525
Quote:
If you really think about it, DOS was probably the first commercially successful operating system for home users...
Today 03:34 AM
The original MacOS(or whatever Apple called it at the time) predates MSDOS and was the first really successful OS for home computing. IBM came out with the PC to compete with Apple and never thought personal computing would go anywhere or be able to successfully compete with its mainframe business.
kilgoretrout is offline   Reply With Quote
Old 01-26-2007, 09:24 AM   #11
Moderator
Staff
Premium Member
 
thefultonhow's Avatar
 
Join Date: May 2004
Location: Baltimore, MD
Posts: 2,918
Send a message via AIM to thefultonhow
I'd go so far as to say the Apple I and Apple II didn't even have an OS. Everything ran from floppy disk, so your OS was whatever program you loaded in at the time. The computer wouldn't even boot without a floppy. The closest thing they had to an OS was a BASIC interpreter.
__________________
Computer: Intel Core i5-750 2.66 GHz quad-core processor @ 3.71 GHz | Asus P7P55D-E motherboard | Crucial 4 GB DDR3-1333 RAM | nVidia GeForce 8600GT | 2x WD Caviar Black WD1501FASS 1.5TB hard drives in RAID 1 | Antec Sonata III case with Antec EarthWatts 500-watt PSU | Dual Dell UltraSharp 2408WFP 24" widescreens | Windows 7 Ultimate 64-bit

Other: 2005 Subaru Legacy 2.5GT sedan 5MT | Samsung Epic 4G Smartphone | Mamiya M645 1000S medium-format SLR with 55mm f/2.8, 70mm f/2.8, 210mm f/4, teleconverter, 120 and 220 film backs | Olympus E-PL1 Micro-4/3s DSLR with 14-42mm and 40-150mm lenses
thefultonhow is offline   Reply With Quote
Old 01-26-2007, 09:30 AM   #12
Resident Slacker
 
homer15's Avatar
 
Join Date: Dec 2001
Location: Suisun City, California (i know, where the hell is that?!?!?)
Posts: 2,620
command lines can be especially useful on machines where running every single command through the gui will really bog it down. sometimes just navigating between windows on a machine that is running serveral hundred processes can take a couple minutes. the command line cuts that time down considerably.
__________________
Friends help you move. REAL friends help you move bodies. - me
quite possibly the best book ever written... by me
homer15 is offline   Reply With Quote
Old 02-06-2007, 05:11 AM   #13
Member (9 bit)
 
Join Date: Mar 2005
Location: Milton Keynes, Buckinghamshire
Posts: 273
Send a message via ICQ to Ind-PC_student Send a message via MSN to Ind-PC_student Send a message via Yahoo to Ind-PC_student
You have missed the most important use of the command line ever by my experience, trouble shooting the system in case of misconfiguration is one of them.

Although the x11 windowing systemis very stable, it can also crash if the wetware makes a serious mistake with it [happened to me twice] tha command line can be very usefull to fix such problems, making reinstallation unnecessary.
__________________
Linux Counter | Linux User #289274 | Linux Machine #289274 | All Welcome!!!|

NoteBook Toshiba Satellite L300D-243 | AMD Athlon™ X2 Dual-Core QL-64: 2.1 GHz | RAM 3,072 (2,048 + 1,024) | 250 GB HDD | DVD Super Multi drive DL | Display 15.4” Toshiba TruBrite® WXGA TFT @ 1,280 x 800 | ATI Radeon™ 3100 Graphics | Internal HD 720p | HD Audio | Multimedia Bar with 6 touch Easy Keys | integrated VGA Web Camera | integrated microphone |

Peripherals Luminox Digital 5.0MP Pocket Camcorder| HP Deskjet 3050 all-in-one | Hwawei e173 3G Dongle | Hitachi 320GB USB HDD
Ind-PC_student is offline   Reply With Quote
Old 02-12-2007, 11:39 AM   #14
Member (10 bit)
 
Join Date: Nov 2001
Location: FL, the low end.
Posts: 524
I too was once, what a friend once called me, a "windows baby". I thought gui was everything, but as I get more and more experienced with programming and using useful programs, the command line is very useful. I use it to create scripts to automate some common program routines, like executing an example binary I made, etc. I also use it to run programs that take lines of arguments It's really interesting the amount of power text has .

And I installed linux on Friday and by the end of Sunday I've used more command/shell execution than I have ever in linux. I love the fact that if I want to change something in root, I have to go on the bash shell and log in as a super user and do it myself. It's very neat. navigating through in safe mode is awesome.

All in all, most of my hobby work is done in gui (IDE, video, music, etc) but command lines keep me on my toes.

Last edited by indigo0086; 02-12-2007 at 11:41 AM.
indigo0086 is offline   Reply With Quote
Old 02-12-2007, 01:07 PM   #15
Telcom Tech
 
ktkendall's Avatar
 
Join Date: Feb 2002
Location: Western, Pa.
Posts: 5,409
I use it for things like pinging and ipconfig, so my answer is that you may not use it as a basic end user but as tech I use for for network troubleshooting.
__________________
If it ain't broke, "TWEAK IT"
ktkendall is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[EM]? Whats the purpose of this tag? Punked Out Comp Web Design / Development 1 10-26-2006 08:20 PM
what is the purpose of "SERVICE PACKS" fidel Windows Legacy Support (XP and earlier) 2 06-20-2005 12:51 PM
What is the purpose of Ethernet Splitter? JBan Networking & Online Security 1 04-28-2004 08:23 AM
The Purpose of the "Macro" Key?? nordoq_starr Computer Hardware 2 10-07-2003 07:53 PM
Antivirus: Purpose of Files In Quarantine and What To Do With Files In Quarantine Harry Networking & Online Security 3 05-17-2003 10:31 PM


All times are GMT -5. The time now is 05:57 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2