# Back to the Terminal
![monolith](back-to-term.jpg)
### Bill Kendrick
#### Linux Users' Group of Davis, April 17, 2017
---
## Pre-history
Before computers, there were [teletypewriters](http://www.linfo.org/teletype.html) (teletypes).
In the 1920s, Telex, a global teletype network for businesses, was
established. The first computers used these teletypes, later moving
to text terminal screens (CRTs) -- think MSDOS, the Unix command-line, old
microcomputers (via TV sets or monitors), etc.
Trivia: "the legacy of teletypewriters lives on in the designations for
serial ports and consoles (i.e., the text-only display mode), which have
the prefix tty, such as `/dev/tty5` for the fifth virtual console."
---
## Text editors
* [GNU nano](https://www.nano-editor.org/) (and pico)
* [Vim](http://www.vim.org/) (and vi)
* [GNU Emacs](http://www.vim.org/)
### Dive deeper
Text manipulaton and analysis tools, such as `grep`,
`sed`, `awk`, the Perl language, and much more, while created long
ago, are still helpful today!
$ grep teletype back-to-terminal.md | sed -e "s/teletype/TELETYPE/g"
Before computers, there were [TELETYPEwriters](http://www.linfo.org/TELETYPE.html) (TELETYPEs).
In the 1920s, Telex, a global TELETYPE network for businesses, was
established. The first computers used these TELETYPEs, later moving
Trivia: "the legacy of TELETYPEwriters lives on in the designations for
---
## Web browsing: Links
[Links](http://links.twibright.com/) is an interactive terminal-based
web browser.
Linux Users' Group of Davis (LUGOD): Directions to Explorit Nature C (p1 of 10)
l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
Next Meeting: Latest News: Page last
April 17: Back to Next Installfest: Feb. 10: AlphaGo and updated:
the Terminal TBD Kodi talks 2009 Jul 14
16:19
Events Directions to the Explorit Nature Center
Meetings
- Next -------------------------------------
- Upcoming
- Unscheduled [IMG]Printer-Friendly Version
- Past
- Presentations -------------------------------------
- Wishlist
- Directions Explorit Nature Center (5th Street)
- Facilities Photo from DavisWiki.org, by Jason Aller
Installfests
Demos The Explorit Nature Center (previously
Photos called the "Mace Ranch Branch") of the
Services Explorit Science Center in Davis is
Jobs located on 5th Street, east of
---
## IRC Chat
[Internet Relay Chat](https://en.wikipedia.org/wiki/Internet_Relay_Chat)
is a client/server based protocol that provides
text-based chat rooms ("channels"), as well as direct private
messaging. Users connect to a server (and servers can be connected
to each other, to expand an IRC network) using an IRC client.
As an example, LUGOD has its own channel, "`#lugod`", registered
on the [freenode](http://freenode.net/) IRC network.
Along with graphical clients (such as Konversation and Adium),
and even web-based interfaces to IRC, there are of course text-based
clients. (Not surprising since IRC was created in 1988!)
* [ircII](http://www.eterna.com.au/ircii/)
* [Irssi](https://irssi.org/)
*** You are now talking to channel #lugod
> Hello LUGOD. Screenshot time!
*** Topic for #lugod: Linux Users' Group of Davis, CA (http://lugod.org/) // Ne
+See also: http://www.lugod.org/meeting/upcoming/ // Always looking for speaker
*** #lugod aidian!~aidian@lugod/officers/sys 1491110674
everyone ruuuuuun
[1] 22:40 kendrick2 (+i) on #lugod (+nt) * type /help for help
Bye!
### Slack
[Slack](https://slack.com/), the popular
"cloud-based team collaboration software" launched in 2013, was originally
based on an IRC backend, and offers many IRC-like features (channels,
private messages). It's even possible to
[use an IRC client to connect to Slack](https://get.slack.help/hc/en-us/articles/201727913-Connect-to-Slack-over-IRC-and-XMPP)!
---
## Instant Messaging and Social Media
### Bitlbee
[Bitlbee](http://bitlbee.org/) brings Instant Messengers and more to
your IRC clients. [Among others](https://wiki.bitlbee.org/), it supports:
* AIM / ICQ
* Google Talk, GMail/Google+ chat
* Twitter
* Facebook
* MSN
* Hipchat
### Rainbowstream
[Rainbowstream](http://www.rainbowstream.org/) is a terminal-based
Twitter client, allowing you to do almost anything a GUI app can:
* compose tweets
* send direct messages (DMs)
* search
* 'favorite' tweets
* browse trending topics
* follow hashtags
---
## More web access and file sharing
### googler
[googler](https://github.com/jarun/googler) is a command-line tool for accessing
Google Search, Google Site Search, and Google News from the terminal.
> ```$ export BROWSER=links ; googler -n 2 lugod```
> ``` ```
> ```1 Linux Users' Group of Davis (LUGOD): Serving the Sacramento ...```
> ```http://www.lugod.org/```
> ```Davis. Meetings 3rd Mondays, social gatherings 1st Tuesdays, mailing lists, installfests, special events.```
> ``` ```
> ```2 LUGOD - Davis - LocalWiki```
> ```https://localwiki.org/davis/LUGOD```
> ```Apr 15, 2008 - LUGOD stands for Linux Users' Group of Davis. From their website, they are "a 501(c)(7) non-profit computer club serving Davis, California and ...```
> ``` ```
> ```googler (? for help) ```
### curl
[curl](https://curl.haxx.se/) a non-interactive command-line tool (as well
as library, used within other programs!) for transferring data with URLs.
* Protocols: DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS,
LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET
and TFTP
* SSL certificates
* HTTP POST, HTTP PUT, FTP uploading
* HTTP form based upload
* proxies
* cookies
* user+password authentication (Basic, Plain, Digest, CRAM-MD5, NTLM, Negotiate and Kerberos)
* file transfer resume
* proxy tunneling
* ...and more
> ```$ curl http://www.lugod.org/ > lugod.html```
> ``` % Total % Received % Xferd Average Speed Time Time Time Current```
> ``` Dload Upload Total Spent Left Speed```
> ```100 39489 0 39489 0 0 28328 0 --:--:-- 0:00:01 --:--:-- 28327```
### Wget
[GNU Wget](https://www.gnu.org/software/wget/) is
* Protocols: HTTP, HTTPS and FTP
* can converts absolute links in downloaded documents to relative,
so that downloaded documents may link to each other locally
* unattended / background operation
* useful for mirroring sites
* ...and more
> ```$ wget lugod.org```
> ```--2017-04-05 22:21:37-- http://lugod.org/```
> ```Resolving lugod.org (lugod.org)... 138.197.203.91```
> ```Connecting to lugod.org (lugod.org)|138.197.203.91|:80... connected.```
> ```HTTP request sent, awaiting response... 200 OK```
> ```Length: unspecified [text/html]```
> ```Saving to: 'index.html'```
> ``` [ <=> ] 39,463 26.0KB/s in 1.5s```
> ```2017-04-05 22:21:39 (26.0 KB/s) - ‘index.html’ saved [39463]```
### DropBox
[DropBox](https://www.dropbox.com/), the popular file hosting and collaboration service.
* Provides a integration into the Linux desktop GUI.
* Also provides a "`dropbox`" command-line tool, which allows you to
sync, share files via public or private links, exclude files/directories,
and more.
### rTorrent
[rTorrent](https://github.com/rakshasa/rtorrent/wiki) is a "bittorrent"
client (which also has a daemon mode, and includes `LibTorrent` library).
"BitTorrent" is a communications protocol of peer-to-peer file sharing ("P2P")
which is used to distribute data and electronic files over the Internet,
in which each part of a file downloaded by a user is transferred to other users.
### termbin
[termbin.com](http://termbin.com/) is a command-line 'pastebin' service.
"pastebin" services are websites that host text-based content which
can be accessed by a short URL meant for sharing online. In software
development communities, for example, programmers use them to post long
chunks of text (e.g., a log file, or copious output from a failed build)
-- especially in situations where a large paste would be obnoxious (e.g.,
in an IRC channel!)
Send data to termbin.com's port 9999, e.g. by sending content to
the Unix "netcat" (`nc`) tool's `stdin`, and it will be stored, and
a short URL will be returned. e.g.:
> ```$ echo "just testing!" | nc termbin.com 9999```
> ```http://termbin.com/ad34```
---
## Email
### Mutt
"All mail clients suck. This one just sucks less."
[Mutt](http://www.mutt.org/) is a terminal-based email client.
* Mailbox formats (mbox, Maildir)
* Protocols (POP3, IMAP, ...)
* MIME support, PGP/GPG, S/MIME integration
* Hundreds of configuration directives and commands
* Keybindings can be changed
* Macros can be written
* Color/layout of most of the interface can be modified
* "Hooks" allow settings to change based on criteria (e.g., current mailbox, outgoing message recipients, etc.)
* Patches/extensions for NNTP support, sidebar, etc.
* Conversation threading(!!!)
* Regexp searching of various parts of messages (to, from, subject, body, etc.)
i:Exit -:PrevPg <Space>:NextPg v:View Attachm. d:Del r:Reply j:Next ?:Help
83 L Mar 23 Nick Schmalenbe `->Re: [vox] [LUGOD] Library
84 L Mar 27 Shwaine `->
85 L Jun 22 Tony Cratz [vox-tech] Possible for future installfest
86 L Jun 26 Cory Carpenter Re: Quick sponsorship question...
87 L Jun 26 Cory Carpenter `=>Re: [vox-officers] Quick sponsorship question.
---Mutt: =in-vox [Msgs:189 New:1 Flag:1 Inc:1 1.2M]---(threads/last-date-receive
Date: Sun, 22 Jun 2008 18:14:28 -0700
From: Tony Cratz <XXXXX@XXXXXXX>
Subject: [vox-tech] Possible for future installfest
To: vox-tech@lists.lugod.org
Reply-To: "lugod's technical discussion forum" <vox-tech@lists.lugod.org>
Hello:
At the last regular meeting it was suggested we try to
get more people to show to the install fest by not only
helping with installs but also having a topic we cover
which might help others learn about Linux.
One of the common issues which always come up is the
desire to connect a Linux system to the home network
and be able to share files with Microsoft systems.
- L- 85/189: Tony Cratz [vox-tech] Possible for future in -- (52%)
### And more
* Pine
* Elm
* Gnus
* ...and others
---
## Terminal multiplexers
Need to do more than one thing at a time?
If you're using a terminal application in a GUI, you can just open
multiple terminals; or if it supports 'tabs', open multiple tabs;
or do both!
If you're using virtual terminals (i.e., no GUI at all) on Linux,
you can switch between them (e.g., [Alt]+[F1], [Alt]+[F2], etc.)
But if you're connected remotely, or need to do more complex
actions (scroll back, copy/paste within or between terminal
sessions, etc.), you'll want a terminal multiplexer.
* [GNU Screen](https://www.gnu.org/software/screen/)
* [tmux](https://tmux.github.io/)
---
## Creating text documents
### Markdown
[Markdown](http://daringfireball.net/projects/markdown/) is a text-to-HTML
conversion tool. "The idea is that a Markdown-formatted document should
be publishable as-is, as plain text, without looking like it’s been
marked up with tags or formatting instructions." Enter text like so:
> ```# Title```
> ```## Header```
> ```Here is my text.```
and it produces:
Title
Header
Here is my text.
#### Check it out
This presentations markdown source (created using Vim text
editor): [back-to-terminal.md](back-to-terminal.md),
and HTML version [back-to-terminal.html](back-to-terminal.html).
### Pandoc
[Pandoc](http://pandoc.org/) is a "swiss-army knife" for text formats.
It converts from:
* markdown
* HTML
* DocBook
* LaTeX
* Microsoft Word DOCX
* LibreOffice ODT
* EPUB
* ...and more
To all those, plus
* all those, plus
* TexInfo, Groff man pages
* PDF (via LaTeX)
* AsciiDoc
* MediaWiki markup
* ...and more
#### Check it out
This presentation's markdown, converted to PDF using
Pandoc: [back-to-terminal.pdf](back-to-terminal.pdf).
---
## Spreadsheets
Long before MicroSoft Excel, there was the original spreadsheet: "Visicalc".
originally released in 1981 for the Apple II personal computer (64KB RAM,
8-bit 6502 CPU, 40x25 or 80x25 text screen). So of course there are
terminal-based spreadsheet available today!
### sc - spreadsheet calculator
Based on `vc`, written in 1982 by James Gosling (creator of the Java language),
`sc` was also created in the 1980s!
C12 (10 2 0) [@min(C1:C8)]
A B C D E F G
0 Date Topic Attendees
1 1999.01.27 N/A 11.00
2 1999.02.09 N/A 15.00
3 1999.03.16 BoboBot 15.00
4 1999.04.05 N/A 14.00
5 1999.05.03 BSD Unix 22.00
6 1999.05.18 VA Linux 21.00
7 1999.05.31Linux @ UC 23.00
8 1999.06.28Shell BASI 10.00
9
10 Avg 16.38
11 Max 23.00
12 Min 10.00
---
## Motivation for this talk (why me, why now?)
"Get work done" via my Atari 8-bit home computer!
### From the 1980s:
* Atari 1200XL (8-bit 6502 CPU @ 1.79MHz) with 256KB RAM upgrade
* Atari 850 serial interface (max 19.2Kbps)
### From modern times:
* Lantronix UDS-10 (serial->ethernet)
* "Ice-T" 80-column VT-101 terminal program
* Linux laptop with `telnetd` service running
![googler via Atari](icet.jpg)
---
## Do even more!
* Manipulate photos and other images (ImageMagick, NetPBM, GIMP (yes!))
* Edit audio files (SoX, lame, ffmpeg)
* Alter video files (mencoder, ffmpeg, VideoLan/VLC, HandBrake)
* ...undoubtedly so much more!
Check out [Command-Line Application Roundup](http://www.linuxjournal.com/article/10854)
from [Linux Journal magazine, issue 198](http://www.linuxjournal.com/issue/198)
(October 2010), or search the web (via Links!?) or ask around (LUGOD's IRC channel
and mailing lists!?) for even more!