February 5, 2009

The 10 most useful Linux commands

  • Date: November 25th, 2008
  • Author: Jack Wallen

Maybe the command line isn’t your favorite place to hang out, but to be an effective Linux admin, you need to be able to wield a few essential commands. Jack Wallen says these 10 are guaranteed to simplify your Linux admin life — and he explains why.


I understand that many of you don’t want to use the command line in Linux (or in any operating system, for that matter). But the truth is, to be a good administrator, you have to know the command line. Why? Well, with Windows there are times when the command line is the only thing that can save your skin. With Linux, the command line is vast, reliable, flexible, fast… I could go on and on.

And of the 2,119 possible commands from the /usr/bin directory (in Mandriva Spring 2008) and the 388 possible commands from /usr/sbin/, a few are indispensable. Here are 10 of them that might make your Linux admin life — or your introduction to Linux — a whole lot simpler.

I could make this easy and go with the most used commands (cd, ls, rm, etc — okay, etc isn’t a command, but you get the point). But instead, I am going to go with the most useful commands, and I’ll keep it as distribution-neutral as I can.

Note: This information is also available as a PDF download.

#1: top

I figured it was fitting to put the top command at the top. Although top is actually responsible for listing currently running tasks, it is also the first command Linux users turn to when they need to know what is using their memory (or even how much memory a system has). I often leave the top tool running on my desktop so I can keep track of what is going on at all times. Sometimes, I will even open up a terminal (usually aterm), place the window where I want it, and then hide the border of the window. Without a border, the terminal can’t be moved, so I always have quick access to the information I need.

Top is a real-time reporting system, so as a process changes, it will immediately be reflected in the terminal window. Top does have some helpful arguments (such as the -p argument, which will have top monitor only user-specified PIDs), but running default, top will give you all the information you need on running tasks.

#2: ln

To many administrators, links are an invaluable tool that not only make users lives simpler but also drastically reduce disk space usage. If you are unaware of how links can help you, let me pose this simple scenario: You have a number of users who have to access a large directory (filled with large files) on a drive throughout the day. The users are all on the same system, and you don’t want to have to copy the entire directory to each user’s ~/ directory. Instead, just create a link in each user’s ~/ directory to the target. You won’t consume space, and the users will have quick access. Of course when spanning drives, you cialis average age will have to use symlinks. Another outstanding use for links is linking various directories to the Apache doc root directory. Not only can this save space, it’s often advantageous from a security standpoint.

#3: tar/zip/gzip

Tar, zip, and gzip are archival/compression tools that make your administrator life far easier. I bundle these together because the tools can handle similar tasks yet do so with distinct differences (just not different enough to warrant their own entry in this article). Without these tools, installing from source would be less than easy. Without tar/zip/gzip, creating backups would require more space than you might often have.

One of the least used (but often most handy) features of these tools is the ability to extract single files from an archive. Now zip and gzip handle this more easily than tar. With tar, to extract a single file, you have to know the exact size of the file to be extracted. One area where tar/zip/gzip make administration simple is in creating shells scripts that automate a backup process. All three tools can be used with shell scripts and are, hands down, the best, most reliable backup tools you will find.

#4: nano, vi, emacs

I wasn’t about to place just one text editor here, for fear of stoking the fires of the “vi vs. emacs” war. To top that off, I figured it was best to throw my favorite editor — nano — into the mix. Many people would argue that these aren’t so much commands as they are full-blown applications. But all these tools are used within the command line, so I call them “commands.” Without a good text editor, administering a Linux machine can become problematic.

Imagine having to attempt to edit /etc/fstab or /etc/samba/smb.conf with OpenOffice. Some might say this shouldn’t be a problem, but OpenOffice tends to add hidden end-of-line characters to text files, which can really fubar a configuration file. For the editing of configuration or bash files, the only way to go is with an editor such as nano, vi, or emacs.

#5: grep

Many people overlook this amazingly useful tool. Grep prints lines that match a user-specified pattern. Say, for instance, that you are looking at an httpd.conf file that’s more than 1,000 lines long, and you are searching for the “AccessFileName .htaccess” entry. You could comb through that file only to come across the entry at line 429, or you can issue the command grep -n “AccessFileName .htaccess” /etc/httpd/conf/http.conf. Upon issuing this command you will be returned “439:AccessFileName .htaccess” which tells you the entry you are looking for is on, surprise of all surprises, line 439.

The grep command is also useful for piping other commands to. An example of this is using grep with the ps command (which takes a snapshot of current running processes.) Suppose you want to know the PID of the currently crashed Firefox browser. You could issue ps aux and search through the entire output for the Firefox entry. Or you could issue the command ps aux|grep firefox, at which point you might see something like this:

jlwallen 17475  0.0  0.1   3604  1180 ?        Ss   10:54   0:00 /bin/sh /home/jwallen/firefox/firefoxjlwallen 17478  0.0  0.1   3660  1276 ?        S    10:54   0:00 /bin/sh /home/jlwallen/firefox/run-mozilla.sh /home/jlwallen/firefox/firefox-bin jlwallen 17484 11.0 10.7 227504 97104 ?        Sl   10:54  11:50 /home/jlwallenfirefox/firefox-bin jlwallen 17987  0.0  0.0   3112   736 pts/0    R+   12:42   0:00 grep –color firefox

Now you know the PIDs of every Firefox command running.

#6: chmod

Permissions anyone? Linux administration and security would be a tough job without the help of chmod. Imagine not being able to make a shell script executable with chmod u+x filename. Of course it’s not just about making a file executable. Many Web tools require certain permissions before they will even install. To this end, the command chmod -R 666 DIRECTORY/ is one very misused command. Many new users, when faced with permissions issues trying to install an application, will jump immediately to 666 instead of figuring out exactly what permissions a directory or folder should have.

Even though this tool is critical for administration, it should be studied before jumping in blindly. Make sure you understand the ins and outs of chmod before using it at will. Remember w=write, r=read, and x=execute. Also remember UGO or User, Group, and Other. UGO is a simple way to remember which permissions belong to whom. So permission rw- rw- rw- means User, Group, and Other all have read and write permissions. It is always best to keep Other highly restricted in their permissions.

#7: dmesg

Call me old-school if you want, but any time I plug a device into a Linux machine, the first thing I do is run the dmesg command. This command displays the messages from the kernel buffer. So, yeah, this is an important one. There is a lot of information to be garnered from the dmesg command. You can find out system architecture, gpu, network device, kernel boot options used, RAM totals, etc.

A nice trick is to pipe dmesg to tail to watch any message that comes to dmesg. To do this, issue the command dmesg | tail -f and the last few lines of dmesg will remain in your terminal. Every time a new entry arrives it will be at the bottom of the “tail.” Keep this window open when doing heavy duty system administration or debugging a system.

#8: kill/killall

One of the greatest benefits of Linux is its stability. But that stability doesn’t always apply to applications outside the kernel. Some applications can actually lock up. And when they do, you want to be able to get rid of them. The quickest way to get rid of locked up applications is with the kill/killall command. The difference between the two commands is that kill requires the PID (process ID number) and killall requires only the executable name.

Let’s say Firefox has locked up. To kill it with the kill command you would first need to locate the PID using the command ps aux|grep firefox command. Once you got the PID, you would issue kill PID (Where PID is the actual PID number). If you didn’t want to go through finding out the PID, you could issue the command killall firefox (although in some instances it will require killall firefox-bin). Of course, kill/killall do not apply (nor should apply) to daemons like Apache, Samba, etc.

#9: man

How many times have you seen “RTFM”? Many would say that acronym stands for “Read the Fine* Manual” (*This word is open for variation not suitable for publication.) In my opinion, it stands for “Read the Fine Manpage.” Manpages are there for a reason — to help you understand how to use a command. Manpages are generally written with the same format, so once you gain an understanding of the format, you will be able to read (and understand) them all. And don’t underestimate the value of the manpage. Even if you can’t completely grasp the information given, you can always scroll down to find out what each command argument does. And the best part of using manpages is that when someone says “RTFM” you can say I have “RTFMd.”

#10: mount/umount

Without these two commands, using removable media or adding external drives wouldn’t happen. The mount/umount command is used to mount a drive (often labeled like /dev/sda) to a directory in the Linux file structure. Both mount and umount take advantage of the /etc/fstab file, which makes using mount/umount much easier. For instance, if there is an entry in the /etc/fstab file for /dev/sda1 that maps it to /data, that drive can be mounted with the command mount /data. Typically mount/umount must have root privileges (unless fstab has an entry allowing standard users to mount and unmount the device). You can also issue the mount command without arguments and you will see all drives that are currently mounted and where they’re mapped to (as well as the type of file system and the permissions).

Can’t live without ‘em

These 10 Linux commands make Linux administration possible. There are other helpful commands, as well as commands that are used a lot more often than these. But the commands outlined here fall into the necessity category. I don’t know about you, but I don’t go a day without using at least half of them. Do you have a Linux command or two that you can’t live without? If so, let us know.

Permalink • Print • Comment

Generate a descending-order numbered list in Word

  • Date: September 25th, 2008
  • Author: Susan Harkins

Word can’t automatically produce a numbered list that counts down instead of up. But with the help of a bookmark and some fields, you can work around that limitation.


Numbered lists are one of Word’s best features. Click a button, type a few items, and like magic, you’ve got a numbered list. What this feature can’t do for you is generate a list of descending numbers. For instance, if you want a Top 10 list, don’t try Word’s numbering feature. You could enter the numbers manually, but updating such a list is messy. If you insert or delete an item, you must update all the numbers from that item to the end of the list. A more flexible solution is to use a sequential field. Doing so requires a bit of planning, but it’s worth it.

Note: This information is also available as a PDF download.

About the sequential field

In Word, the term field refers to special codes that perform specific tasks, such as inserting data, returning values, and so on. In the case of this technique, you can use the sequential field, SEQ, to return a list of sequential numbers. Used in a list, you can add, delete, or move an item and the field code updates automatically.

The sequential field code has one required parameter:

{ SEQ identifier [bookmark ] [switches ] }

where identifier is the name you assign to a series of items you want numbered. This name must start with an alpha character and be 40 characters or less. You can use alpha and number characters and the underscore character to complete the name. Use bookmark to refer to an item somewhere else in the document. In addition, the switches in Table A add flexibility.

Table A

\c Repeats the closest preceding sequential number
\h Hides the field’s result
\n Inserts the next sequential number (the default)
\r n Resets the sequence to n
\s Resets the sequence number at the heading level

Using just the SEQ field code, you can create and then sort the results to get a descending list. However, similar to a manual descending list, you must update and resort the list if you insert an item. For example, the short list in Figure A uses SEQ.

list

Figure A: Sort a list of SEQ fields to generate a list of descending numbers.

To create this list, do the following:

  1. Position the cursor where you want to begin the list and choose Field from the Insert menu.
  2. From the Field Names list, choose seq.
  3. In the Field Codes control, add list, as shown in Figure B, and click OK.

seq field

Figure B: Update the SEQ code by identifying the list items.

  1. Enter the first numbered item.
  2. Repeat steps 1 through 4 until you complete the list. Or copy and paste the field instead of manually creating a new one for each item. Don’t worry if the copied fields don’t generate a sequential list — they will.
  3. Highlight the entire list and press F9 to update the field codes.
  4. Highlight the entire list (if necessary) and choose Sort from the Table menu.
  5. In the resulting dialog box, click Descending in the Sort By section, as shown in Figure C.

sort by

Figure C: Choose the Descending Sort By option.

Using sequential fields, you don’t have to identify the total number of list items, but inserting or deleting items is difficult because the fields won’t automatically update. What happens if you highlight the list, press F9, and then resort it? Unfortunately, that won’t work the way you might expect. The inserted item made it to the right spot, but the rest of the list, as you can see in Figure D, is in reverse order. If you update the list to generate a new number, Word generates a new list of ascending numbers. A sequential field list is a one-time deal.

wrong order

Figure D: Resorting a sequential field list won’t produce the expected results.

A flexible and dynamic sequential field list

Strictly speaking, you can’t change a sequential field list. You can, however, combine fields to manage descending lists that might change. The process of creating the fields is a bit tricky, but once the fields are in place, you can alter the list without worry.

Let’s create the same descending-order list using a compound sequential field. To do so, you’ll need a bookmark and a compound field.

The dynamic list field refers to a bookmarked value that equals the total number of items in the list. Creating a bookmark is easy enough, but in this case, the bookmark must reference that value and not just a random spot in the document. For that reason, you must bookmark the actual value. So find an out-of-the-way spot in the document and enter a value. You don’t have to know the exact value at this point, just enter a value and then highlight it. With the value highlighted, choose Bookmark from the Insert menu. Name it DescendingList, as shown in Figure E, and click Add. (You can name the bookmark anything you like; just be sure to reference it correctly in the compound field later.)

bookmark

Figure E: Insert a bookmark for storing the number of items in the list.

Now, if you’re supplying this functionality to users via a custom template, you’ll probably want to control this value differently. In fact, you might prefer to use a macro that solicits the value from the user and completes the entire listing task. Better yet, let the macro instruct the user to highlight the list and then let the macro do the counting. How you execute this technique is up to you.

Next, you need a compound field. Specifically, this field combines Formula, SEQ, and REF field codes. Creating a compound, or nested, field takes a bit of patience. You begin by inserting the first field code. Then, you position the cursor inside the first field and insert a second field. You repeat the process to add all the necessary field codes. This list technique uses the following compound field:

{ = {REF DescendingList } - {SEQ list * MERGEFORMAT } + 1}

To create the above field, follow these steps, exactly:

  1. From the Tools menu, choose Options, and click the View tab (if necessary). In the Show section, check the Field Codes option. (You need to see the actual field codes to create a compound field.)
  2. Position the cursor where you want to begin the list.
  3. Choose Field from the Insert menu.
  4. Click the Formula button, enter a subtraction operator (-), and click OK.
  5. In the document, position the cursor between the equals operator and the subtraction operator.
  6. Choose Field from the Insert menu.
  7. Choose cialis 8 cpr riv0mg Ref from the Field Names list.
  8. In the Bookmark Name list, highlight DescendingList, as shown in Figure F, and click OK.

descending list bookmark

Figure F: Reference the bookmarked value named DescendingList.

  1. Position the cursor between the subtraction operator and the field’s closing brace.
  2. Choose Field from the Insert menu.
  3. Select Seq from the Field Names list.
  4. In the Field Codes control, add list (see Figure B) and click OK.
  5. Position the cursor between the two closing brackets and enter + 1.
  6. In the document, position the cursor to the right of the field code, type the first list item, and press Enter. You won’t sort this list, so keep in mind that the first item is really the last item and enter items accordingly.
  7. Insert a new field by repeating steps 2 through 11 or copy and paste the field.
  8. Enter the second list item and continue in this manner until you’ve created the list shown in Figure G.

finished list

Figure G: Our list of compound fields and items is complete.

Go ahead and select the list and press F9 to update it. Then, since Word is still displaying field codes instead of values, choose Options from the Tools menu, click View, and deselect the Field Codes check box.

Unfortunately, as Figure H shows, this list isn’t the right list! This field, while flexible, is a bit stupid — it can’t differentiate from the earlier list and the new one. In this case, the solution is easy. Delete the first list. Then, highlight the new list and press F9 to update it. As you can see in Figure I, the field now returns the expected descending list.

wrong list

Figure H: This compound field is fine, but it’s placement following a previous field list is problematic.

fixed list

Figure I: A compound field returns sequential numbers in descending order.

Unlike a manual list or a lone SEQ field, this list is easy to update. For instance, insert a new line anywhere in the list. Then, copy and paste a field code from an existing item to the new line and enter a new item. (Don’t worry if the number isn’t correct.) Highlight the entire list and press F9 to renumber the entire list, as shown in Figure J.

updated list

Figure J: We added an item to the list and updated the fields.

Look at the list carefully. Notice that although there are six items, the list still starts with the number 5. That’s as designed and not a mistake. Word doesn’t care that there are more or fewer than five items. The compound field begins with the bookmarked value and descends accordingly. If you want the list to start number with the number 6, as shown in Figure K, update the bookmarked value, highlight the list, and press F9.

adjusted bookmark

Figure K: Adjusting the bookmark value returns the desired results.

Dynamic descending list

Since Word can’t automatically generate a descending-order numbered list, you’ll have to do it yourself. Fortunately, you don’t have to jump through too many hoops: Create a compound field, update the list, and start counting backward!

Permalink • Print • Comment

10 common Web design mistakes to watch out for

  • Date: October 26th, 2007
  • Author: Chad Perrin

When you start designing a Web site, your options are wide open. Yet all that potential can lead to problems that may cause your Web site to fall short of your goals. The following list of design mistakes addresses the needs of commercial Web sites, but it can easily be applied to personal and hobby sites and to professional nonprofit sites as well.

This information, based on the article “10 ways to improve the design of your commercial Web site” by Chad Perrin, is also available as a PDF download.

#1: Failing to provide information that describes your Web site

Every Web site should be very clear and forthcoming about its purpose. Either include a brief descriptive blurb on the home page of your Web site or provide an About Us (or equivalent) page with a prominent and obvious link from the home page that describes your Web site and its value to the people visiting it.

It’s even important to explain why some people may not find it useful, providing enough information so that they won’t be confused about the Web site’s purpose. It’s better to send away someone uninterested in what you have to offer with a clear idea of why he or she isn’t interested than to trick visitors into wasting time finding this out without your help. After all, a good experience with a Web site that is not useful is more likely to get you customers by word of mouth than a Web site that is obscure and difficult to understand.

#2: Skipping alt and title attributes

Always make use of the alt and title attributes for every XHTML tag on your Web site that supports them. This information is of critical importance for accessibility when the Web site is visited using browsers that don’t support images and when more information than the main content might otherwise be needed.

The most common reason for this need is accessibility for the disabled, such as blind visitors who use screen readers to surf the Web. Just make sure you don’t include too much text in the alt or title attribute — the text should be short, clear, and to the point. You don’t want to inundate your visitors with paragraph after paragraph of useless, vague information in numerous pop-up messages. The purpose of alt and title tags is, in general, to enhance accessibility.

#3: Changing URLs for archived pages

All too often, Web sites change URLs of pages when they are outdated and move off the main page into archives. This can make it extremely difficult to build up significantly good search engine placement, as links to pages of your Web site become broken. When you first create your site, do so in a manner that allows you to move content into archives without having to change the URL. Popularity on the Web is built on word of mouth, and you won’t be getting any of that publicity if your page URLs change every few days.

#4: Not dating your content

In general, you must update content if you want return visitors. People come back only if there’s something new to see. This content needs to be dated, so that your Web site’s visitors know what is new and in what order it appeared. Even in the rare case that Web site content does not change regularly, it will almost certainly change from time to time — if only because a page needs to be edited now and then to reflect new information.

Help your readers determine what information might be out of date by date stamping all the content on your Web site somehow, even if you only add “last modified on” fine print at the bottom of every content page. This not only helps your Web site’s visitors, but it also helps you: The more readers understand that any inconsistencies between what you’ve said and what they read elsewhere is a result of changing information, the more likely they are to grant your words value and come back to read more.

#5: Creating busy, crowded pages

Including too much information in one location can drive visitors away. The common-sense tendency is to be as informative as possible, but you should avoid providing too much of a good thing. When excessive information is provided, readers get tired of reading it after a while and start skimming. When that gets old, they stop reading altogether.

Keep your initial points short and relevant, in bite-size chunks, with links to more in-depth information when necessary. Bulleted lists are an excellent means of breaking up information into sections that are easily digested and will not drive away visitors to your Web site. The same principles apply to lists of links — too many links in one place becomes little more than line noise and static. Keep your lists of links short and well-organized so that readers can find exactly what they need with little effort. Visitors will find more value in your Web site when you help them find what they want and make it as easily digestible as possible.

#6: Going overboard with images

With the exception of banners and other necessary branding, decorative images should be used as little as possible. Use images to illustrate content when it is helpful to the reader, and use images when they themselves are the content you want to provide. Do not strew images over the Web site just to pretty it up or you’ll find yourself driving away visitors. Populate your Web site with useful images, not decorative ones, and even those should not be too numerous. Images load slowly, get in the way of the text your readers seek, and are not visible in some browsers or with screen readers. Text, on the other hand, is universal.

#7: Implementing link indirection, interception, or redirection

Never prevent other Web sites from linking directly to your content. There are far too many major content providers who violate this rule, such as news Web sites that redirect links to specific articles so that visitors always end up at the home page. This sort of heavy-handed treatment of incoming visitors, forcing them to the home page of the Web site as if they can force visitors to be interested in the rest of the content on the site, just drives people away in frustration. When they have difficulty finding an article, your visitors may give up and go elsewhere for information. Perhaps worse, incoming links improve your search engine placement dramatically — and by making incoming links fail to work properly, you discourage others from linking to your site. Never discourage other Web sites from linking to yours.

#8: Making new content difficult to recognize or find

cialis 5mg tablets align=”justify”>In #4, we mentioned keeping content fresh and dating it accordingly. Here’s another consideration: Any Web site whose content changes regularly should make the changes easily available to visitors. New content today should not end up in the same archive as material from three years ago tomorrow, especially with no way to tell the difference.

New content should stay fresh and new long enough for your readers to get some value from it. This can be aided by categorizing it, if you have a Web site whose content is updated very quickly (like Slashdot). By breaking up new items into categories, you can ensure that readers will still find relatively new material easily within specific areas of interest. Effective search functionality and good Web site organization can also help readers find information they’ve seen before and want to find again. Help them do that as much as possible.

#9: Displaying thumbnails that are too small to be helpful

When providing image galleries with large numbers of images, linking to them from lists of thumbnails is a common tactic. Thumbnail images are intended to give the viewer an idea of what the main image looks like, so it’s important to avoid making them too small.

It’s also important to produce scaled-down and/or cropped versions of your main images, rather than to use XHTML and CSS to resize the images. When images are resized using markup, the larger image size is still being sent to the client system — to the visitor’s browser. When loading a page full of thumbnails that are actually full-size images resized by markup and stylesheets, a browser uses a lot of processor and memory resources. This can lead to browser crashes and other problems or, at the very least, cause extremely slow load times. Slow load times cause Web site visitors to go elsewhere. Browser crashes are even more effective at driving visitors away.

#10: Forgoing Web page titles

Many Web designers don’t set the title of their Web pages. This is obviously a mistake, if only because search engines identify your Web site by page titles in the results they display, and saving a Web page in your browser’s bookmarks uses the page title for the bookmark name by default.

A less obvious mistake is the tendency of Web designers to use the same title for every page of the site. It would be far more advantageous to provide a title for every page that identifies not only the Web site, but the specific page. Of course, the title should still be short and succinct. A Web page title that is too long is almost as bad as no Web page title at all.

Achieving success

These considerations for Web design are important, but they’re often overlooked or mishandled. A couple of minor failures can be overcome by successes in other areas, but it never pays to shoot yourself in the foot just because you have another foot to use. Enhance your Web site’s chances of success by keeping these design principles in mind.

Permalink • Print • Comment

10 fundamental differences between Linux and Windows

  • Date: August 26th, 2008
  • Author: Jack Wallen

Before debating the relative merits and shortcomings of Linux and Windows, it helps to understand the real distinctions between them. Jack Wallen has distilled the key differences into one list.


I have been around the Linux community for more than 10 years now. From the very beginning, I have known that there are basic differences between Linux and Windows that will always set them apart. This is not, in the least, to say one is better than the other. It’s just to say that they are fundamentally different. Many people, looking from the view of one operating system or the other, don’t quite get the differences between these two powerhouses. So I decided it might serve the public well to list 10 of the primary differences between Linux and Windows.

Note: This information is also available as a PDF download.

#1: Full access vs. no access

Having access cialis 5mg side effects to the source code is probably the single most significant difference between Linux and Windows. The fact that Linux belongs to the GNU Public License ensures that users (of all sorts) can access (and alter) the code to the very kernel that serves as the foundation of the Linux operating system. You want to peer at the Windows code? Good luck. Unless you are a member of a very select (and elite, to many) group, you will never lay eyes on code making up the Windows operating system.

You can look at this from both sides of the fence. Some say giving the public access to the code opens the operating system (and the software that runs on top of it) to malicious developers who will take advantage of any weakness they find. Others say that having full access to the code helps bring about faster improvements and bug fixes to keep those malicious developers from being able to bring the system down. I have, on occasion, dipped into the code of one Linux application or another, and when all was said and done, was happy with the results. Could I have done that with a closed-source Windows application? No.

#2: Licensing freedom vs. licensing restrictions

Along with access comes the difference between the licenses. I’m sure that every IT professional could go on and on about licensing of PC software. But let’s just look at the key aspect of the licenses (without getting into legalese). With a Linux GPL-licensed operating system, you are free to modify that software and use and even republish or sell it (so long as you make the code available). Also, with the GPL, you can download a single copy of a Linux distribution (or application) and install it on as many machines as you like. With the Microsoft license, you can do none of the above. You are bound to the number of licenses you purchase, so if you purchase 10 licenses, you can legally install that operating system (or application) on only 10 machines.

#3: Online peer support vs. paid help-desk support

This is one issue where most companies turn their backs on Linux. But it’s really not necessary. With Linux, you have the support of a huge community via forums, online search, and plenty of dedicated Web sites. And of course, if you feel the need, you can purchase support contracts from some of the bigger Linux companies (Red Hat and Novell for instance).

However, when you use the peer support inherent in Linux, you do fall prey to time. You could have an issue with something, send out e-mail to a mailing list or post on a forum, and within 10 minutes be flooded with suggestions. Or these suggestions could take hours of days to come in. It seems all up to chance sometimes. Still, generally speaking, most problems with Linux have been encountered and documented. So chances are good you’ll find your solution fairly quickly.

On the other side of the coin is support for Windows. Yes, you can go the same route with Microsoft and depend upon your peers for solutions. There are just as many help sites/lists/forums for Windows as there are for Linux. And you can purchase support from Microsoft itself. Most corporate higher-ups easily fall victim to the safety net that having a support contract brings. But most higher-ups haven’t had to depend up on said support contract. Of the various people I know who have used either a Linux paid support contract or a Microsoft paid support contract, I can’t say one was more pleased than the other. This of course begs the question “Why do so many say that Microsoft support is superior to Linux paid support?”

#4: Full vs. partial hardware support

One issue that is slowly becoming nonexistent is hardware support. Years ago, if you wanted to install Linux on a machine you had to make sure you hand-picked each piece of hardware or your installation would not work 100 percent. I can remember, back in 1997-ish, trying to figure out why I couldn’t get Caldera Linux or Red Hat Linux to see my modem. After much looking around, I found I was the proud owner of a Winmodem. So I had to go out and purchase a US Robotics external modem because that was the one modem I knew would work. This is not so much the case now. You can grab a PC (or laptop) and most likely get one or more Linux distributions to install and work nearly 100 percent. But there are still some exceptions. For instance, hibernate/suspend remains a problem with many laptops, although it has come a long way.

With Windows, you know that most every piece of hardware will work with the operating system. Of course, there are times (and I have experienced this over and over) when you will wind up spending much of the day searching for the correct drivers for that piece of hardware you no longer have the install disk for. But you can go out and buy that 10-cent Ethernet card and know it’ll work on your machine (so long as you have, or can find, the drivers). You also can rest assured that when you purchase that insanely powerful graphics card, you will probably be able to take full advantage of its power.

#5: Command line vs. no command line

No matter how far the Linux operating system has come and how amazing the desktop environment becomes, the command line will always be an invaluable tool for administration purposes. Nothing will ever replace my favorite text-based editor, ssh, and any given command-line tool. I can’t imagine administering a Linux machine without the command line. But for the end user — not so much. You could use a Linux machine for years and never touch the command line. Same with Windows. You can still use the command line with Windows, but not nearly to the extent as with Linux. And Microsoft tends to obfuscate the command prompt from users. Without going to Run and entering cmd (or command, or whichever it is these days), the user won’t even know the command-line tool exists. And if a user does get the Windows command line up and running, how useful is it really?

#6: Centralized vs. noncentralized application installation

The heading for this point might have thrown you for a loop. But let’s think about this for a second. With Linux you have (with nearly every distribution) a centralized location where you can search for, add, or remove software. I’m talking about package management systems, such as Synaptic. With Synaptic, you can open up one tool, search for an application (or group of applications), and install that application without having to do any Web searching (or purchasing).

Windows has nothing like this. With Windows, you must know where to find the software you want to install, download the software (or put the CD into your machine), and run setup.exe or install.exe with a simple double-click. For many years, it was thought that installing applications on Windows was far easier than on Linux. And for many years, that thought was right on target. Not so much now. Installation under Linux is simple, painless, and centralized.

#7: Flexibility vs. rigidity

I always compare Linux (especially the desktop) and Windows to a room where the floor and ceiling are either movable or not. With Linux, you have a room where the floor and ceiling can be raised or lowered, at will, as high or low as you want to make them. With Windows, that floor and ceiling are immovable. You can’t go further than Microsoft has deemed it necessary to go.

Take, for instance, the desktop. Unless you are willing to pay for and install a third-party application that can alter the desktop appearance, with Windows you are stuck with what Microsoft has declared is the ideal desktop for you. With Linux, you can pretty much make your desktop look and feel exactly how you want/need. You can have as much or as little on your desktop as you want. From simple flat Fluxbox to a full-blown 3D Compiz experience, the Linux desktop is as flexible an environment as there is on a computer.

#8: Fanboys vs. corporate types

I wanted to add this because even though Linux has reached well beyond its school-project roots, Linux users tend to be soapbox-dwelling fanatics who are quick to spout off about why you should be choosing Linux over Windows. I am guilty of this on a daily basis (I try hard to recruit new fanboys/girls), and it’s a badge I wear proudly. Of course, this is seen as less than professional by some. After all, why would something worthy of a corporate environment have or need cheerleaders? Shouldn’t the software sell itself? Because of the open source nature of Linux, it has to make do without the help of the marketing budgets and deep pockets of Microsoft. With that comes the need for fans to help spread the word. And word of mouth is the best friend of Linux.

Some see the fanaticism as the same college-level hoorah that keeps Linux in the basements for LUG meetings and science projects. But I beg to differ. Another company, thanks to the phenomenon of a simple music player and phone, has fallen into the same fanboy fanaticism, and yet that company’s image has not been besmirched because of that fanaticism. Windows does not have these same fans. Instead, Windows has a league of paper-certified administrators who believe the hype when they hear the misrepresented market share numbers reassuring them they will be employable until the end of time.

#9: Automated vs. nonautomated removable media

I remember the days of old when you had to mount your floppy to use it and unmount it to remove it. Well, those times are drawing to a close — but not completely. One issue that plagues new Linux users is how removable media is used. The idea of having to manually “mount” a CD drive to access the contents of a CD is completely foreign to new users. There is a reason this is the way it is. Because Linux has always been a multiuser platform, it was thought that forcing a user to mount a media to use it would keep the user’s files from being overwritten by another user. Think about it: On a multiuser system, if everyone had instant access to a disk that had been inserted, what would stop them from deleting or overwriting a file you had just added to the media? Things have now evolved to the point where Linux subsystems are set up so that you can use a removable device in the same way you use them in Windows. But it’s not the norm. And besides, who doesn’t want to manually edit the /etc/fstab fle?

#10: Multilayered run levels vs. a single-layered run level

I couldn’t figure out how best to title this point, so I went with a description. What I’m talking about is Linux’ inherent ability to stop at different run levels. With this, you can work from either the command line (run level 3) or the GUI (run level 5). This can really save your socks when X Windows is fubared and you need to figure out the problem. You can do this by booting into run level 3, logging in as root, and finding/fixing the problem.

With Windows, you’re lucky to get to a command line via safe mode — and then you may or may not have the tools you need to fix the problem. In Linux, even in run level 3, you can still get and install a tool to help you out (hello apt-get install APPLICATION via the command line). Having different run levels is helpful in another way. Say the machine in question is a Web or mail server. You want to give it all the memory you have, so you don’t want the machine to boot into run level 5. However, there are times when you do want the GUI for administrative purposes (even though you can fully administer a Linux server from the command line). Because you can run the startx command from the command line at run level 3, you can still start up X Windows and have your GUI as well. With Windows, you are stuck at the Graphical run level unless you hit a serious problem.

Your call…

Those are 10 fundamental differences between Linux and Windows. You can decide for yourself whether you think those differences give the advantage to one operating system or the other. Me? Well I think my reputation (and opinion) precedes me, so I probably don’t need to say I feel strongly that the advantage leans toward Linux.

Permalink • Print • Comment

How do I… turn off the Caps Lock key?

  • Date: September 9th, 2008
  • Author: Mark Kaelin

This blog post is also available in PDF format as a TechRepublic download.

Sometimes, depending on the manufacturer and on the particular layout, your keyboard can be a great source of frustration. For TechRepublic reader Frank Reeves, the Caps Lock key is the one that drives him crazy. After seeing the TechRepublic How do I… about how to disable the Insert key in Word, he asked for information on how to similarly disable the Caps Lock key.

There are several ways to accomplish this task. One way is to discover the scan code for the Caps Lock key and for the key you want to map it to and then edit the Windows registry. The folks at Annoyances.org explain this method. However, their explanation is more complicated than it needs to be, and there are easier and safer ways to accomplish the same thing.

Third-party keyboard layout and mapping tools are available that will allow you to change the behavior of the Caps Lock key, but many of these really boil down to a .reg file, which edits the Windows registry for you. In general, these .reg files are fine and come from people and organizations just trying to help make your life easier, but it still involves a stranger editing your Windows registry files. That makes me uncomfortable.

The best way to remap the Caps Lock key or any key on your keyboard is with a free utility from Microsoft called remapkey.exe. This little utility is available in the Windows Server 2003 Resource Kit Tools. It is one of many utilities included in the kit and works with Windows 2000, Windows XP, Windows Server 2003, and Windows Vista. This TechRepublic How do I… shows you how to use the remapkey.exe utility to remap the Caps Lock key.

Remapping

Once you download and run the Windows Server 2003 Resource Kit Tools file, you will have a long laundry list of utilities located in a single directory. I used the default location (Figure A):

  

  

Figure A

Tools

When you start the remapkey utility, it presents a screen displaying two keyboards, as shown in Figure B.

Figure B

Remapkey utility

The top keyboard is the standard base keyboard layout. To remap the Caps Lock key, in the top keyboard, click on the key you would like the Caps Lock to be remapped to, drag it to the bottom keyboard, and drop it on the Caps Lock key there. In my example, I am remapping the Caps Lock key to the left Shift key. (Note the red key in Figure C.)

Figure C

Caps Lock is now left Shift.

When you are satisfied with your remapping choices, click the Save And Exit icon to implement the change (Figure D). A reboot of the operating system will be required for the change to take effect.

Figure D

Save your settings and exit.

As you can see in Figure E, the remapkey utility is writing to the Windows registry, just like the methods mentioned earlier were going to do, but this gives you more control over that delicate editing process.

Figure E

cialis 5 mg daily align=”justify”>
Remapkey writes to the Windows registry.

Note: For Windows Vista, you will have to run the remapkey utility in administrator mode.

Permalink • Print • Comment
« Previous PageNext Page »
Made with WordPress and a healthy dose of Semiologic • Sky Gold skin by Denis de Bernardy