Now that you can get to a command line and move things around in there, it’s time to get some real work done.
In Chapter 4, I showed you the best two or three apps for most tasks. These were all well-known apps that have millions of users, and although some of them have been around a while, they’re all still constantly updated and maintained.
In this chapter, I’ll show you a few examples of the most common and popular commands to do most tasks, but keep in mind that people have been doing these tasks using similar tools literally for decades (Unix came about in the 1970s, and Linux is directly descended from those tools); there are probably dozens of solutions for each application available, and people are still coming up with new ways of doing the same things. So, after you’ve looked at my suggestions, do a little Internet research and see if there’s some way that fits your workflow better.
Writing Tools
Probably the main task for most people (other than maybe browsing the Web and email) is writing. Whether it’s simple notes, emails, or full-length books, there are some great text-only tools to do the job.
Unlike, say, Microsoft Word or Apple Pages, you can’t just highlight a word and make it bold or italic in a text-based terminal window. You usually will need to use some kind of a markup language, such as Markdown or LaTeX (see Chapter 7). Like almost everything else involved with switching to text mode, it’s more difficult in the beginning, but far more efficient and speedier once you know how it works.
Nano
Nano Details:
Installation: sudo apt install nano (default with Raspian)
Run command: nano <filename>
Dotfile: ~/.nanrc
Help: man nano
Web site: www.nano-editor.org/
Vim
Vim Details:
Installation: sudo apt install vim
Run command: vim <filename>
Dotfile: ~/.vimrc
Help: man vim
Web site: www.vim.org/
Vim and Emacs were designed to be text editors for coders, and if you’re a programmer, either of these would be an outstanding choice for you to master. Either one can be adapted for darned near anything, as every single feature you can imagine has myriad customization options and plug-ins.
Emacs
Emacs Details:
Installation: sudo apt install emacs25
Run command: emacs <filename>
Dotfile: ~/.emacs
Help: man emacs
Web site: www.gnu.org/software/emacs/
With both Emacs and Vim, nearly any aspect of the editor can be customized and made to work in many different ways. There are also add-ins, themes, and extensions that allow you to do things that even the original developers never imagined that people could in a text editor. For me, it’s always been a tough call deciding between these two major writing apps, and I dabble in each, spending far too much time waffling back and forth.
Note that the preceding apt command installs emacs25, not plain Emacs. You can choose to install the default Emacs, but for some reason, the Raspbian installer will install Emacs version 24 by default, which is a much older, more limited version. Don’t use this unless you know some specific reason why you might need it.
WordGrinder
WordGrinder Details:
Installation: sudo apt install wordgrinder
Run command: wordgrinder
Dotfile: ~/.wordgrinder.lua
Help: man wordgrinder
Web site: http://cowlark.com/wordgrinder/index.html
All three of the preceding editors were originally designed with programming/coding in mind. WordGrinder comes at writing from a different perspective. It’s a word processor specifically designed for writers. It has easy-to-use menus, the arrow keys work like you’d expect, and there are very few surprises here. You can make words bold or italic easily right in the text, and you don’t need to learn Markdown or any special coding.
My recommendation is to look at both Nano and WordGrinder first. Nano is great for quick-and-dirty text editing, while WordGrinder can handle most real writing tasks. If you decide you really want to become a “text master,” then upgrade to the much more powerful and flexible Vim and/or Emacs—they offer far more, but they also require quite a lot of effort to really master.
Probably the primary business use of most computers today, email is a crucial tool. However, due to the prevalence of hackers and spammers, security with email is a major concern. That makes setting up an email client one of the most challenging tasks we’re going to run into.
Sendmail
Sendmail Details:
Installation: sudo apt install sendmail
Run command: sendmail
Dotfile: various files inside /etc/mail
Help: man sendmail
Web site: https://sendmail.org/~ca/email/doc8.12/op.html
and then type your message below that. Hit Ctrl-D to send the message or Ctrl-C to abort. This will either work or it won’t depending on the distribution of Linux you are running. Again, I recommend that if this doesn’t “just work” out of the box for you, you move on to other options, as it’s a powerful but dangerously complex app to configure.
Mutt
Mutt Details:
Installation: sudo apt install mutt
Run command: mutt
Dotfile: ~/.muttrc
Help: man mutt
Web site: www.mutt.org/
Mutt (and Alpine, in the following) is a much more complete email client than Sendmail. You get a full interface to search, sort, read, and reply to your emails; and it’s easy to deal with multiple folders and message attachments. Which you choose depends on what you need and which one you find more attractive and usable. They both do pretty much the same things.
One major disadvantage that I have found with Mutt is that it stores your passwords in the configuration files in plain text. If anyone got into your system, they could easily look at your email passwords and cause you a world of trouble. You can use Mutt and have it not store the passwords, but then you would need to reenter your email password every time you load Mutt, which is inconvenient, to say the least.
Alpine
Alpine Details:
Installation: sudo apt install alpine
Run command: alpine
Dotfile: ~/.pinerc
Help: man alpine
Web site: http://alpine.x10host.com/alpine/
Other “Office” Apps
Writing and email are a big deal for most of us, but a great deal of useful work also involves numbers and presentations. In the GUI world, there is Microsoft Excel and PowerPoint, or even LibreOffice. Those don’t work on the command line, so we need to find something similar.
SC and SC-IM
SC Details:
Installation: sudo apt install sc
Run command: sc
Dotfile: ~/.scrc
Help: man sc
Web site: https://github.com/n-t-roff/sc
SC is short for Screen Calculator, otherwise known as the spreadsheet for text mode. It does all the basic stuff that spreadsheets like Excel do, but does it all through the keyboard and text screen. It wants to save all its files in CSV (comma-separated values), but it can read in Excel files. It allows right and left text alignment, cut and paste, and various decimal formatting options as well as a huge number of calculation and math functions. It’s not as pretty as a GUI spreadsheet, but the power is all there. If you remember back to the days of VisiCalc or Lotus 1-2-3, this will bring back either fond memories or nightmares.
SC spreadsheet calculator article: www.linuxjournal.com/article/10699
SC mini manual: www.adrianjwells.freeuk.com/minmansc.pdf
Presentations
Out in the world of Windows and Mac, PowerPoint, Keynote, Impress, or even Google Slides are available for presentations. Slideshow presentations scream for graphics, so a text-based presentation may not be the best way to go most of the time. Still, sometimes you want to do something just to show that you can do a thing, so here are your presentation options: Beamer, Vimdeck, and MDP.
Beamer isn’t an app per se; it’s an extension of LaTeX (see Chapter 7) that allows you to create a file using a text editor and then output it as a PDF that can be shown on a projector, printed out, or emailed to recipients. It allows colored text, graphics, diagrams, and basically any kind of media that is supported by LaTeX. It doesn’t do any kind of animation, as it outputs in PDF, but any static imagery can be used.
Beamer Details:
Installation: sudo apt install latex-beamer (note: requires texlive-full and texmaker to be already installed)
Run command: load the output into your PDF viewer
Dotfile: none
Web site: https://github.com/josephwright/beamer
Vimdeck Details:
Installation: sudo gem install vimdeck
Run command: vimdeck
Dotfile: none
Help: vimdeck
Web site: https://github.com/tybenz/vimdeck
MDP Details:
Installation: sudo apt install mdp
Run command: mdp
Dotfile: none
Help: man mdp
Web site: https://github.com/visit1985/mdp
Notes Apps
Making quick notes is one of the things GUI operating systems excel at, but sometimes you need to copy some text for later or make a detailed note for another time and you don’t want to leave the command line. We’ll look at two major players here: Terminal Velocity is an app that makes it super quick to jot down and find text-based notes, while Emacs Org-mode is an outliner, scheduler, to-do manager, and complete organizing system built into the word processor Emacs.
Terminal Velocity
Terminal Velocity is a fairly recent app inspired by the Mac OSX app called Notational Velocity. To create a new note, type a title for the note and hit Enter. The note will be opened in your text editor. As you type the title, the list of notes filters to show notes that match what you’ve typed, giving you a chance to open a related note instead of making a new one. This means that you use the same line to type a new note as you do to search for an existing one, which makes the whole process of searching and creating very fast. I use this one in conjunction with Dropbox to keep my notes with me on all my devices.
Terminal Velocity is installed differently from other apps we’ve looked at, as it’s not in the Raspbian repositories. We’ll use an app called Pip to install it.
Terminal Velocity Details :
Installation: sudo pip install terminal-velocity
Run command: terminal_velocity
Dotfile: ~/.tvrc
Help: see web site
Web site: https://vhp.github.io/terminal_velocity/
Emacs Org-mode
We’ve already discussed Emacs in the “Writing Tools” section, but it deserves another mention here. “Org-mode” is a special mode that Emacs offers that allows you to type in text that is viewed as a sort of outline. You write files in a format similar to Markdown; but you can also use the Tab key to quickly collapse or expand outline trees, move whole sections up and down, and quickly create things like to-do lists, outlines, and notes of all kinds. If you already have some familiarity with Emacs, it’s easy to get started using Org-mode, but there is so much you can do with it that the options can get extensive.
Security
One thing you don’t generally have to worry about when using Linux is viruses. Due to the way everything is split up and restricted by usernames and permissions, it’s much harder to catch a virus than on, say, a Windows machine. That does not, however, mean you don’t still have to be concerned about security. One major area of concern worth looking at is password security.
Pass
Pass is a password management system. It can keep track of a database of thousands of web sites and passwords and is especially useful in creating secure passwords. You can request a new password, specifying the number of symbols, and it generates what you need completely randomly and copies it to the clipboard.
Obviously, a password like that is hard, if not impossible, to remember—or type for that matter; fortunately, Pass will copy the password into the clipboard for you.
Pass Details:
Installation: sudo apt install pass
Run command: pass
Dotfile: none
Help: man pass
Web site: www.passwordstore.org
Also, a Pass installation and tutorial can be found at www.2daygeek.com/pass-command-line-password-manager-linux/ .
rTorrent
rTorrent Details :
Installation: sudo apt install rtorrent
Run command: rtorrent
Dotfile: ~/.rtorrent.rc
Help: man rtorrent
Web site: http://rakshasa.github.io/rtorrent/
As I mentioned back in Chapters 3 and 4, when we talked about the Deluge app, BitTorrent gets a lot of bad press for being one method people use to share “pirated” files, but it has many legitimate uses as well. Many alternative Linux distributions are available via torrent, and it’s actually a very efficient means of transferring large files.
In order to download files distributed through torrents, you need a torrent client. There are many good ones available for the GUI (we already talked about Deluge), but sometimes it’s nice to be able to do it from the command line. We’ll look at one app called rTorrent here.
You will also need at least one .torrent file to download. One good place to find legal torrents is at www.offensive-security.com/kali-linux-arm-images/ , and if you go there, you can find something to download, even if it’s only to test the system. The file I downloaded was kali-linux-2019.2a-rpi3-nexmon.img.xz.torrent, a Linux distribution for the Raspberry Pi that I’ve never tried before.
You can add as many .torrent files as you wish this way. rTorrent can easily support hundreds of torrents if that’s something you want to deal with. You can move through the list of torrents with the up and down arrow keys to select individual torrents.
Ctrl-O changes the destination directory. I prefer ~/Downloads, but you can put your files wherever you like. The default is the user’s root directory.
Ctrl-S starts the download. You can watch the numbers and statistics at the bottom of the screen to see how things are progressing.
Ctrl-D pauses the download. If you hit Ctrl-D a second time, the download will be deleted.
The right arrow allows you get information about the files being downloaded.
Ctrl-K allows you to close a torrent.
For more information and documentation on all the features of rTorrent, their web site is at https://rakshasa.github.io/rtorrent/ .
Web Browsers
Wait—browsing the Web in text mode? Yes, you can!
The following three browsers have all been around for decades, and all three have the ability to deal with mostly-text web sites. Some allow for image viewing through external viewers, while some allow in-line image viewing with plug-ins. None are as robust or pretty as modern GUI browsers, but they often can get the job done.
There are benefits to using text-mode browsers. First, they are blazing fast compared to graphical browsers—they don’t run the embedded JavaScript codes, and they don’t download all those images (including the invisible tracking images). Since all they do is download the text, they’re fast even on a slow system. Also, because they’re text-only, they allow easy integration with text-to-speech software and work very well for the visually impaired.
Googler
Googler Details:
Installation: sudo apt install googler
Run command: googler <keywords>
Dotfile: (none)
Help: man googler
Web site: https://github.com/jarun/googler
Sometimes you don’t want to open a full web browser to check something on Google, but in the GUI world, that’s the only way to do it. Not so with the command line! The little app “Googler” will let you type in your search phrase right on the command line, and it’ll show you multiple results with short little abstracts about what Google has found. If you see something you want, then you have the option of loading it in a browser.
Lynx
Lynx Details:
Installation: sudo apt install lynx
Run command: lynx <URL>
Dotfile: ~/.lynxrc
Help: man lynx
Web site: https://lynx.browser.org/
This is the oldest of the browsers, as it was first begun as a project in 1992. Due to this longevity, it’s quite stable and safe. It doesn’t work with sites requiring JavaScript but does handle sites with cookies.
W3M
W3M Details:
Installation: sudo apt install w3m (Raspian preinstalled)
Run command: w3m <URL>
Dotfile: ~/.w3m/config
Help: man w3m
Web site: http://w3m.sourceforge.net/
W3M is also quite old, begun in 1995. It has support for tables, frames, SSL connections, color, and inline images on suitable terminals. Generally, it renders pages in a form as true to their original layout as possible. W3M is one of the more actively maintained browsers and has many extensions and plug-ins, so this may be the best choice if you need to do a lot of text-based web use.
ELinks
ELinks Details:
Installation: sudo apt install elinks
Run command: elinks <URL>
Dotfile: ~/.elinks
Help: man elinks
Web site: http://elinks.or.cz/
Communications
One of the most popular things to do back when the Internet started becoming available to everyone was to hang out in IRC chat rooms. Before Facebook, before Twitter, even back before MySpace, there was IRC (Internet Relay Chat).
IRC: WeeChat and IRSSI
WeeChat Details:
Installation: sudo apt install weechat
Run command: weechat
Dotfile: ~/.weechat
Help: man weechat
Web site: https://weechat.org/
IRSSI Details:
Installation: sudo apt install irssi
Run command: irssi
Dotfile: ~/.irssi/config
Help: man irssi
Web site: https://irssi.org/
Both offer scripting, plug-ins, themes, filters, help screens, and everything else you need to get started.
VOIP
As far as I know, there is no command-line replacement for Skype, FaceTime, or other VOIP software. There is an “experimental” project called Twinkle that exists but is reported to be crash-prone and unreliable.
If this is something you badly need, you might want to take a look. The app comes from https://github.com/LubosD/twinkle .
Social Media
Most command-line apps are actively developed versions of apps that were originally created decades ago. Social media is a relatively new area of computing, and the command line has a ways to go to catch up here. Also, most social media sites rely heavily on graphics, and obviously, that’s not a great match for text mode. Still, there are a few good apps out there, and remember you can easily access most social media sites through one of the text-based web browsers if necessary.
Rainbow Stream Details:
Installation: sudo pip install rainbowstream
Run command: rainbowstream
Dotfile: ~/.rainbow_config.json
Help: Hit "h" in the app
Web site: https://github.com/orakaro/rainbowstream
You wouldn’t think Twitter clients would be all that hard to come by, but there’s only one that I could really recommend: Rainbow Stream. It’s easy to install and configure, and it allows you to post and narrow the stream into list view and does almost anything else you would want to do with Twitter.
Of course, you can use Twitter through any of the text-based web browsers by going to http://twitter.com instead of using a specialized client app.
Graphics, Art, and Photos
You wouldn’t think graphics and art would even be a category in the world of text, but there are some excellent tools to work on images, even from text mode. Asciiview is just a fun app to create “pictures” using only text characters. FIGlet is a fun little thing that lets you create text banners, and ImageMagick is a monstrous tool that can do nearly anything involving changing graphic formats and editing pictures—without even seeing them.
Asciiview
Asciiview Details:
Installation: sudo apt install aview
Run command: aview <filename.bpm>
Dotfile: none
Help: man aview
Web site: http://aa-project.sourceforge.net/tune/
For years, our cameras have been advertising more and more megapixels. Sometimes, once in a while, it’s more fun to go the other way around and look for the lowest resolutions possible. One of those cases would be when you need to display a photograph or graphic image on a text-only terminal.
FIGlet
FIGlet Details :
Installation: sudo apt install figlet
Run command: figlet <text string>
Dotfile: none
Help: man figlet
Web site: www.figlet.org/
ImageMagick
ImageMagick Details :
Installation: sudo apt install imagemagick
Run command(s): convert, identify, mogrify, compare, montage, composite, display, and so on. It’s a suite of commands.
Dotfile: none
Help: man imagemagick
Web site: www.imagemagick.org/
Both the preceding Ascii apps are little more than toys. Sometimes you need to actually do some graphical work, and for that, there’s ImageMagick.
The full documentation for ImageMagick is at www.imagemagick.org/script/command-line-processing.php .
It includes tools to create, edit, compose, or convert bitmap images. It can read and write images in over 200 formats, including PNG, JPEG, GIF, HEIC, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG.
You can use ImageMagick to resize, flip, mirror, rotate, distort, shear, and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses, and Bézier curves.
Audio and Video
The computer can get boring at times with just text on the screen. Fortunately, you don’t have to sit there and work in silence. Computers were playing music long before GUI interfaces, and you can play all your music with command-line tools. It’s actually even easier to create playlists and automate your music using these tools. If you want to watch a movie while you work, that’s completely possible too.
Music Players
The Raspberry Pi has excellent hardware for playing music, either through the audio jack or through HDMI. The command line has numerous excellent (and very customizable) music players. My two favorites are MOC and CMUS.
Both work better if you have your music library organized in individual artist directories. At one point, I had all my music in Apple iTunes; so I just downloaded all the songs from there, copied the giant “Music” folder to its own directory, and pointed the music players at them—the default organization leftover from iTunes works without any modification. I’m not saying you need iTunes to organize your music, but a lot of people already have that somewhere, and if you do, it’s one easy way to go.
MOC (Music on Console)
MOC Details :
Installation: sudo apt install moc
Run command: mocp
Dotfile: ~/.moc/config
Help: man moc
Web site: http://moc.daper.net/
Run the MOC player with mocp (note the p at the end).
CMUS (C Music Player)
CMUS Details:
Installation: sudo apt install cmus
Run command: cmus
Dotfile: /usr/share/cmus/rc
Help: man cmus
Web site: https://cmus.github.io/
CMUS supports most music formats from the default install: Ogg Vorbis, MP3, FLAC, Opus, Musepack, WavPack, WAV, AAC, MP4, audio CD, and everything supported by ffmpeg (WMA, APE, MKA, TTA, SHN, etc.) and libmodplug. If you get your music from various sources, then being able to not worry about your format being understood is a nice plus.
Like MOC, CMUS has remappable keys, theming, and color customizing. This one, however, also allows for music streaming from online radio stations if you can find the url for the stream, that is, http://beirutnights.com/live.m3u .
Install with sudo apt install cmus.
MPC/MPD (Music Player Daemon/Controller)
MPD Details:
Installation: sudo apt install mpd
Run command: mpd
Dotfile: /etc/mpd.conf
Help: man mpd
Web site: www.musicpd.org
Both of the previous entries, MOC and CMUS , were full-screen apps that relied heavily on visually navigating files and directories. Both interfaces were inspired by file management systems, and both are at least somewhat interactive with their controls.
An alternative is the Music Player Daemon, or MPD. It is a flexible, powerful, server-side application for playing music. Through plug-ins and libraries, it can play a variety of sound files while being controlled by its network protocol. Since it’s a daemon, it just runs silently in the background and waits for commands from an external client program.
MPC is the parallel client app. It connects to MPD and controls it according to commands and arguments passed to it. If no arguments are passed, current status is given. It’s strictly a command-line tool, with no visuals whatsoever.
There are, however, a number of other clients that work with the MPD server. Some are graphical, some are for the Web, while others are for use on the console. It’s a bit harder to set up, but it’s very flexible and powerful.
MPD Daemon home page: www.musicpd.org/
MPD clients: www.musicpd.org/clients/
Essentially the point of MPD is that with the client/server architecture, you can set up one machine in your house with all the music files stored on it and then access and play that music from other computers located on the network without storing your music files in multiple places.
Movie Viewers
Movies are obviously visual. The old-style terminals and computers back in the early days of Unix couldn’t play video files because the monitors just couldn’t handle it. Your Raspberry Pi, on the other hand, can play movies easily. The model 4 Pi can even handle dual 4K outputs. These systems can play videos, and there’s no real reason why you cannot play your movies from the command line.
MPlayer
MPlayer Details:
Installation: sudo apt install mplayer
Run command: mplayer <filename>
Dotfile: various files inside /etc/mplayer/
Help: man mplayer
Web site: www.mplayerhq.hu/
MPlayer is a movie player which runs on many systems. It plays most MPEG/VOB, AVI, Ogg/OGM, VIVO, ASF, WMA, WMV, QT, MOV, MP4, RealMedia, Matroska, NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, and PVA files, supported by many native, XAnim, and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx, DivX 3/4/5, WMV, and even H.264 movies.
Even with all this, you still may prefer to watch your videos in the GUI with an app like VLC (discussed elsewhere), but it’s good to know you have the ability to watch on the command line if you need it.
News and Weather
News is mostly text, so it’s not a huge leap to think that there would be a number of ways to get the news on the command line. Here are two great ways to get started:
Instantnews
Instantnews Details:
Installation: sudo pip install instantnews
Run command: instantnews
Dotfile: None
Help: man instantnews
Web site: https://github.com/shivam043/instantnews
Instantnews retrieves all news headlines from the News API and then displays what you want to see in text. There are dozens of professional news sources, and you can choose from one or any combination of them to display on your screen. It requires you to sign up for a free API key.
Haxor-News
Haxor-News Details:
Installation: sudo pip install haxor-news
Run command: hn <command>
Dotfile: various files inside ~/.haxornewsconfig
Help: hn --help
Web site: https://github.com/donnemartin/haxor-news
Posts
Post comments
Post-linked web content
Monthly hiring and freelancers posts
User info
Onion posts
Then hit “q” to go back to the article list and choose more.
Newsboat
Newsboat Details:
Installation: sudo apt install newsboat
Run command: newsboat
Dotfile: ~/.config/newsboat/config
Help: man newsboat
Web site: https://newsboat.org/
Weather
There are a great many utilities for getting weather information from the command line, so here are a few fun apps:
Finger
at the command line, substituting your city name for “your_location” in the command.
Ansiweather
Ansiweather Details:
Installation: sudo apt install ansiweather
Example run command: ansiweather -l Flint -u imperial -f 3 -s true
Dotfile: ~/.ansiweatherrc
Help: man ansiweather
Web site: https://github.com/fcambus/ansiweather
Books, Comics, and Reading
This is text mode we’re dealing with now, so obviously you can read text on it. We’ve talked about text editors in a previous section, and those are all wonderful for simply reading text. Sometimes, however, you have a file in a non-textual format that needs to be read. Ebook formats such as EPUB, MOBI, PRC, and the like all require specialized readers; and we’ll look at how to access these now.
EPUB Documents
EPUBReader Details:
Installation (type as one line):
sudo pip3 install git+ https://github.com/wustho/epr.git
Run command: epr <filename.epub>
Dotfile: none
Help: epr --help
Web site: https://github.com/wustho/epr/
and the ebook (in EPUB format) will display on the screen. The instructions are very easy to follow.
Non-EPUB Formats
Calibre Details:
Installation: sudo apt install calibre
Run command: calibre (or command in the following)
Dotfile: set in the app through a menu
Help: man calibre
Web site: https://calibre-ebook.com/
Other ebook formats, such as .mobi, .azw, and .prc, will need to be converted to .epub or text format before use. The most common way to do this from within a graphical user interface is with the app Calibre. Since we’re talking about command-line tools here, most of Calibre’s features won’t be available, but Calibre does come with several powerful command-line tools.
calibre
calibre-customize
calibre-debug
calibre-server
calibre-smtp
calibredb
ebook-convert
ebook-edit
ebook-meta
ebook-polish
ebook-viewer
fetch-ebook-metadata
lrf2lrs
lrfviewer
lrs2lrf
web2disk
The list and associated instructions can be found at
https://manual.calibre-ebook.com/generated/en/cli-index.html .
It’s really fast, and the output looks perfect. Then you can just use the EPUB reader to read the file.
Task Management
There are many command-line tools for calendaring, scheduling, and task management. Here are my favorites:
Cal
From way back in the early days of the original Unix systems, there is the ancient cal command . It displays a monthly calendar with today’s date highlighted. I can’t begin to tell how many times I’ve used this over the years. Other than displaying the month, it doesn’t do anything special, but it’s still incredibly convenient.
Calcurse
Calcurse Details:
Installation: sudo apt install calcurse
Run command: calcurse
Dotfile: Various files in ~/.calcurse/
Help: man calcurse
Web site: https://calcurse.org/
Todo.txt
If you are concerned about syncing your appointments and tasks between devices, this process is more complex than Calcurse, but allows for use on any device. The concept is simple: A group of users have gotten together and created a standardized text file format that can contain all your to-do lists and appointments. Then you use a file-syncing system like Dropbox to make that file available to your computer, phone, tablet, and whatever other devices you use. It’s easy to set this system up, it’s reliable, and it’s surprisingly flexible.
If what I’ve just described is something that appeals to you, then by all means go for it right now and design your own methodology and system. Put a todo.txt file in your Dropbox on your phone and set your computer to access that file. You’re all set!
Or you can use a system already available that does all this. There’s a whole online community that has built up around this concept, and they’ve come up with what they believe is a “standard” for todo.txt files. The home page for the organizations is at
and the specific “rules” they have set up are at
https://github.com/todotxt/todo.txt .
You might ask, “Why use such a complicated set of rules for simply managing a to-do list in a text file?” The answer is that if you use their standardized format, then you can take advantage of the various apps that have been created to support the format. If you don’t care about these apps, then you could just do it any way you want, managing your files with a text editor.
There is todo.txt-cli at
https://github.com/todotxt/todo.txt-cli/releases
Coding/Programming/Web Design
The options and availability of Linux-based programming and coding tools are nearly unlimited. Almost every computer language compiler is available as a command-line tool, and, under the surface, even most GUI programming tools simply run a command-line tool in the background. The best way to get into coding is to choose a text editor program such as Vim, Emacs, or something of that sort and then start looking at the various syntax tools and programming-specific plug-ins.
All the major text editors are used heavily by developers, mostly due to their customizability, plug-in capability, and speed. Which editor you choose is largely a matter of taste and how much effort you want to put into learning it; it’s completely possible to use nothing more than Nano to type in code and then compile it on the command line using the language of your choice, but most coders are going to want something more and will quickly advance into Emacs or Vim (although there are other choices out there that are excellent as well). There’s no way I can even begin to scratch the surface of how to use these advanced editors in the development world, so I won’t. Just keep in mind that coding in text mode is just as capable, if not more, as working in a GUI environment.
One coding tool that has exploded in the past few years is Git. Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning-fast performance. It ties in with Github.com , the online repository and home of most of today’s open source projects. The command-line version of Git is available at https://git-scm.com and can be installed as either a command-line version or GUI tool. Once you make some changes to a source file (whatever kind, from C++ to HTML to Prose Text), you commit changes to a repository, and then if you decide to branch off or restore from a previous version at a later time, you can. It’s tremendously useful for keeping multiple versions of files, collaboration, and, of course, bug fixes.
Web Apps and Services
Installing command-line software isn’t the only option to get things done anymore. There are also countless web applications available over the Internet for free or for a subscription fee. Some people survive just fine using nothing but a Chromebook as their primary computer, and, until recently, those machines used nothing but web applications, and we’re looking at them in this book as almost an afterthought. Many advanced web sites depend heavily on JavaScript and other scripting languages that do not work well (or at all) from a text-based browser, but some work well in text mode.
There are command-line tools to access many web-based services. Todoist is one very popular to-do list manager that works great on most mobile devices, and there is at least one good command-line interface for it. The todo.txt system is another system that works to sync between mobile/GUI and text.
This book isn’t going to focus too heavily on web apps, as I cover them extensively in my other book, Going Chromebook: Living Life in the Cloud, and really only intend to cover text-mode specific tools here. Just keep in mind that if you can’t find a tool you need, there may be a tool on the Web for your needs.
Using Command-Line Tools with the GUI
Sometimes the best tool for a job is not the one you want to be using. Sometimes, the GUI really is the more efficient way to do things. Drawing and video work are two good examples, as is image-intensive web development. Most heavily visual game programming requires a GUI. Plus, some modern tools only work under a windowing system, not even making their features available from the command line. Sometimes you need a GUI to get things done.
The days of dumb terminals and text-based teletype machines are long past us. Nostalgia and minimalism are enjoyable, but there is a reason that computers have moved past those things. If you’re running a command-line tool on a server with SSH, then you can do a lot of powerful things that way, but if you add that power alongside the best tools that a GUI system can offer, wouldn’t that be better still? Sometimes, you may find yourself following a ten-step process to get something done that you could be using a different tool for and doing it in a single step.
My point is that now that you’ve learned how you can do just about everything in text mode, it’s time to select what works best for you and use those tools alongside your desktop software. If you’ve been running a command line from within a terminal window on a Raspbian machine, or SSH-ing into your Pi from a Mac, then you’re already doing this. Terminator or Terminal on Linux is the same thing; you’re running a terminal screen from within a GUI. That’s not “cheating”; that’s the smart way to do it.
For example, writing a book is one task that needs both ways of working to finish a project. Go ahead and write that book in LaTeX or Markdown using Vim. Use the command-line version of Git to manage your versions. Compile it into a PDF with Pandoc. But then use some graphic app such as Okular to view the resulting PDF. This is called “using the right tool for the right job” and is the most efficient way to get the project done. If you can’t find a command-line PDF viewer that you enjoy using, then don’t do it that way. It’s all about what gets things done in the most efficient and enjoyable manner. It’s OK to get hung up in your work; just don’t get bogged down by the tools.
Learn how to cut and paste from the terminal window into a graphical window. Learn how to copy files from your home directory onto the desktop of the graphical desktop. Sometimes it’s easier to use Ranger to browse the file system than it is to use the File Manager, and sometimes the opposite is true.
Command Line vs. GUI
Better from the Command Line | Better in a Graphical Environment |
---|---|
Mutt for email | PDF and comic reading |
Text editing using Vim or Emacs | Complex desktop publishing layouts |
Ranger/MC for file operations | Drawing and graphic creation |
Music and playlist creation | Most games |
File backups, large-scale file transfers, and big downloads | Web browsing |
My point here is that the command line doesn’t have to be a “lifestyle.” It’s one more tool in your arsenal of computer power. By learning the command line and some of the more useful tools, you can gain faster and more powerful ways to do things in a more customizable environment, often using less-powerful equipment. This whole concept is meant to be fun, not a prison sentence.
Conclusion
There are some tasks, like video and audio editing, that really demand the use of graphic mode and a mouse. That said, most tasks work just fine from the command line. They may not have all the pretty bells and whistles that accompany most desktop apps, but they often are far more configurable and easier to access and have extremely advanced automation possibilities. It’s just a matter of figuring out how they work without all the easy menus that a GUI offers.
In the next chapter, we’ll look at advanced topics and things that didn’t fit elsewhere. We’ve discussed Markdown and LaTeX, and we’ll do a quick introduction to those tools and then look at customizing your command-line apps with dotfiles and configuration files. We’ll look at some additional resources you can find online.
Lastly, we look at some projects you can use a spare Raspberry Pi for that require a dedicated machine. I’ve found that the RPi are so cheap, you tend to buy a new one every time they have a significant upgrade. I recently looked, and I have five of them lying around!