Eight Linux Command Lines That Anybody – Even Grandma – Can Do

Posted by: Rea Maor In: Linux and Unix - Tuesday, October 23rd, 2007

Welcome back to your old nemesis: the command line! Scary and inscrutable, this dark, looming environment will be yours to tackle. While many guides out there start you off with the basics of viewing and navigating the file system, I thought I’d provide an alternative beginning point: simple one-word commands that are benign and couldn’t possibly do any harm.

Not all of them are guaranteed to be on every system, but most of them will be on any major distro.

date – Prints the system date and time. In English.

fortune – Prints a quote from a database. Having typed it once and read the output, you can simply hit up arrow and enter repeatedly, and sit back and read. Depending on what is installed, these can be anything from educational to amusing, and frequently both.

factor #N – Where #N is any number. Factor will return the factors of the number, which, when multiplied together, will produce the original number. If the number you entered is prime, it will just return that. Useful for finding primes and powers.

quiz – Quiz is a miniature trivia game. Typing ‘quiz’ by itself will print the list of subjects and instructions on how to start from there. Given a subject (for instance “quiz star trek”), will produce a series of trivia questions and pauses for you to answer. Typing Ctrl-C exits.

arithmetic – Just like quiz, except this will print math problems for you to answer. Good math drill for kids. Also exits with Ctrl-C.

seq #N1 #N2 – Where #N1 and #N2 are both numbers. All it will do is print the numbers counting from the first number to the second number. Not useful for much by itself… but it is easy!

echo $STRING – Where $STRING is any text in quotes, or even other forms of text such as variables. Again, not useful by itself, fantastically useful in scripts.

play $SOUND – Where $SOUND is any sound file such as a .wav. Plays the sound. Shocking though it may be.

Related Posts:

One Response to “Eight Linux Command Lines That Anybody – Even Grandma – Can Do”

  1. Alan the Great Says:

    Is ‘fortune’ what gets activated when you log onto Slackware? I love those little jokes…

Leave a Reply