Skip to main content

5 Linux commands I never use

Linux has perhaps hundreds of essential and useful commands. These are not my favorites.
Image
5 totally useless Linux commands
Image by M. Maggs from Pixabay

Editor's note: This is an opinion piece and meant in a spirit of good humor. Do you have a different set of tools you never use? We invite guest articles via enable-sysadmin@redhat.com.

At one time or another, I'm sure all of these commands had their purpose but whatever that purpose was, in my humble opinion, that purpose has been deprecated. Programming is hard work. It's time-consuming, it's tedious, and when something goes wrong, it can take hours or days to find that missing semicolon or extra space that throws everything off. I get that and I apologize to the dedicated programmers who wrote this software that I do not use.

[ You might also enjoy: Sysadmin tales: Take a look back at an old school IT prank ]

But some commands, programs, applications, or whatever you want to call them are just plain unneeded for me. I've found five such commands. I haven't spent the time to trace their origins because that would be a huge time vacuum that I can't afford. So, here they are in all their glory—the five commands on my system that I've found I never use. They are in alphabetical order.

1. arch

The arch command returns the architecture of the computer on which you execute it.

$ arch
x86_64

Yep, that's all it does. It just displays the architecture of the system you're working on. Is this an important piece of information? If you think so, then you'd probably want more information about the system other than just the architecture. For example, you could display the /proc/version file.

$ cat /proc/version
Linux version 4.18.0-240.22.1.el8_3.x86_64 (mockbuild@x86-vm-07.build.eng.bos.redhat.com) (gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)) #1 SMP Thu Mar 25 14:36:04 EDT 2021

There. Do you see it? In the kernel version, you also get the elusive architecture value. Plus, you get bonus information such as the kernel and the associated gcc versions.

2. arpaname

The arpaname command provides you with the ARPA name if you provide it with one valuable bit of information: The IP address. See if you can figure out the cryptic pattern that the arpaname command deciphers for you from the example below.

$ arpaname 192.168.0.21
21.0.168.192.IN-ADDR.ARPA

Pretty solid command, huh? Do you want to see it again?

$ arpaname 192.168.10.40
40.10.168.192.IN-ADDR.ARPA

I keep hoping that it will display something different every time I run it but it doesn't and I've run it on every system I have at least 40 to 50 times and it's disappointingly consistent.

3. bc

The bc and the somewhat similar dc command are arbitrary precision calculator languages. I'm not sure why one would ever need a command line calculator but if you ever did, these are not the ones to use. First, bc is interactive, which is fine but it's kind of pointless to use. Almost everyone, even a long time ago, had handheld calculators at their disposal. The only date I could find in the man pages is 2006, and I think at that time just about everyone had a phone with a calculator on it. Surely, there are easier calculators to use than this.

$ bc
bc 1.07.1
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 
5+10-3
12

Maybe it would be good for scripting? I can think of easier ways to make calculations in a script using variables, but that's just me. I see no point in bc. I know a lot of people use bc but I haven't found love for it yet. 

And, seriously, dc is worse because of the crazy syntax you have to use what's known as reverse Polish notation (RPN), plus a ridiculous --expression=" option. I remember my old HP calculator that used RPN and I hated it. An example of RPN for adding two numbers goes like this: 5 6 +. You enter the operands and then the operators. I still hate it. There's no point to that kind of notation and by logical progression, there's no reason for the dc command that uses it. Here's an example of what dc syntax looks like. Enjoy.

$ dc --expression="5 6 + f"
11

The 'f' in the expression prints the entire stack. Here's the description of what the 'f' option does from the man page: "Prints the entire contents of the stack without altering anything. This is a good command to use if you are lost or want to figure out what the effect of some command has been." How in the world would you ever get "lost" while using this calculator? It's a complete mystery to me as well. The bigger mystery is why anyone would use this outdated calculator and its politically incorrect notation. Perhaps I'll explore bc and dc in more detail at a later time.

4. dumpkeys

The dumpkeys command is really cool. OK, I lied. It's not at all cool. In 25 years of messing with Linux, I've needed to use dumpkeys a grand total of zero times. You'd think that a critical command like dumpkeys would have entered into my line of sight at least once in that length of time—even just out of curiosity, it should have been significant enough for me to test, but it wasn't.

Here's how the man page describes this gem: "dumpkeys writes, to the standard output, the current contents of the keyboard driver's translation tables, in the format specified by keymaps(5).

Using the various options, the format of the output can be controlled, and also other information from the kernel and the programs dumpkeys(1) and loadkeys(1) can be obtained."

OK, so now I understand. I know exactly how to use this for...ummm, give me a second, OK, I'm stumped. I don't know how or why I would ever need to use this command other than to tell you that it's useless but for some strange reason, it exists on my Linux system. Oh, to make it better, you can only execute dumpkeys from the console. The joys never end with dumpkeys. I so often work at the console and need to write to standard output the current contents of the keyboard driver's translation tables. I'm not even going to give you a demonstration output for this one because it's too long. Feel free to go to your nearest Linux system's console and type in, dumpkeys. But, stand back or have someone there to catch you because the output is very special—so special in fact, you might want to redirect it to a file and then print it for display in your cubicle or perhaps turn it into a Zoom background image so that everyone you speak to in a day will be duly impressed. And, because sarcasm isn't always obvious in written form, this entire dumpkeys section has a hint of sarcasm to it. See if you can find it.

5. uname

To be perfectly honest and transparent, I didn't find uname to be a useless command right away. But soon after I discovered /proc/version, back in 1996, I realized that uname had no value. Here are some high-value uname usage examples.

$ uname
Linux

$ uname -r
4.18.0-240.22.1.el8_3.x86_64

$ uname -m
x86_64

$ uname -a
Linux server1 4.18.0-240.22.1.el8_3.x86_64 #1 SMP Thu Mar 25 14:36:04 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux

$ cat /proc/version
Linux version 4.18.0-240.22.1.el8_3.x86_64 (mockbuild@x86-vm-07.build.eng.bos.redhat.com) (gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)) #1 SMP Thu Mar 25 14:36:04 EDT 2021

I think uname's purpose should be changed to print out the username of the current user or copy the whoami command to uname. That seems way more valuable to me. Sometimes I forget who I am. I also forget to look at my prompt.

[ Free online course: Red Hat Enterprise Linux technical overview. ]

Wrap up

I hope you had as much fun reading this article as I had writing it. These five useless commands will now forever be associated with me. I'm also sure the hate mail will come pouring in to tell me how absolutely essential these commands are to all the inhabitants of Clipperton Island. I'm good with that.

Author’s photo

Ken Hess

Ken has used Red Hat Linux since 1996 and has written ebooks, whitepapers, actual books, thousands of exam review questions, and hundreds of articles on open source and other topics. Ken also has 20+ years of experience as an enterprise sysadmin with Unix, Linux, Windows, and Virtualization. More about me

Try Red Hat Enterprise Linux

Download it at no charge from the Red Hat Developer program.