Diary and notebook of whatever tech problems are irritating me at the moment.


Windows GUI vs. Linux Command Line Myths

Undoubtedly you've heard the old cliché that Windows is easier to maintain because it has GUI tools for everything while Linux requires commands lines and a terminal. Any experienced Windows administrator knows the point-and-click GUI tools don't cover everything. Likewise any experienced Linux administrator knows there are many GUI tools for Linux configuration but terminal shells are available on ANY system regardless of how big or small and the ability to script any action in a platform-neutral way is too useful to give up. I just again encountered a situation on XP that required a command-line fix and it highlights the ignorance of many fanboys about the reality of Windows system administration.

I recently installed Windows XP Pro from scratch on a dual-boot system. I normally install Windows first as it doesn't play well with other OSes when it comes to the boot loader. I was using an original XP OEM CD with SP1 integrated. After installation I copied over SP3 and installed that as well. Doing it this way reduces the number of update/reboot/update cycles I have to go through with Windows Update and reduces the risk of an exploit before the process is complete. After rebooting, I run Windows Update and go through the usual Windows Update update, Installer update, activation, and WGA check. I then install all of the critical updates. There are a surprisingly large number of them considering I already have SP3. Reboot again and run WU again and install NET Framework runtimes, IE7, Media Player 11, and more updates for the updates. Reboot again and go back to WU again. Install more updates for the updates and everything else I just added. Or at least I tried as they refused to install, reporting "failed" for all of them. I went through the typical diagnostics Windows admins have learned over the years of deleting out temp files, clearing the browser settings, and attempting to install each update individually to no avail. Some Google searching turned up a blog posting about Wups2.dll not being registered properly if the system is updated through WU and not rebooted before SP3 is installed (KB943144). Of course this doesn't explain my situation as WU hadn't been used before service pack was installed. The workaround requires stopping the WU service, manually registering the dll from a command window, and restarting the service. This fixed my problem.

This isn't an unusual repair process for a Windows system. Even for Vista there are plenty of examples of command window (cmd.exe) and regedit repair instructions in Microsoft's support pages. You can ignore all the myths floating around the Internet about never having to use Unixy command lines when administering Windows systems because of the wonderful graphical tools. On Windows there are many tasks that are impossible to perform with graphical tools or are just a lot easier from a command window. The only way to avoid command line tools or regedit entirely is to write a custom graphical tool that handles those specific situations (similar to "compiling a kernel" comments from Microsoft fanboys). The fanboys will point out that regedit is a graphical tool but the reality is that it isn't much more of a "tool" than Notepad (which was used in the pre-registry days with win.ini and system.ini). An IT manager that hires an admin that doesn't know how to use regedit or command-line tools should themselves be replaced. When screening job applicants I've encountered many "certified" admins that didn't know anything about maintenance outside of the graphical tools (or even basic hardware troubleshooting for that matter). Surprisingly, I've also worked with software engineers that had a paranoid fear of even regedit. It's like they've been brainwashed into thinking that the only "proper" way to work with the registry is to use an API and approved function calls. Apparently they haven't experienced the "fun" of trying to remove auto-starting malware entries from it.

Because of the emphasis on graphical tools the skill of working at a low level with the Windows OS is a dying art. While the graphical tools lower the barrier for entry into system administration it also invites fools (with only superficial skill) to enter (and get certified) without low-level skills valuable for troubleshooting. Graphical tools provide them a flower-strewn path to anywhere they want to go but when a situation calls for them to go off the path they are lost - much to the pleasure of seasoned consultants who will guide them back to safety for a hefty fee. System administrators are not the types of users that recovery disks were intended for but unfortunately a lot of amateur admins rely on them.

The fundamental limitation of graphical tools is that trying design an interface for every conceivable configuration option, troubleshooting situation, and maintenance function ends up making the tool more complex and time-consuming to use than the task itself. There are occasions when GUIs are easier than command lines but it's usually a situation involving an over-complicated design of the underlying system than a practical improvement in efficiency. The hierarchical structure and relationship of keys and values in the Windows registry is relatively simple but the file format makes regedit a necessity. Typing in a registry key path to a command line application like reg.exe, especially one that includes a GUID, is painful. On Linux you can experience a similar difficulty when trying to work with an XML configuration file like the one pam_mount now uses.

Graphical configuration tools like regedit are not unique to Windows. Gconf-editor provides a similar interface to the Gnome GConf settings database. But the terminal isn't going away anytime soon as it's too powerful and even on Windows the DOS-derived command window is still present. Windows admins have learned to live with its limitations, switched to higher-level programming languages, or extended it with third-party utilities like KiXtart (which I've used). The Windows PowerShell is Microsoft's attempt to replace this last remnant of the DOS era and it's legacy syntax. This may be their admission of the limitations of a GUI or just be a response to the popularity of headless systems in data centers and the need for a replacement to a 20 year old shell. I haven't tried PowerShell myself as I moved away from the Windows platform before it was released. With the availability of virtualization I now just use Windows as a bloated runtime for legacy applications and I don't need to do scripting anymore (although I'll admit to playing with batch files in FreeDOS once in a while).


Ken said...

I didn't finish reading your article because the circa 1980's green on black retro style made it hard too read. There's a reason no one uses this now.

It's not cute. Stop.

Azerthoth said...

Good read and spot on.

As for the green on black, I find it easier on the eyes that high contrast black on off white.

nomasteryoda said...

I'm using Compiz and can hit the "windows" aka meta key and the letter "n" to make any component of my desktop switch to a negative color mode - even better, "meta +f" to get filters of various sorts all switchable with other meta combos... Its simple keystroke sequences done in a gui.

ftw..... bash beats the windows command line any day!

Don il said...

The sole idea of going through that install...reboot...install...reboot..ad-infinitum sounds quite scary. And a real waste of time.

No need to do that in Linux. Any version. Any distro.

It is still 80's technology.

Otherwise, nice reading.

John said...

The Green on Black makes me feel at home. Nice Article.

jhansonxi said...

If you are using any modern web browser you can just turn off the page style. In Firefox go to View > Page Style > No Style.

Alex said...

17 reboots just to make a clean install of the OS. Ja ja ja ja ja!!.
Never did that with my linux installs.

Alvarez said...

Love the green on black, makes it easy to read, and it doesn't hurt my eyes !

ahs said...

I like the green on black style. It is light, simple and beautiful.

Phillip said...

i see green on black and the like all the time when I do server administration so it looks fine to me. I guess the poster that had a problem is one of those people that cant use a command line like you point out in your article.

Lawrence said...
This comment has been removed by the author.
Lawrence said...
This comment has been removed by the author.
Lawrence said...

This isn't really about the topic, but more about the Linux desktop.

So I'll ask this, what's the point of having a GUI if it's still dependent on the command line? All the powerful operating systems in the past that a fully functional GUI was never dependent on the command line. From the AmigaOS, to BeOS, Windows and Mac. I mean Linux has a fully functional GUI, but there is so many flaws in KDE and GNOME it's ridiculous. I can understand the CLI being important for administrative task, servers, and stuff like that, but for typical uses (such as installing software) it shouldn't be necessary at all. This isn't the 80's. As long as Linux is difficult to use, it will always be a hobbyist OS. And if I was some master programmer I would definitely improve the user friendless of Linux.

jhansonxi said...

It would be nice if Windows didn't require the command line either to work around stupid bugs in common maintenance tasks. It would be nice if it included drivers that weren't years out-of-date. I shouldn't have to spend a ridiculous amount of time slipstreaming the mess together just to end up fighting with the license manager on every system. Why would I give up a centralized software repositories with several thousands of applications available for Windows Marketplace with only about 2000 (and only 26 certified for Vista)? Until it "just works" users will always be dependent on OEMs to install it for them or VARs to rape them afterwards.

Carl D said...

Anyone who has ever been responsible for ms windows desktop administration in a non-ms enterprise knows the importance of command line skills. There is simply no way to manage large numbers of desktops in a Un*x enterprise without knowing how to edit the registry, manipulate the file system and run commands via scripts delivered by an enterprise software management system. I'd hire a command line warrior with knowledge of Un*x, DOS, m$ windows and maybe even mainframe computing environments over an MSCE any day.

About Me

Omnifarious Implementer = I do just about everything. With my usual occupations this means anything an electrical engineer does not feel like doing including PCB design, electronic troubleshooting and repair, part sourcing, inventory control, enclosure machining, label design, PC support, network administration, plant maintenance, janitorial, etc. Non-occupational includes residential plumbing, heating, electrical, farming, automotive and small engine repair. There is plenty more but you get the idea.