SEARCH

How-To Geek

What You Said: Do You Use the Command Line?

Untitled-9

Earlier this week we asked you to sound off with your love (or lack there of) for the command line. You sounded off in force and now we’re back with a comment roundup.

It turns out you all pretty much love the command line with that love ranging from not even liking Graphic User Interfaces (GUIs) to using the command line to get serious work done but having a long standing affair with your OS’s GUI.

Many of you lamented the poor command line implementation in Windows—especially after you’d had experience with other operation systems. Mike writes:

Of course. Some things are easier that was. Like ping and ipconfig. With a strong Unix background I still write and use batch files. It would be nice is the command line included more nice things like grep, sleep, touch. Maybe, someday, Windows will mature into a full OS.

Ouch. Chris quickly followed this comment with a way you can get all that command line goodness in Windows:

After using Linux for some years I started missing all the power of Bash, Perl and the simple tools like base64, gzip, dd in Windows. Now I have Cygwin installed on all of my Windows computers and use Bash for lots of stuff; finding files (find!!!), editing (vim), renaming and even git.

Even native Windows users who weren’t trying to emulate the expanded functionality you find with the Linux command line found plenty of useful things to do with it. Merlin writes:

I often use it. There just are things that are easier done with the command line. And I use batch/command files also. To install some programs with different options without having to go through all the clicking. A preconfigured install so to speak. Most installs have the possibility to work with command line parameters, so I put them in a batch file and run that to install the program on multiple PC’s. Saves me a lot of clicking.

Brodiemac highlights how command line work is becoming something of a lost art and why it’s still relevant even for Windows users:

If you want to automate your Windows 7 deployments, you need to know command line for ImageX, sysprep and diskpart. I’ve worked side-by-side with Engineering grads from RPI who couldn’t do any of these while I ran typed circles around them with my lowly associated degree and 30 years experience with the command line.

Joe shares a reason many of our code-junkie friends have started living an entirely mouseless existence:

I use the command line because the mouse hurts me. My RSI issues are mouse-related, so I try to use it as little as possible, which means I stick to the keyboard as much as possible. So, keyboard shortcuts for GUI programs rule the day.

Besides that, the CLI is much more powerful than most GUI’s for things that I do, which is very programming-centric. You can’t beat “ps -ef | grep java | grep -v grep | wc -l” or “ant clean dompile deployhv deployrvm javadoc” with a GUI.

Alternatives for GUI programs are useful, too, like Emacs dired instead of Windows Explorer or Nautilus. Emacs is very good at replacing lots of GUI programs for me.

Of course, when it comes to creating Word docs or Spreadsheets, you need a GUI.

It would be remiss of us to not include a sample from the small pool of dissenters. Njitram writes:

Terminal is the main reason I refuse to use Linux. It’s fine for batch scripts and very short commands such as “make” or “ipconfig” but anything long should have a GUI. I know plenty of people don’t share my opinion but even more do. So there, that’s my view on things.

Dan echoes this sentiment:

As little as possible. I left DOS or Windows almost twenty years ago, and while I am still quite adept at using the CLI, I would prefer to do things on Windows GUI. And I can still create and run batch files without opening CMD. I played around a bit with Windows Powershell but decided it’s not for me.

On Linux the CLI/Terminal is still a necessary evil, though I try to avoid it. Given a choice, I’d rather use a GUI frontend than to meddle with the CLI.

GUIs are pretty great. I think we can all acknowledge that without them computing simply wouldn’t be where it is today. Mass adoption of computing, the spread of the internet, the evolution of the web, all those things depended on lots of non-technical people seeing the computer in a way they could use and understand it.


We received 200+ responses to this Ask the Readers post; hit up this link to check them all out. Have a strong opinion about the command prompt one way or the other? It’s not too late to sound off in the comments.

Jason Fitzpatrick is warranty-voiding DIYer and all around geek. When he's not documenting mods and hacks he's doing his best to make sure a generation of college students graduate knowing they should put their pants on one leg at a time and go on to greatness, just like Bruce Dickinson. You can follow him on if you'd like.

  • Published 06/24/11

Comments (27)

  1. Bryan Cuneo

    In my opinion, GUI’s and CLI’s both have their place. For simple things (like ifconfig, lspci, etc.) the command line just makes sence. You type one word and you get exactly what you need. Some things need both. Installing software, for example. If I know exactly what I want, I simply type sudo apt-get install whatever. It’s faster than a GUI and it’s no nonsense. However, if I just want to explore packages, a GUI is certainly the way to go. Then there are things like web browsers. I don’t know about you, but browsing facebook as text-only doesn’t seem extremely appealing to me.

  2. Brodiemac

    WOW, did I really mistype that much in my reply? Shame on me and my proofreading skills.

  3. Chirag

    find already exists in cmd on windows….

  4. Kafka

    Wow, there really are people with 30+ years of experience using computers. /feelingold.

  5. Merlin

    I perfectly understand that a lot of people never use the CLI.
    My wife for instance, and I know that may not be ‘the’ refference, is all too happy if she can get her computer started and if she can start her wordprocessor with a double-click.
    She knows nothing about the prehistoric age when computers spoke DOS. She’s a click-woman.
    No offence to that.
    An admin on the other hand needs to know the CLI to get some things done.
    I use a mixture of CLI and GUI. It just depends on the task I have to do.

  6. Todd

    I use the command line every day, and often have two or three console windows open to do all sorts of different jobs:

    - ipconfig, ping, tracert as others have mentioned

    - copying files to remote user’s systems or desktops

    copy installer.exe \\pcname\c$\install

    - starting other GUIs, for example “appwiz.cpl” to run Add/Remove Programs

    - opening websites: start http://www.howtogeek.com

    - running the Python interpreter for quick calculations, formatting text, or testing example code

    - dump clipboard text to a new file: copy con filename.txt, then right-click to paste, then Ctrl+Z

    - running a handful of Python or VBScript scripts for all sort of things, like password resets, database comparisons, reformatting and uploading pictures to our website, looking up user info

    - and most powerfully, running SysInternals PSExec to open a command prompt on someone else’s computer:

    psexec \\pcname cmd.exe

    from there I will run ipconfig or other commands to see what things look like from that computer’s perspective – extremely handy when the machine is on the other side of the state

    I created an AutoHotKey shortcut Window+P to open a command prompt, and Window+Y to open a Python interpreter. I use both windows, and many of these commands, several times a day.

    Although there is still plenty of room for improvement, the Windows CLI is way more powerful than it used to be, and I wouldn’t be nearly as productive on the computer without it.

  7. Chris van Marle

    This article makes me wonder; does no one use Windows PowerShell?

    Quickly scanning through the ‘Ask the readers’ article, there seem to be not too many positive comments about PowerShell.

  8. Blisk

    People complaining about Linux and its need of CLI don’t realize that Ubuntu doesn’t force the Terminal at all anymore. There’s a GUI for everything unless you want to use the Terminal. It’s harder to use the GUI apps because it’s not as fast, in my opinion, but they’re there…

  9. Mark Ewert

    I LOVE POWERSHELL!

    In my opinion it has finally provided a “real” shell for the Microsoft platform. And the add-on cmdlets from other vendors and enthusiasts, it’s possible to automate just about anything.

  10. Jeff Jeff

    There’s an alternative to NOT using the command line? Nah, can’t be…

  11. Domenico

    Hello!
    Fortunately there is a GUI, otherwise I couldn’t switch from Windows to Ubuntu without pains.
    I’m really not “professional”, so people like me(I suppose at least 70% in the world) needs a GUI because it allows us to discover, to try and to love Linux!
    Now I use the CLI in a very very few moments and my computer is stable, fast and secure!
    Thanks to Linux and Gnome!

    PS: sorry for my english…….

  12. Cap'n Obvious

    Give me a full command line environment (Linux will do) any day. I work remote and support issues pop up all the time. Ever tried to explain to anyone — minus personal interaction — how to use a GUI to accomplish some specific goal? (“See that little twisty on the right? Hit it. No, no, no, not THAT twisty, the OTHER one. Whaddya mean you can’t get back?”) On the other hand, I can send them the exact cmdline magic that does the trick 100% of the time.

    You will find out that the inability to explain GUI usage has turned into a “let me have control of your computer” demand from truly good help desks, and no, I don’t think I have to tell you how that scares me.

  13. sanjay

    Why is the graphic for this article showing the c prompt with a forward slash? Sorry, if that sounds pedantic, but unless we’re in the UNIX environment, it should be “C:\” not “C:/”

    The latter will only display an error.

    Just saying…

    Oh, and I live in the cmd prompt, funny how I can get more done with a 5-line batch file than a 500 line VB script.

  14. Alex

    PowerShell, now installed by default on new versions of Windows, is as powerful, if not more so than BASH. It’s also part of MS’s common engineering criteria, so will be fully supported in all of their enterprise tools moving forward (and already is on most). While piping objects vs text does take some getting used to, once you do there is no turning back. Anyone who believes that Windows doesn’t have a robust shell or scripting environment needs to take another look.

  15. DHANHURLEY

    Hi from Schwaben,Germany.But still the CLI is VERY ANTIQUATED.Try TERMKIT (a work in progress) and you will be very surprised.But truly the computer is the TOWER OF BABEL, all those different , and conflicting standards.Has anyone heard about TERNARY,in contrast to BINARY.Ciao,Dhan

  16. ThunderingSacred-Ibis

    I love the command line because it gets allot of things done. there is so many tools that can be utilized and if all of them would have a GUI (by default) that came with the OS’es then it would required allot of unessesary resources (RAM/HD space , etc,,,) My only problem is with windows command line is that there needs to be tabs for the command line. for example: if i am running on a large drive and while it is running i might want to do a defrag on another drive while a chkdsk is running in the back-ground and then another tab can do other general tasks.

  17. David Vazquez

    I guess i’m too late for this one, but I do sysadmin for Windows and Unix/GNULinux servers so I basically use CLI all day long.

    Basically on Windows I like it for time saving purposes and on GNULinux and Unix I love bash shell really for server administration I feel more comfortable working straight with the commands I need rather than using a GUI which in my case have proven to be unreliable.

    Sure, CLI is not for everyone unless of course you actually know what you are doing.

  18. Danny

    I’ve never lost a night’s sleep over the C word. Am I from the quantum world ?

  19. Steve-O-Rama

    LoL @ Danny. “The C word…” Ha!

    To quote my dad (and his), “use the right tool for the job.” I find this advice to be vital in more areas of my work, and life in general, as time goes by.

    I design & create custom automotive embedded system stuff, mostly with AVRs and other nifty, popular uC platforms. There are distinct spans in the process of development and refinements where I need to specify exactly what’s going to happen. That’s when I *live* in the terminal (or ‘command line’ as Windows users call it); with avrdude, gcc, and programs with a small number of switches and options, this is sometimes the only way to do it, literally. Sure, there are excellent GUIs for this work like AVR Studio, and when it’s faster I’ll use it, but in the time span it takes me to open the appropriate menus and specify what I want/need, I could’ve typed it all out on the terminal and been done. The same goes for batch scripting, running programs I’ve created in C/C++, or creating/moving files (although I concede TeraCopy is pretty great).

    On the other hand, when I want to ‘step through’ a program, that same AVR Studio program is a godsend. It lets me see exactly where I screwed up, and fairly quickly. :) I can also WATCH what’s happening in the uC using the simulator, something that’s not possible (or practical) in a terminal. Sometimes, a program like Notepad++ or gVim is best, and blurs the line, sort of, IMO, between the two. Whatever is easiest and proper is what I use. Why should I expend more time, energy, and thought on something, when there’s a million things on my daily ‘to-do’ list already? If I’ve got a screwdriver in my hands and there’s a nail to drive, I’m going to go out and get my hammer! That said, another quote that comes to mind: it’s a poor musician that blames his instrument.

    Cygwin & Powershell are analogous to bleu cheese & thick-cut bacon. Not for everyone, but if it blows your skirt up. . . yeah, I like both!

  20. Buffet

    CLI?? GUI???….F.B.I. I.O.U. IUD!!

  21. ken nelson

    I an 72 and I don’t write much code anymore. Now I teach two courses on the web and use Blackboard, a gui program for that purpose.

    When writing code on Unix I used to keep three windows open. One for writing code, another to compile, a third to test. My problem with Windows is when you click on something, that window covered up the whole screen. With window X, you could only see a square inch of screens and you could put your cursor there and type CC prog and still have the other screens readily available for testing and whatnot.

    I still write batch files on occasion. Commands like grep are far superior to window find. I find the Lenux can often be used in place of Windows. If you are editing files and such, Lenux with open office is superior to Windows and it’s free. Using Ubanu Lenux you have access to Dos/Windows files that you can edit and use in either system. Lenux boots almost instantly with far fewer problems than Windows XP which is probably the best windows. I have students using many operating systems. Students using Macs seem to have the most problems.

  22. malachipclover

    What about for CraftBukkit Minecraft servers? Anyone have those? They use CLI.

  23. Beverly

    Ok, you all are way “Geekier” than I am. I have no ID about most of what you are talking about. I’ve heard of batch files, but have no idea what they are or how to use them.

  24. Tezac

    HKEY_CLASSES_ROOT\Directory\shell\CmdHere

    Value 0

    REG_SZ
    CMD &Prompt Here

    HKEY_CLASSES_ROOT\Directory\shell\CmdHere\command

    Value 0

    REG_SZ
    cmd /k pushd “%1″

    INSTRUCTIONS.
    For Command line Here.

    This Registry entry enables the command prompt here to be shown when you right click in explorer.
    It will open the command prompt in the directory that you are in when you do it. (Saves a lot of time!)

    AS ALWAYS. BACK UP YOUR REGISTRY BEFORE TRYING THIS.

    Manual instructions below, OR if you create a txt file and copy and paste ALL the above coding in, down to but NOT including INSTRUCTIONS. Then rename file to whatevername.reg (The “.reg” being the important bit!) Then double click it, it will automatically create the registry entries for you.

    If done manually make sure the text in the [ ] is typed exactly as shown but WITHOUT THE SQUARE BRACKETS.

    a: Click Start and Run, type [regedit] and press enter.

    b: Open key HKEY_CLASSES_ROOT\Directory\shell

    c: Add new key under shell named [CmdHere]

    d: Edit it’s (Default) value, and change the value to [CMD &Prompt Here].This text will appear on the right click menu.

    e: Add a new key under CmdHere named [command]

    f: Set it’s (Default) value data to [cmd /k pushd "%1"]

    Those were the days eh! I have fogotten most of the CLI commands now. The ones I know only open up windows programs. Indeed, I believe a lot of the old commands are no longer included with windows anymore. Compatibility issues!
    Anyway all the best and Enjoy.

  25. Tezac

    Forgot to mention. I know the above works with XP and Vista.

  26. UUUnicorn

    I wish I’d never gotten involved with the Command Line in Linux. Now, my netbook won’t boot into ANY OS–XP Home OR Xubuntu.

    I guess that I’m strictly a GUI person.

  27. durr

    itt: zomfg

Enter Your Email Here to Get Access for Free:

Go check your email!